Skip to content

AzDoCheckConfiguration

github-actions[bot] edited this page Aug 19, 2026 · 4 revisions

Parameters

Parameter Attribute DataType Description Allowed Values
ProjectName Key System.String
CheckType Required System.String
ResourceType Required System.String environment, repository, endpoint
TargetResourceName Required System.String
Enabled Write System.Boolean
Ensure Write Ensure Present, Absent
Settings Write System.Collections.Hashtable
TimeoutInMinutes Write System.UInt32
LookupResult Read System.Collections.Hashtable

Description

Examples

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'
            ResourceName      = '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'
            ResourceName     = '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'
            ResourceName = 'Production'
            ResourceType = 'environment'
            CheckType    = 'Task Check'
        }
    }
}

Commands

Resources

Clone this wiki locally