1. Packages
  2. Azure DevOps Provider
  3. API Docs
  4. TaggingPermissions
Azure DevOps v3.8.0 published on Monday, Mar 17, 2025 by Pulumi

azuredevops.TaggingPermissions

Explore with Pulumi AI

Manages permissions for tagging

Permission levels

Permissions for tagging within Azure DevOps can be applied only on Organizational and Project level. The project level is reflected by specifying the argument project_id, otherwise the permissions are set on the organizational level.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azuredevops from "@pulumi/azuredevops";

const example = new azuredevops.Project("example", {
    name: "Example Project",
    workItemTemplate: "Agile",
    versionControl: "Git",
    visibility: "private",
    description: "Managed by Pulumi",
});
const example_readers = azuredevops.getGroupOutput({
    projectId: example.id,
    name: "Readers",
});
const example_permissions = new azuredevops.TaggingPermissions("example-permissions", {
    projectId: example.id,
    principal: example_readers.apply(example_readers => example_readers.id),
    permissions: {
        Enumerate: "allow",
        Create: "allow",
        Update: "allow",
        Delete: "allow",
    },
});
Copy
import pulumi
import pulumi_azuredevops as azuredevops

example = azuredevops.Project("example",
    name="Example Project",
    work_item_template="Agile",
    version_control="Git",
    visibility="private",
    description="Managed by Pulumi")
example_readers = azuredevops.get_group_output(project_id=example.id,
    name="Readers")
example_permissions = azuredevops.TaggingPermissions("example-permissions",
    project_id=example.id,
    principal=example_readers.id,
    permissions={
        "Enumerate": "allow",
        "Create": "allow",
        "Update": "allow",
        "Delete": "allow",
    })
Copy
package main

