en-US/about_AzDoCheckConfiguration.help.txt

.NAME
    AzDoCheckConfiguration
 
.SYNOPSIS
    DSC resource for managing pipeline check configurations.
 
.DESCRIPTION
    This resource manages pipeline check configurations on Azure DevOps resources such as
    environments, repositories, service connections, agent queues, variable groups and secure
    files. Checks enforce gates that must pass before a pipeline can access the protected resource.
 
.PARAMETER ProjectName
    Key - System.String
    The name of the Azure DevOps project. This property is mandatory and serves as a key property for the resource.
 
.PARAMETER TargetResourceName
    Required - System.String
    The name of the resource the check is attached to - an environment, repository, service
    connection, agent queue, variable group or secure file name, depending on ResourceType. For
    ResourceType 'queue' this is the project-level agent queue name (resolved via the project's
    distributedtask/queues, not the org-level pool). This property is mandatory.
 
.PARAMETER ResourceType
    Required - System.String
    Allowed values: environment, repository, endpoint, queue, variablegroup, securefile
    The type of resource. Valid values are environment, repository, endpoint, queue, variablegroup, and
    securefile. This is a key property.
 
    'queue' attaches the check to the project-level agent queue (distributedtask/queues), not the
    org-level pool. 'variablegroup' and 'securefile' attach to a variable group or secure file
    respectively. See https://learn.microsoft.com/en-us/azure/devops/pipelines/process/approvals for
    the full list of protected-resource types the Checks API supports.
 
.PARAMETER CheckType
    Required - System.String
    The type of check to configure (e.g., Task Check, Approval, ExclusiveLock). This is a key property.
 
.PARAMETER Settings
    Write - HashTable
    A hashtable of check-specific configuration settings.
 
.PARAMETER TimeoutInMinutes
    Write - System.UInt32
    How long the check can run before timing out. Defaults to 43200 (30 days).
 
.PARAMETER Enabled
    Write - System.Boolean
    Whether the check is active. Defaults to $true.
 
.EXAMPLE 1
 
This example shows how to add an approval check configuration on a pipeline environment in Azure DevOps.
 
Configuration Example
{
    Import-DscResource -ModuleName 'AzureDevOpsDscNative'
 
    node localhost
    {
        AzDoCheckConfiguration 'AddAzDoCheckConfiguration'
        {
            Ensure = 'Present'
            ProjectName = 'MyProject'
            TargetResourceName = 'Production'
            ResourceType = 'environment'
            CheckType = 'Task Check'
            TimeoutInMinutes = 1440
            Enabled = $true
            Settings = @{
                displayName = 'Validate deployment'
                definitionRef = @{
                    id = '9a2b4d5e-1234-5678-abcd-9876543210ef'
                    name = 'PowerShell'
                    version = '2.*'
                }
                inputs = @{
                    script = 'Write-Host "Validation passed"'
                }
            }
        }
    }
}
 
.EXAMPLE 2
 
This example shows how to update a check configuration on a pipeline resource in Azure DevOps.
 
Configuration Example
{
    Import-DscResource -ModuleName 'AzureDevOpsDscNative'
 
    node localhost
    {
        AzDoCheckConfiguration 'UpdateAzDoCheckConfiguration'
        {
            Ensure = 'Present'
            ProjectName = 'MyProject'
            TargetResourceName = 'Production'
            ResourceType = 'environment'
            CheckType = 'Task Check'
            TimeoutInMinutes = 2880
            Enabled = $true
            Settings = @{
                displayName = 'Validate deployment - extended'
                definitionRef = @{
                    id = '9a2b4d5e-1234-5678-abcd-9876543210ef'
                    name = 'PowerShell'
                    version = '2.*'
                }
                inputs = @{
                    script = 'Write-Host "Extended validation passed"'
                }
            }
        }
    }
}
 
.EXAMPLE 3
 
This example shows how to remove a check configuration from a pipeline resource in Azure DevOps.
 
Configuration Example
{
    Import-DscResource -ModuleName 'AzureDevOpsDscNative'
 
    node localhost
    {
        AzDoCheckConfiguration 'RemoveAzDoCheckConfiguration'
        {
            Ensure = 'Absent'
            ProjectName = 'MyProject'
            TargetResourceName = 'Production'
            ResourceType = 'environment'
            CheckType = 'Task Check'
        }
    }
}