en-US/about_AzDoQueryFolder.help.txt

.NAME
    AzDoQueryFolder
 
.SYNOPSIS
    DSC resource for managing Azure DevOps work item query folders.
 
.DESCRIPTION
    Manages a folder within a project's shared query tree. Query folders are configuration in
    their own right: they carry ACLs, and a query cannot be created at a path whose folders do
    not exist.
 
    Declare a folder with this resource and make queries beneath it depend on it, rather than
    letting each query create its own ancestry - two queries in the same folder would otherwise
    race to create it, and Test() results would depend on apply order.
 
.PARAMETER ProjectName
    Required - System.String
    The name of the Azure DevOps project.
 
.PARAMETER Path
    Key - System.String
    The full path of the folder, including the root, for example 'Shared Queries/Platform/Release'.
    Backslashes are accepted and normalized to forward slashes.
 
.PARAMETER AllowRecursiveDelete
    Write - System.Boolean
    Deleting a folder deletes everything beneath it. Removal of a folder that still has children
    is refused unless this is set to $true.
 
.EXAMPLE 1
 
This example shows how to create a folder in the shared work item query tree of an
Azure DevOps project.
 
Configuration Example
{
    Import-DscResource -ModuleName 'AzureDevOpsDscNative'
 
    node localhost
    {
        AzDoQueryFolder 'AddAzDoQueryFolder'
        {
            Ensure = 'Present'
            ProjectName = 'MyProject'
            Path = 'Shared Queries/Platform'
        }
    }
}
 
.EXAMPLE 2
 
This example shows how to create a nested query folder. Each level of the tree is its
own resource: the folder resource does not create its own ancestry, so that two folders
sharing a parent cannot race to create it.
 
Configuration Example
{
    Import-DscResource -ModuleName 'AzureDevOpsDscNative'
 
    node localhost
    {
        AzDoQueryFolder 'AddPlatformFolder'
        {
            Ensure = 'Present'
            ProjectName = 'MyProject'
            Path = 'Shared Queries/Platform'
        }
 
        AzDoQueryFolder 'AddReleaseFolder'
        {
            Ensure = 'Present'
            ProjectName = 'MyProject'
            Path = 'Shared Queries/Platform/Release'
            DependsOn = '[AzDoQueryFolder]AddPlatformFolder'
        }
    }
}
 
.EXAMPLE 3
 
This example shows how to remove a query folder and everything beneath it.
 
Deleting a query folder in Azure DevOps deletes its entire subtree. The resource
therefore refuses to remove a folder that still has children unless
AllowRecursiveDelete is set, so that narrowing a configuration cannot quietly take
other people's saved queries with it.
 
Configuration Example
{
    Import-DscResource -ModuleName 'AzureDevOpsDscNative'
 
    node localhost
    {
        AzDoQueryFolder 'RemoveAzDoQueryFolder'
        {
            Ensure = 'Absent'
            ProjectName = 'MyProject'
            Path = 'Shared Queries/Platform'
            AllowRecursiveDelete = $true
        }
    }
}