UNPKG

@pulumi/azuredevops

Version:

A Pulumi package for creating and managing Azure DevOps.

94 lines 3.6 kB
"use strict"; // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.ProjectTags = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Manages Project Tags within Azure DevOps organization. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azuredevops from "@pulumi/azuredevops"; * * const example = new azuredevops.Project("example", { * name: "Example Project", * visibility: "private", * versionControl: "Git", * workItemTemplate: "Agile", * description: "Managed by Pulumi", * }); * const exampleProjectTags = new azuredevops.ProjectTags("example", { * projectId: example.id, * tags: [ * "tag1", * "tag2", * ], * }); * ``` * * ## Relevant Links * * - [Azure DevOps Service REST API 7.0 - Project Properties](https://learn.microsoft.com/en-us/rest/api/azure/devops/core/projects/get-project-properties?view=azure-devops-rest-7.1&tabs=HTTP) * * ## Import * * Azure DevOps Project Tags can be imported using the Project ID e.g.: * * ```sh * $ pulumi import azuredevops:index/projectTags:ProjectTags example 00000000-0000-0000-0000-000000000000 * ``` */ class ProjectTags extends pulumi.CustomResource { /** * Get an existing ProjectTags resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name, id, state, opts) { return new ProjectTags(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of ProjectTags. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === ProjectTags.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["projectId"] = state ? state.projectId : undefined; resourceInputs["tags"] = state ? state.tags : undefined; } else { const args = argsOrState; if ((!args || args.projectId === undefined) && !opts.urn) { throw new Error("Missing required property 'projectId'"); } if ((!args || args.tags === undefined) && !opts.urn) { throw new Error("Missing required property 'tags'"); } resourceInputs["projectId"] = args ? args.projectId : undefined; resourceInputs["tags"] = args ? args.tags : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(ProjectTags.__pulumiType, name, resourceInputs, opts); } } exports.ProjectTags = ProjectTags; /** @internal */ ProjectTags.__pulumiType = 'azuredevops:index/projectTags:ProjectTags'; //# sourceMappingURL=projectTags.js.map