en-US/about_AzDoAreaPermission.help.txt
|
.NAME
AzDoAreaPermission .SYNOPSIS Defines a DSC resource for managing Azure DevOps area permissions. .DESCRIPTION The AzDoAreaPermission class is a DSC resource that allows you to manage permissions for specific areas in an Azure DevOps project. It inherits from the AzDevOpsDscResourceBase class and provides methods for retrieving and setting the desired state of area permissions. .PARAMETER ProjectName Key - System.String Specifies the name of the Azure DevOps project. This is a mandatory key property. .PARAMETER AreaPath Write - System.String Specifies the path of the area within the Azure DevOps project. Defaults to $null. .PARAMETER isInherited Write - System.Boolean Indicates whether the permissions are inherited. Defaults to $true. .PARAMETER Permissions Write - HashTable[] Specifies a hashtable array of permissions to be applied to the area. .EXAMPLE 1 This example shows how to add the Area Path permissions. Configuration Example { Import-DscResource -ModuleName 'AzureDevOpsDscNative' node localhost { AzDoAreaPermission 'AddAzDoAreaPermission' { Ensure = 'Present' ProjectName = 'Test Project' AreaPath = '\Test Area\Sub Area' isInherited = $false Permissions = @( @{ Identity = '[Test Project]\Test Team' Permission = @{ 'WORK_ITEM_READ' = 'Allow' 'GENERIC_WRITE' = 'Allow' } } ) } } } .EXAMPLE 2 This example shows how to update Area Path permissions. Configuration Example { Import-DscResource -ModuleName 'AzureDevOpsDscNative' node localhost { AzDoAreaPermission 'UpdateAzDoAreaPermission' { Ensure = 'Present' ProjectName = 'Test Project' AreaPath = '\Test Area\Sub Area' isInherited = $false Permissions = @( @{ Identity = '[Test Project]\Test Team' Permission = @{ 'WORK_ITEM_READ' = 'Allow' 'GENERIC_WRITE' = 'Allow' } } ) } } } .EXAMPLE 3 This example shows how to remove Area Path permissions. Configuration Example { Import-DscResource -ModuleName 'AzureDevOpsDscNative' node localhost { AzDoAreaPermission 'DeleteAreaPathPermission' { Ensure = 'Present' ProjectName = 'Test Project' AreaPath = '\Test Area\Sub Area' isInherited = $false # Note: Permissions can be empty to remove all permissions # Ensure = 'Absent' is not required. # Please note that by setting isInherited to $true, the permissions will be inherited from the parent area path. # If you want to remove all permissions, you can set isInherited to $false and provide an empty Permissions array. Permissions = @() } } } |