en-US/about_AzDoGitPermission.help.txt
|
.NAME
AzDoGitPermission .SYNOPSIS This class represents an Azure DevOps DSC resource for managing Git permissions. .DESCRIPTION The AzDoGitPermission class is a DSC resource that allows you to manage Git permissions in Azure DevOps. It inherits from the AzDevOpsDscResourceBase class and provides properties and methods for managing Git permissions. .PARAMETER ProjectName Key - System.String Specifies the name of the Azure DevOps project. .PARAMETER RepositoryName Write - System.String Specifies the name of the Git repository. .PARAMETER isInherited Write - System.Boolean Specifies whether the permissions are inherited from the parent repository. Default value is $true. .PARAMETER Permissions Write - HashTable[] .EXAMPLE 1 This example shows how to ensure that the Git repository permissions. Configuration Example { Import-DscResource -ModuleName 'AzureDevOpsDscNative' node localhost { AzDoGitPermission 'AddGitPermission' { Ensure = 'Present' ProjectName = 'Test Project' RepositoryName = 'Test Repository' isInherited = $true Permissions = @( @{ Identity = '[Project]\Contributors' Permission = @{ read = 'allow' contribute = 'allow' } }, @{ Identity = '[Project]\Readers' Permission = @{ read = 'allow' } } ) } } } .EXAMPLE 2 This example shows how to update the Git repository permissions. Configuration Example { Import-DscResource -ModuleName 'AzureDevOpsDscNative' node localhost { AzDoGitPermission 'UpdateGitPermission' { Ensure = 'Present' ProjectName = 'Test Project' RepositoryName = 'Test Repository' isInherited = $true Permissions = @( @{ Identity = '[Project]\Contributors' Permission = @{ read = 'allow' contribute = 'deny' } }, @{ Identity = '[Project]\Readers' Permission = @{ read = 'deny' } } ) } } } .EXAMPLE 3 This example shows how to remove Git repository permissions. Configuration Example { Import-DscResource -ModuleName 'AzureDevOpsDscNative' node localhost { AzDoGitPermission 'DeleteGitPermission' { Ensure = 'Present' ProjectName = 'Test Project' RepositoryName = 'Test Repository' isInherited = $true # Note: Permissions can be empty to remove all permissions # Ensure = 'Absent' is not required. Permissions = @() } } } |