en-US/about_AzDoServiceConnection.help.txt
|
.NAME
AzDoServiceConnection .SYNOPSIS DSC resource for managing Azure DevOps service connections. .DESCRIPTION This resource manages service connections in Azure DevOps, enabling pipelines to connect to external services such as Azure subscriptions, GitHub repositories, or Kubernetes clusters. .PARAMETER ProjectName Key - System.String The name of the Azure DevOps project. This property is mandatory and serves as a key property for the resource. .PARAMETER ConnectionName Required - System.String The name of the service connection. This is a key property. .PARAMETER ConnectionType Required - System.String The type of service connection (e.g., AzureRM, GitHub, Kubernetes). This is a mandatory property. .PARAMETER Description Write - System.String An optional description for the service connection. .PARAMETER AllowAllPipelines Write - System.Boolean Whether all pipelines can use this service connection. Defaults to $false. .PARAMETER Authorization Write - HashTable A hashtable of authorization parameters specific to the connection type. .PARAMETER Data Write - HashTable A hashtable of additional data parameters specific to the connection type. .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' } } } |