en-US/about_AzDoNotificationSubscription.help.txt

.NAME
    AzDoNotificationSubscription
 
.SYNOPSIS
    DSC resource for managing Azure DevOps notification subscriptions.
 
.DESCRIPTION
    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.
 
.PARAMETER SubscriptionName
    Key - System.String
    A descriptive name for the subscription. This property is mandatory and serves as a key property for the resource.
 
.PARAMETER EventType
    Required - System.String
    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, and ms.vss-code.git-pullrequest-created.
 
.PARAMETER ChannelType
    Required - System.String
    The delivery channel for notifications. Common values: EmailHtml, EmailPlainText.
 
.PARAMETER Subscriber
    Required - System.String
    The email address or group descriptor of the notification recipient. This is a mandatory property.
 
.PARAMETER ProjectName
    Write - System.String
    The project to scope the subscription to. If omitted, applies organization-wide.
 
.PARAMETER Filter
    Write - HashTable
    A hashtable specifying event filter criteria.
 
.PARAMETER Enabled
    Write - System.Boolean
    Whether the subscription is active. Defaults to $true.
 
.EXAMPLE 1
 
This example shows how to create a notification subscription in Azure DevOps.
 
Configuration Example
{
    Import-DscResource -ModuleName 'AzureDevOpsDscNative'
 
    node localhost
    {
        AzDoNotificationSubscription 'AddAzDoNotificationSubscription'
        {
            Ensure = 'Present'
            SubscriptionName = 'BuildFailureAlert'
            EventType = 'ms.vss-build.build-completed-failed-id'
            ChannelType = 'EmailHtml'
            Subscriber = 'team@example.com'
            ProjectName = 'MyProject'
            Enabled = $true
        }
    }
}
 
.EXAMPLE 2
 
This example shows how to update a notification subscription in Azure DevOps.
 
Configuration Example
{
    Import-DscResource -ModuleName 'AzureDevOpsDscNative'
 
    node localhost
    {
        AzDoNotificationSubscription 'UpdateAzDoNotificationSubscription'
        {
            Ensure = 'Present'
            SubscriptionName = 'BuildFailureAlert'
            EventType = 'ms.vss-build.build-completed-failed-id'
            ChannelType = 'EmailHtml'
            Subscriber = 'oncall@example.com'
            ProjectName = 'MyProject'
            Enabled = $true
            Filter = @{
                criteria = @{
                    clauses = @(
                        @{ fieldName = 'Build reason'; operator = '='; value = 'Manual' }
                    )
                }
            }
        }
    }
}
 
.EXAMPLE 3
 
This example shows how to remove a notification subscription from Azure DevOps.
 
Configuration Example
{
    Import-DscResource -ModuleName 'AzureDevOpsDscNative'
 
    node localhost
    {
        AzDoNotificationSubscription 'RemoveAzDoNotificationSubscription'
        {
            Ensure = 'Absent'
            SubscriptionName = 'BuildFailureAlert'
            EventType = 'ms.vss-build.build-completed-failed-id'
        }
    }
}