-
Notifications
You must be signed in to change notification settings - Fork 0
AzDoNotificationSubscription
Michael Zanatta edited this page Aug 19, 2026
·
4 revisions
AzDoNotificationSubscription [string] #ResourceName
{
SubscriptionName = [String]$SubscriptionName
EventType = [String]$EventType
ChannelType = [String]$ChannelType
Subscriber = [String]$Subscriber
[ ProjectName = [String]$ProjectName ]
[ Filter = [HashTable]$Filter ]
[ Enabled = [Boolean]$Enabled ]
[ Ensure = [String] {'Present', 'Absent'} ]
}- SubscriptionName: A descriptive name for the subscription. This property is mandatory and serves as a key property for the resource.
-
EventType: The type of event to subscribe to. This is a key property. Common values include
ms.vss-build.build-completed-failed-id,ms.vss-code.git-push, andms.vss-code.git-pullrequest-created. -
ChannelType: The delivery channel for notifications. Common values:
EmailHtml,EmailPlainText. - Subscriber: The email address or group descriptor of the notification recipient. This is a mandatory property.
- ProjectName: The project to scope the subscription to. If omitted, applies organization-wide.
- Filter: A hashtable specifying event filter criteria.
-
Enabled: Whether the subscription is active. Defaults to
$true. -
Ensure: Specifies whether the subscription should exist. Valid values are
PresentandAbsent.
This resource manages Azure DevOps notification subscriptions, which deliver alerts about project events (builds, pull requests, work items, etc.) to email addresses or other subscribers.
Configuration ExampleConfig {
Import-DscResource -ModuleName 'AzureDevOpsDscNative'
Node localhost {
AzDoNotificationSubscription BuildFailureNotification {
Ensure = 'Present'
SubscriptionName = 'BuildFailureAlert'
EventType = 'ms.vss-build.build-completed-failed-id'
ChannelType = 'EmailHtml'
Subscriber = 'team@example.com'
ProjectName = 'MyProject'
Enabled = $true
}
}
}
Start-DscConfiguration -Path ./ExampleConfig -Wait -Verbose# Return the current configuration for AzDoNotificationSubscription
$properties = @{
SubscriptionName = 'BuildFailureAlert'
EventType = 'ms.vss-build.build-completed-failed-id'
}
Invoke-DscResource -Name 'AzDoNotificationSubscription' -Method Get -Property $properties -ModuleName 'AzureDevOpsDscNative'parameters: {}
variables: {
ProjectName: MyProject
}
resources:
- name: Build Failure Alert
type: AzureDevOpsDscNative/AzDoNotificationSubscription
dependsOn:
- AzureDevOpsDscNative/AzDoProject/MyProject
properties:
SubscriptionName: BuildFailureAlert
EventType: ms.vss-build.build-completed-failed-id
ChannelType: EmailHtml
Subscriber: team@example.com
ProjectName: $ProjectName
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-DscPipelineRunner @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