-
Notifications
You must be signed in to change notification settings - Fork 0
AzDoCheckConfiguration
Michael Zanatta edited this page Aug 18, 2026
·
4 revisions
AzDoCheckConfiguration [string] #ResourceName
{
ProjectName = [String]$ProjectName
ResourceName = [String]$ResourceName
ResourceType = [String] {'environment', 'repository', 'endpoint'}
CheckType = [String]$CheckType
[ Settings = [HashTable]$Settings ]
[ TimeoutInMinutes = [UInt32]$TimeoutInMinutes ]
[ Enabled = [Boolean]$Enabled ]
[ Ensure = [String] {'Present', 'Absent'} ]
}- ProjectName: The name of the Azure DevOps project. This property is mandatory and serves as a key property for the resource.
- ResourceName: The name of the resource to attach the check to (environment name, repository name, or service connection name). This is a key property.
-
ResourceType: The type of resource. Valid values are
environment,repository, andendpoint. This is a key property. -
CheckType: The type of check to configure (e.g.,
Task Check,Approval,ExclusiveLock). This is a key property. - Settings: A hashtable of check-specific configuration settings.
-
TimeoutInMinutes: How long the check can run before timing out. Defaults to
43200(30 days). -
Enabled: Whether the check is active. Defaults to
$true. -
Ensure: Specifies whether the check should exist. Valid values are
PresentandAbsent.
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.
Configuration ExampleConfig {
Import-DscResource -ModuleName 'AzureDevOpsDscNative'
Node localhost {
AzDoCheckConfiguration AddExclusiveLock {
Ensure = 'Present'
ProjectName = 'MyProject'
ResourceName = 'Production'
ResourceType = 'environment'
CheckType = 'ExclusiveLock'
TimeoutInMinutes = 43200
Enabled = $true
}
}
}
Start-DscConfiguration -Path ./ExampleConfig -Wait -Verbose# Return the current configuration for AzDoCheckConfiguration
$properties = @{
ProjectName = 'MyProject'
ResourceName = 'Production'
ResourceType = 'environment'
CheckType = 'ExclusiveLock'
}
Invoke-DscResource -Name 'AzDoCheckConfiguration' -Method Get -Property $properties -ModuleName 'AzureDevOpsDscNative'parameters: {}
variables: {
ProjectName: MyProject,
EnvironmentName: Production
}
resources:
- name: Production Exclusive Lock
type: AzureDevOpsDscNative/AzDoCheckConfiguration
dependsOn:
- AzureDevOpsDscNative/AzDoPipelineEnvironment/Production
properties:
ProjectName: $ProjectName
ResourceName: $EnvironmentName
ResourceType: environment
CheckType: ExclusiveLock
TimeoutInMinutes: 43200
Enabled: true
Ensure: PresentLCM Initialization:
$params = @{
AzureDevopsOrganizationName = "SampleAzDoOrgName"
ConfigurationDirectory = "C:\Datum\DSCOutput\"
ConfigurationUrl = 'https://configuration-path'
JITToken = 'SampleJITToken'
Mode = 'Set'
AuthenticationType = 'ManagedIdentity'
ReportPath = 'C:\Datum\DSCOutput\Reports'
}
Invoke-AzDoLCM @params- Assert-BoundParameter
- Assert-ElevatedUser
- Assert-IPAddress
- Assert-Module
- AzDoAPI_0_ProjectCache
- AzDoAPI_1_GroupCache
- AzDoAPI_2_UserCache
- AzDoAPI_3_GroupMemberCache
- AzDoAPI_4_GitRepositoryCache
- AzDoAPI_5_PermissionsCache
- AzDoAPI_6_ServicePrinciple
- AzDoAPI_7_IdentitySubjectDescriptors
- AzDoAPI_8_ProjectProcessTemplates
- AzDoAPI_9_DevOpsClassificationNodes
- Compare-DscParameterState
- Compare-ResourcePropertyState
- ConvertFrom-DscResourceInstance
- ConvertTo-Base64String
- ConvertTo-CimInstance
- ConvertTo-HashTable
- Find-Certificate
- Format-Path
- Get-AzDevOpsOperation
- Get-AzDevOpsServicesApiUri
- Get-AzDevOpsServicesUri
- AzDoAgentPool
- AzDoAgentPoolPermission
- AzDoAgentQueue
- AzDoAreaNodes
- AzDoAreaPermission
- AzDoArtifactFeed
- AzDoArtifactFeedPermission
- AzDoArtifactFeedSettings
- AzDoArtifactFeedView
- AzDoAuditStream
- AzDoBranchPolicy
- AzDoCheckConfiguration
- AzDoDeploymentGroup
- AzDoEnvironmentApproval
- AzDoEnvironmentPermission
- AzDoExtension
- AzDoGitPermission
- AzDoGitRepository
- AzDoGroupMember
- AzDoGroupPermission
- AzDoIterationNodes
- AzDoIterationPermission
- AzDoNotificationSubscription
- AzDoOrganizationGroup
- AzDoOrganizationSettings
- AzDoPipeline
- AzDoPipelineEnvironment
- AzDoPipelinePermission
- AzDoPipelineSettings
- AzDoProcess
- AzDoProcessPermission
- AzDoProject
- AzDoProjectGroup
- AzDoProjectPermission
- AzDoProjectServices
- AzDoRepositorySettings
- AzDoSecurityNamespacePermission
- AzDoServiceConnection
- AzDoServiceConnectionPermission
- AzDoServiceHook
- AzDoTaskGroup
- AzDoTeam
- AzDoTeamMember
- AzDoTeamSettings
- AzDoUserEntitlement
- AzDoVariableGroup
- AzDoVariableGroupPermission
- AzDoWiki
- AzDoWIPTags