en-US/about_AzDoSecurityNamespacePermission.help.txt
|
.NAME
AzDoSecurityNamespacePermission .SYNOPSIS DSC resource for managing generic Azure DevOps security namespace permissions. .DESCRIPTION This resource provides low-level access to Azure DevOps security namespaces, allowing fine- grained permission control over any object in the system. It is the escape hatch for namespaces with no dedicated resource. ### Prefer a dedicated resource where one exists This resource takes a caller-supplied Token string, and constructing that token correctly is the hard and error-prone part ? the shape differs per namespace, and a wrong token silently targets nothing. The dedicated resources build it for you from readable names: | Namespace | Dedicated resource | |---|---| | Git Repositories | AzDoGitPermission.md | | CSS | AzDoAreaPermission.md | | Iteration | AzDoIterationPermission.md | | Project | AzDoProjectPermission.md | | Process | AzDoProcessPermission.md | | Build | AzDoPipelinePermission.md, AzDoPipelineFolderPermission.md | | Library | AzDoVariableGroupPermission.md, AzDoSecureFilePermission.md | | ServiceEndpoints | AzDoServiceConnectionPermission.md | | AgentPool, DistributedTask | AzDoAgentPoolPermission.md, AzDoEnvironmentPermission.md | | WorkItemQueryFolders | AzDoQueryPermission.md | Use this resource for anything not in that list. ### Permission names come from the namespace Do not assume a fixed set of action names. Read them from _apis/securitynamespaces/{namespaceId} ? they differ per namespace and have changed between API versions. .PARAMETER SecurityNamespace Key - System.String The name of the Azure DevOps security namespace (e.g., Build, Git Repositories, Project). This property is mandatory and serves as a key property for the resource. .PARAMETER Token Required - System.String The security token identifying the specific object within the namespace. This is a key property. .PARAMETER GroupName Required - System.String The name of the group to grant permissions to. This is a key property. Use the format [ProjectName]\GroupName. .PARAMETER isInherited Write - System.Boolean Whether permissions are inherited. Defaults to $true. .PARAMETER Permissions Write - HashTable[] .EXAMPLE 1 This example shows how to grant permissions within a security namespace in Azure DevOps. Configuration Example { Import-DscResource -ModuleName 'AzureDevOpsDscNative' node localhost { AzDoSecurityNamespacePermission 'AddAzDoSecurityNamespacePermission' { Ensure = 'Present' SecurityNamespace = 'Build' Token = 'repoV2/00000000-0000-0000-0000-000000000001' GroupName = '[MyProject]\Contributors' isInherited = $true Permissions = @( @{ Permission = 'ViewBuilds'; Access = 'Allow' } @{ Permission = 'QueueBuilds'; Access = 'Allow' } ) } } } .EXAMPLE 2 This example shows how to update permissions within a security namespace in Azure DevOps. Configuration Example { Import-DscResource -ModuleName 'AzureDevOpsDscNative' node localhost { AzDoSecurityNamespacePermission 'UpdateAzDoSecurityNamespacePermission' { Ensure = 'Present' SecurityNamespace = 'Build' Token = 'repoV2/00000000-0000-0000-0000-000000000001' GroupName = '[MyProject]\Contributors' isInherited = $false Permissions = @( @{ Permission = 'ViewBuilds'; Access = 'Allow' } @{ Permission = 'QueueBuilds'; Access = 'Allow' } @{ Permission = 'DeleteBuilds'; Access = 'Deny' } ) } } } .EXAMPLE 3 This example shows how to remove permissions within a security namespace in Azure DevOps. Configuration Example { Import-DscResource -ModuleName 'AzureDevOpsDscNative' node localhost { AzDoSecurityNamespacePermission 'RemoveAzDoSecurityNamespacePermission' { Ensure = 'Absent' SecurityNamespace = 'Build' Token = 'repoV2/00000000-0000-0000-0000-000000000001' GroupName = '[MyProject]\Contributors' } } } |