Skip to content

AzDoVariableGroupPermission

github-actions[bot] edited this page Aug 19, 2026 · 4 revisions

Parameters

Parameter Attribute DataType Description Allowed Values
ProjectName Key System.String
GroupName Required System.String
VariableGroupName Required System.String
Ensure Write Ensure Present, Absent
isInherited Write System.Boolean
Permissions Write System.Collections.Hashtable[]
LookupResult Read System.Collections.Hashtable

Description

Examples

Example 1

This example shows how to grant permissions on a variable group in an Azure DevOps project.

Configuration Example
{
    Import-DscResource -ModuleName 'AzureDevOpsDscNative'

    node localhost
    {
        AzDoVariableGroupPermission 'AddAzDoVariableGroupPermission'
        {
            Ensure            = 'Present'
            ProjectName       = 'MyProject'
            VariableGroupName = 'MyVariableGroup'
            GroupName         = '[MyProject]\Contributors'
            isInherited       = $true
            Permissions       = @(
                @{ Permission = 'Use'; Access = 'Allow' }
            )
        }
    }
}

Example 2

This example shows how to update permissions on a variable group in an Azure DevOps project.

Configuration Example
{
    Import-DscResource -ModuleName 'AzureDevOpsDscNative'

    node localhost
    {
        AzDoVariableGroupPermission 'UpdateAzDoVariableGroupPermission'
        {
            Ensure            = 'Present'
            ProjectName       = 'MyProject'
            VariableGroupName = 'MyVariableGroup'
            GroupName         = '[MyProject]\Contributors'
            isInherited       = $false
            Permissions       = @(
                @{ Permission = 'Use'; Access = 'Allow' }
                @{ Permission = 'Administer'; Access = 'Deny' }
            )
        }
    }
}

Example 3

This example shows how to remove permissions on a variable group in an Azure DevOps project.

Configuration Example
{
    Import-DscResource -ModuleName 'AzureDevOpsDscNative'

    node localhost
    {
        AzDoVariableGroupPermission 'RemoveAzDoVariableGroupPermission'
        {
            Ensure            = 'Absent'
            ProjectName       = 'MyProject'
            VariableGroupName = 'MyVariableGroup'
            GroupName         = '[MyProject]\Contributors'
        }
    }
}

Commands

Resources

Clone this wiki locally