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, and service connections. 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 name, repository name
    or service connection name, depending on ResourceType. This property is mandatory.
 
.PARAMETER ResourceType
    Required - System.String
    Allowed values: environment, repository, endpoint
    The type of resource. Valid values are environment, repository, and endpoint. This is a key property.
 
.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'
        }
    }
}