-
Notifications
You must be signed in to change notification settings - Fork 0
AzDoGitPermission
github-actions[bot] edited this page Aug 19, 2026
·
4 revisions
| Parameter | Attribute | DataType | Description | Allowed Values |
|---|---|---|---|---|
| ProjectName | Key | System.String | Specifies the name of the Azure DevOps project. | |
| Ensure | Write | Ensure |
Present, Absent
|
|
| isInherited | Write | System.Boolean | Specifies whether the permissions are inherited from the parent repository. Default value is $true. | |
| Permissions | Write | System.Collections.Hashtable[] | ||
| RepositoryName | Write | System.String | Specifies the name of the Git repository. | |
| LookupResult | Read | System.Collections.Hashtable |
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.
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'
}
}
)
}
}
}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'
}
}
)
}
}
}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 = @()
}
}
}- Assert-BoundParameter
- Assert-ElevatedUser
- Assert-IPAddress
- Assert-Module
- AzDoAPI_0_ProjectCache
- AzDoAPI_1_GroupCache
- AzDoAPI_2_UserCache
- AzDoAPI_3_GroupMemberCache
- AzDoAPI_4_GitRepositoryCache
- AzDoAPI_5_PermissionsCache
- AzDoAPI_6_ServicePrinciple
- AzDoAPI_7_IdentitySubjectDescriptors
- AzDoAPI_8_ProjectProcessTemplates
- AzDoAPI_9_DevOpsClassificationNodes
- Compare-DscParameterState
- Compare-ResourcePropertyState
- ConvertFrom-DscResourceInstance
- ConvertTo-Base64String
- ConvertTo-CimInstance
- ConvertTo-HashTable
- Find-Certificate
- Format-Path
- Get-AzDevOpsOperation
- Get-AzDevOpsServicesApiUri
- Get-AzDevOpsServicesUri
- AzDoAgentPool
- AzDoAgentPoolPermission
- AzDoAgentQueue
- AzDoAreaNodes
- AzDoAreaPermission
- AzDoArtifactFeed
- AzDoArtifactFeedPermission
- AzDoArtifactFeedSettings
- AzDoArtifactFeedView
- AzDoAuditStream
- AzDoBranchPolicy
- AzDoCheckConfiguration
- AzDoDeploymentGroup
- AzDoEnvironmentApproval
- AzDoEnvironmentPermission
- AzDoExtension
- AzDoGitPermission
- AzDoGitRepository
- AzDoGroupMember
- AzDoGroupPermission
- AzDoIterationNodes
- AzDoIterationPermission
- AzDoNotificationSubscription
- AzDoOrganizationGroup
- AzDoOrganizationSettings
- AzDoPipeline
- AzDoPipelineEnvironment
- AzDoPipelinePermission
- AzDoPipelineSettings
- AzDoProcess
- AzDoProcessPermission
- AzDoProject
- AzDoProjectGroup
- AzDoProjectPermission
- AzDoProjectServices
- AzDoRepositorySettings
- AzDoSecurityNamespacePermission
- AzDoServiceConnection
- AzDoServiceConnectionPermission
- AzDoServiceHook
- AzDoTaskGroup
- AzDoTeam
- AzDoTeamMember
- AzDoTeamSettings
- AzDoUserEntitlement
- AzDoVariableGroup
- AzDoVariableGroupPermission
- AzDoWiki
- AzDoWIPTags