Skip to content

AzDoNotificationSubscription

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

Parameters

Parameter Attribute DataType Description Allowed Values
SubscriptionName Key System.String
ChannelType Required System.String
EventType Required System.String
Subscriber Required System.String
Enabled Write System.Boolean
Ensure Write Ensure Present, Absent
Filter Write System.Collections.Hashtable
ProjectName Write System.String
LookupResult Read System.Collections.Hashtable

Description

Examples

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'
        }
    }
}

Commands

Resources

Clone this wiki locally