import (
	"github.com/pulumi/pulumi-azuredevops/sdk/v3/go/azuredevops"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := azuredevops.NewProject(ctx, "example", &azuredevops.ProjectArgs{
			Name:             pulumi.String("Example Project"),
			WorkItemTemplate: pulumi.String("Agile"),
			VersionControl:   pulumi.String("Git"),
			Visibility:       pulumi.String("private"),
			Description:      pulumi.String("Managed by Pulumi"),
		})
		if err != nil {
			return err
		}
		example_readers := azuredevops.LookupGroupOutput(ctx, azuredevops.GetGroupOutputArgs{
			ProjectId: example.ID(),
			Name:      pulumi.String("Readers"),
		}, nil)
		_, err = azuredevops.NewTaggingPermissions(ctx, "example-permissions", &azuredevops.TaggingPermissionsArgs{
			ProjectId: example.ID(),
			Principal: pulumi.String(example_readers.ApplyT(func(example_readers azuredevops.GetGroupResult) (*string, error) {
				return &example_readers.Id, nil
			}).(pulumi.StringPtrOutput)),
			Permissions: pulumi.StringMap{
				"Enumerate": pulumi.String("allow"),
				"Create":    pulumi.String("allow"),
				"Update":    pulumi.String("allow"),
				"Delete":    pulumi.String("allow"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureDevOps = Pulumi.AzureDevOps;

return await Deployment.RunAsync(() => 
{
    var example = new AzureDevOps.Project("example", new()
    {
        Name = "Example Project",
        WorkItemTemplate = "Agile",
        VersionControl = "Git",
        Visibility = "private",
        Description = "Managed by Pulumi",
    });

    var example_readers = AzureDevOps.GetGroup.Invoke(new()
    {
        ProjectId = example.Id,
        Name = "Readers",
    });

    var example_permissions = new AzureDevOps.TaggingPermissions("example-permissions", new()
    {
        ProjectId = example.Id,
        Principal = example_readers.Apply(example_readers => example_readers.Apply(getGroupResult => getGroupResult.Id)),
        Permissions = 
        {
            { "Enumerate", "allow" },
            { "Create", "allow" },
            { "Update", "allow" },
            { "Delete", "allow" },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azuredevops.Project;
import com.pulumi.azuredevops.ProjectArgs;
import com.pulumi.azuredevops.AzuredevopsFunctions;
import com.pulumi.azuredevops.inputs.GetGroupArgs;
import com.pulumi.azuredevops.TaggingPermissions;
import com.pulumi.azuredevops.TaggingPermissionsArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var example = new Project("example", ProjectArgs.builder()
            .name("Example Project")
            .workItemTemplate("Agile")
            .versionControl("Git")
            .visibility("private")
            .description("Managed by Pulumi")
            .build());

        final var example-readers = AzuredevopsFunctions.getGroup(GetGroupArgs.builder()
            .projectId(example.id())
            .name("Readers")
            .build());

        var example_permissions = new TaggingPermissions("example-permissions", TaggingPermissionsArgs.builder()
            .projectId(example.id())
            .principal(example_readers.applyValue(example_readers -> example_readers.id()))
            .permissions(Map.ofEntries(
                Map.entry("Enumerate", "allow"),
                Map.entry("Create", "allow"),
                Map.entry("Update", "allow"),
                Map.entry("Delete", "allow")
            ))
            .build());

    }
}
Copy
resources:
  example:
    type: azuredevops:Project
    properties:
      name: Example Project
      workItemTemplate: Agile
      versionControl: Git
      visibility: private
      description: Managed by Pulumi
  example-permissions:
    type: azuredevops:TaggingPermissions
    properties:
      projectId: ${example.id}
      principal: ${["example-readers"].id}
      permissions:
        Enumerate: allow
        Create: allow
        Update: allow
        Delete: allow
variables:
  example-readers:
    fn::invoke:
      function: azuredevops:getGroup
      arguments:
        projectId: ${example.id}
        name: Readers
Copy

PAT Permissions Required

  • Project & Team: vso.security_manage - Grants the ability to read, write, and manage security permissions.

Create TaggingPermissions Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new TaggingPermissions(name: string, args: TaggingPermissionsArgs, opts?: CustomResourceOptions);
@overload
def TaggingPermissions(resource_name: str,
                       args: TaggingPermissionsArgs,
                       opts: Optional[ResourceOptions] = None)

@overload
def TaggingPermissions(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       permissions: Optional[Mapping[str, str]] = None,
                       principal: Optional[str] = None,
                       project_id: Optional[str] = None,
                       replace: Optional[bool] = None)
func NewTaggingPermissions(ctx *Context, name string, args TaggingPermissionsArgs, opts ...ResourceOption) (*TaggingPermissions, error)
public TaggingPermissions(string name, TaggingPermissionsArgs args, CustomResourceOptions? opts = null)
public TaggingPermissions(String name, TaggingPermissionsArgs args)
public TaggingPermissions(String name, TaggingPermissionsArgs args, CustomResourceOptions options)
type: azuredevops:TaggingPermissions
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. TaggingPermissionsArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. TaggingPermissionsArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. TaggingPermissionsArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. TaggingPermissionsArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. TaggingPermissionsArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var taggingPermissionsResource = new AzureDevOps.TaggingPermissions("taggingPermissionsResource", new()
{
    Permissions = 
    {
        { "string", "string" },
    },
    Principal = "string",
    ProjectId = "string",
    Replace = false,
});
Copy
example, err := azuredevops.NewTaggingPermissions(ctx, "taggingPermissionsResource", &azuredevops.TaggingPermissionsArgs{
	Permissions: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	Principal: pulumi.String("string"),
	ProjectId: pulumi.String("string"),
	Replace:   pulumi.Bool(false),
})
Copy
var taggingPermissionsResource = new TaggingPermissions("taggingPermissionsResource", TaggingPermissionsArgs.builder()
    .permissions(Map.of("string", "string"))
    .principal("string")
    .projectId("string")
    .replace(false)
    .build());
Copy
tagging_permissions_resource = azuredevops.TaggingPermissions("taggingPermissionsResource",
    permissions={
        "string": "string",
    },
    principal="string",
    project_id="string",
    replace=False)
Copy
const taggingPermissionsResource = new azuredevops.TaggingPermissions("taggingPermissionsResource", {
    permissions: {
        string: "string",
    },
    principal: "string",
    projectId: "string",
    replace: false,
});
Copy
type: azuredevops:TaggingPermissions
properties:
    permissions:
        string: string
    principal: string
    projectId: string
    replace: false
Copy

TaggingPermissions Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The TaggingPermissions resource accepts the following input properties:

Permissions This property is required. Dictionary<string, string>

the permissions to assign. The following permissions are available.

| Name | Permission Description | |-----------|---------------------------| | Enumerate | Enumerate tag definitions | | Create | Create tag definition | | Update | Update tag definition | | Delete | Delete tag definition |

Principal
This property is required.
Changes to this property will trigger replacement.
string
The group or user principal to assign the permissions.
ProjectId Changes to this property will trigger replacement. string
The ID of the project to assign the permissions. If omitted, organization wide permissions for tagging are managed.
Replace bool
Replace (true) or merge (false) the permissions. Default: true
Permissions This property is required. map[string]string

the permissions to assign. The following permissions are available.

| Name | Permission Description | |-----------|---------------------------| | Enumerate | Enumerate tag definitions | | Create | Create tag definition | | Update | Update tag definition | | Delete | Delete tag definition |

Principal
This property is required.
Changes to this property will trigger replacement.
string
The group or user principal to assign the permissions.
ProjectId Changes to this property will trigger replacement. string
The ID of the project to assign the permissions. If omitted, organization wide permissions for tagging are managed.
Replace bool
Replace (true) or merge (false) the permissions. Default: true
permissions This property is required. Map<String,String>

the permissions to assign. The following permissions are available.

| Name | Permission Description | |-----------|---------------------------| | Enumerate | Enumerate tag definitions | | Create | Create tag definition | | Update | Update tag definition | | Delete | Delete tag definition |

principal
This property is required.
Changes to this property will trigger replacement.
String
The group or user principal to assign the permissions.
projectId Changes to this property will trigger replacement. String
The ID of the project to assign the permissions. If omitted, organization wide permissions for tagging are managed.
replace Boolean
Replace (true) or merge (false) the permissions. Default: true
permissions This property is required. {[key: string]: string}

the permissions to assign. The following permissions are available.

| Name | Permission Description | |-----------|---------------------------| | Enumerate | Enumerate tag definitions | | Create | Create tag definition | | Update | Update tag definition | | Delete | Delete tag definition |

principal
This property is required.
Changes to this property will trigger replacement.
string
The group or user principal to assign the permissions.
projectId Changes to this property will trigger replacement. string
The ID of the project to assign the permissions. If omitted, organization wide permissions for tagging are managed.
replace boolean
Replace (true) or merge (false) the permissions. Default: true
permissions This property is required. Mapping[str, str]

the permissions to assign. The following permissions are available.

| Name | Permission Description | |-----------|---------------------------| | Enumerate | Enumerate tag definitions | | Create | Create tag definition | | Update | Update tag definition | | Delete | Delete tag definition |

principal
This property is required.
Changes to this property will trigger replacement.
str
The group or user principal to assign the permissions.
project_id Changes to this property will trigger replacement. str
The ID of the project to assign the permissions. If omitted, organization wide permissions for tagging are managed.
replace bool
Replace (true) or merge (false) the permissions. Default: true
permissions This property is required. Map<String>

the permissions to assign. The following permissions are available.

| Name | Permission Description | |-----------|---------------------------| | Enumerate | Enumerate tag definitions | | Create | Create tag definition | | Update | Update tag definition | | Delete | Delete tag definition |

principal
This property is required.
Changes to this property will trigger replacement.
String
The group or user principal to assign the permissions.
projectId Changes to this property will trigger replacement. String
The ID of the project to assign the permissions. If omitted, organization wide permissions for tagging are managed.
replace Boolean
Replace (true) or merge (false) the permissions. Default: true

Outputs

All input properties are implicitly available as output properties. Additionally, the TaggingPermissions resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing TaggingPermissions Resource

Get an existing TaggingPermissions resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: TaggingPermissionsState, opts?: CustomResourceOptions): TaggingPermissions
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        permissions: Optional[Mapping[str, str]] = None,
        principal: Optional[str] = None,
        project_id: Optional[str] = None,
        replace: Optional[bool] = None) -> TaggingPermissions
func GetTaggingPermissions(ctx *Context, name string, id IDInput, state *TaggingPermissionsState, opts ...ResourceOption) (*TaggingPermissions, error)
public static TaggingPermissions Get(string name, Input<string> id, TaggingPermissionsState? state, CustomResourceOptions? opts = null)
public static TaggingPermissions get(String name, Output<String> id, TaggingPermissionsState state, CustomResourceOptions options)
resources:  _:    type: azuredevops:TaggingPermissions    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Permissions Dictionary<string, string>

the permissions to assign. The following permissions are available.

| Name | Permission Description | |-----------|---------------------------| | Enumerate | Enumerate tag definitions | | Create | Create tag definition | | Update | Update tag definition | | Delete | Delete tag definition |

Principal Changes to this property will trigger replacement. string
The group or user principal to assign the permissions.
ProjectId Changes to this property will trigger replacement. string
The ID of the project to assign the permissions. If omitted, organization wide permissions for tagging are managed.
Replace bool
Replace (true) or merge (false) the permissions. Default: true
Permissions map[string]string

the permissions to assign. The following permissions are available.

| Name | Permission Description | |-----------|---------------------------| | Enumerate | Enumerate tag definitions | | Create | Create tag definition | | Update | Update tag definition | | Delete | Delete tag definition |

Principal Changes to this property will trigger replacement. string
The group or user principal to assign the permissions.
ProjectId Changes to this property will trigger replacement. string
The ID of the project to assign the permissions. If omitted, organization wide permissions for tagging are managed.
Replace bool
Replace (true) or merge (false) the permissions. Default: true
permissions Map<String,String>

the permissions to assign. The following permissions are available.

| Name | Permission Description | |-----------|---------------------------| | Enumerate | Enumerate tag definitions | | Create | Create tag definition | | Update | Update tag definition | | Delete | Delete tag definition |

principal Changes to this property will trigger replacement. String
The group or user principal to assign the permissions.
projectId Changes to this property will trigger replacement. String
The ID of the project to assign the permissions. If omitted, organization wide permissions for tagging are managed.
replace Boolean
Replace (true) or merge (false) the permissions. Default: true
permissions {[key: string]: string}

the permissions to assign. The following permissions are available.

| Name | Permission Description | |-----------|---------------------------| | Enumerate | Enumerate tag definitions | | Create | Create tag definition | | Update | Update tag definition | | Delete | Delete tag definition |

principal Changes to this property will trigger replacement. string
The group or user principal to assign the permissions.
projectId Changes to this property will trigger replacement. string
The ID of the project to assign the permissions. If omitted, organization wide permissions for tagging are managed.
replace boolean
Replace (true) or merge (false) the permissions. Default: true
permissions Mapping[str, str]

the permissions to assign. The following permissions are available.

| Name | Permission Description | |-----------|---------------------------| | Enumerate | Enumerate tag definitions | | Create | Create tag definition | | Update | Update tag definition | | Delete | Delete tag definition |

principal Changes to this property will trigger replacement. str
The group or user principal to assign the permissions.
project_id Changes to this property will trigger replacement. str
The ID of the project to assign the permissions. If omitted, organization wide permissions for tagging are managed.
replace bool
Replace (true) or merge (false) the permissions. Default: true
permissions Map<String>

the permissions to assign. The following permissions are available.

| Name | Permission Description | |-----------|---------------------------| | Enumerate | Enumerate tag definitions | | Create | Create tag definition | | Update | Update tag definition | | Delete | Delete tag definition |

principal Changes to this property will trigger replacement. String
The group or user principal to assign the permissions.
projectId Changes to this property will trigger replacement. String
The ID of the project to assign the permissions. If omitted, organization wide permissions for tagging are managed.
replace Boolean
Replace (true) or merge (false) the permissions. Default: true

Import

The resource does not support import.

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Azure DevOps pulumi/pulumi-azuredevops
License
Apache-2.0
Notes
This Pulumi package is based on the azuredevops Terraform Provider.