en-US/about_AzDoServiceConnection.help.txt

.NAME
    AzDoServiceConnection
 
.SYNOPSIS
    DSC resource for managing Azure DevOps service connections.
 
.DESCRIPTION
 
 
.PARAMETER ProjectName
    Key - System.String
 
.PARAMETER ConnectionName
    Required - System.String
 
.PARAMETER ConnectionType
    Required - System.String
 
.PARAMETER Description
    Write - System.String
 
.PARAMETER AllowAllPipelines
    Write - System.Boolean
 
.PARAMETER Authorization
    Write - HashTable
 
.PARAMETER Data
    Write - HashTable
 
.EXAMPLE 1
 
This example shows how to create an Azure Resource Manager service connection in an Azure DevOps project.
 
Configuration Example
{
    Import-DscResource -ModuleName 'AzureDevOpsDscNative'
 
    node localhost
    {
        AzDoServiceConnection 'AddAzDoServiceConnection'
        {
            Ensure = 'Present'
            ProjectName = 'MyProject'
            ConnectionName = 'MyAzureServiceConnection'
            ConnectionType = 'AzureRM'
            Description = 'Connection to Azure subscription'
            AllowAllPipelines = $true
            Authorization = @{
                tenantId = '00000000-0000-0000-0000-000000000000'
                servicePrincipalId = '00000000-0000-0000-0000-000000000001'
                authenticationType = 'spnKey'
            }
            Data = @{
                subscriptionId = '00000000-0000-0000-0000-000000000002'
                subscriptionName = 'My Azure Subscription'
            }
        }
    }
}
 
.EXAMPLE 2
 
This example shows how to update an existing service connection in an Azure DevOps project.
 
Configuration Example
{
    Import-DscResource -ModuleName 'AzureDevOpsDscNative'
 
    node localhost
    {
        AzDoServiceConnection 'UpdateAzDoServiceConnection'
        {
            Ensure = 'Present'
            ProjectName = 'MyProject'
            ConnectionName = 'MyAzureServiceConnection'
            ConnectionType = 'AzureRM'
            Description = 'Connection to Azure subscription - updated'
            AllowAllPipelines = $false
            Authorization = @{
                tenantId = '00000000-0000-0000-0000-000000000000'
                servicePrincipalId = '00000000-0000-0000-0000-000000000001'
                authenticationType = 'spnKey'
            }
            Data = @{
                subscriptionId = '00000000-0000-0000-0000-000000000002'
                subscriptionName = 'My Azure Subscription'
            }
        }
    }
}
 
.EXAMPLE 3
 
This example shows how to remove a service connection from an Azure DevOps project.
 
Configuration Example
{
    Import-DscResource -ModuleName 'AzureDevOpsDscNative'
 
    node localhost
    {
        AzDoServiceConnection 'RemoveAzDoServiceConnection'
        {
            Ensure = 'Absent'
            ProjectName = 'MyProject'
            ConnectionName = 'MyAzureServiceConnection'
            ConnectionType = 'AzureRM'
        }
    }
}