en-US/about_AzDoNotificationSubscription.help.txt

.NAME
    AzDoNotificationSubscription
 
.SYNOPSIS
    DSC resource for managing Azure DevOps notification subscriptions.
 
.DESCRIPTION
 
 
.PARAMETER SubscriptionName
    Key - System.String
 
.PARAMETER EventType
    Required - System.String
 
.PARAMETER ChannelType
    Required - System.String
 
.PARAMETER Subscriber
    Required - System.String
 
.PARAMETER ProjectName
    Write - System.String
 
.PARAMETER Filter
    Write - HashTable
 
.PARAMETER Enabled
    Write - System.Boolean
 
.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'
        }
    }
}