@pulumi/azuredevops
Version:
A Pulumi package for creating and managing Azure DevOps.
95 lines • 3.66 kB
JavaScript
;
// *** 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.BuildFolder = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* Manages a Build Folder.
*
* ## 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",
* });
* const exampleBuildFolder = new azuredevops.BuildFolder("example", {
* projectId: example.id,
* path: "\\ExampleFolder",
* description: "ExampleFolder description",
* });
* ```
*
* ## Import
*
* Build Folders can be imported using the `project name/path` or `project id/path`, e.g.
*
* ```sh
* $ pulumi import azuredevops:index/buildFolder:BuildFolder example "Example Project/\\ExampleFolder"
* ```
*
* or
*
* ```sh
* $ pulumi import azuredevops:index/buildFolder:BuildFolder example 00000000-0000-0000-0000-000000000000/\\ExampleFolder
* ```
*/
class BuildFolder extends pulumi.CustomResource {
/**
* Get an existing BuildFolder 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 BuildFolder(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of BuildFolder. 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'] === BuildFolder.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["description"] = state ? state.description : undefined;
resourceInputs["path"] = state ? state.path : undefined;
resourceInputs["projectId"] = state ? state.projectId : undefined;
}
else {
const args = argsOrState;
if ((!args || args.path === undefined) && !opts.urn) {
throw new Error("Missing required property 'path'");
}
if ((!args || args.projectId === undefined) && !opts.urn) {
throw new Error("Missing required property 'projectId'");
}
resourceInputs["description"] = args ? args.description : undefined;
resourceInputs["path"] = args ? args.path : undefined;
resourceInputs["projectId"] = args ? args.projectId : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(BuildFolder.__pulumiType, name, resourceInputs, opts);
}
}
exports.BuildFolder = BuildFolder;
/** @internal */
BuildFolder.__pulumiType = 'azuredevops:index/buildFolder:BuildFolder';
//# sourceMappingURL=buildFolder.js.map