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 BranchName Write - System.String Optional. Targets a single branch's ACL (the 'refs/heads/{BranchName}' token) rather than the repository's own ACL. Write it as a bare ref name, e.g. 'main' or 'release/1.0' - a leading 'refs/heads/' is accepted and stripped for comparison, but the value stored back is always what the configuration supplied. Requires RepositoryName. Mutually exclusive with TagName. .PARAMETER TagName Write - System.String Optional. Targets a single tag's ACL (the 'refs/tags/{TagName}' token) rather than the repository's own ACL. Same rules as BranchName. Requires RepositoryName. Mutually exclusive with BranchName. .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 = @() } } } |