@pulumi/azuredevops
Version:
A Pulumi package for creating and managing Azure DevOps.
83 lines • 3.18 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.Pool = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* Manages an agent pool within Azure DevOps.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azuredevops from "@pulumi/azuredevops";
*
* const example = new azuredevops.Pool("example", {
* name: "Example-pool",
* autoProvision: false,
* autoUpdate: false,
* });
* ```
*
* ## Relevant Links
*
* - [Azure DevOps Service REST API 7.0 - Agent Pools](https://docs.microsoft.com/en-us/rest/api/azure/devops/distributedtask/pools?view=azure-devops-rest-7.0)
*
* ## Import*
*
* Azure DevOps Agent Pools can be imported using the agent pool ID, e.g.
*
* ```sh
* terraform import azuredevops_agent_pool.example 0
* ```
*/
class Pool extends pulumi.CustomResource {
/**
* Get an existing Pool 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 Pool(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of Pool. 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'] === Pool.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["autoProvision"] = state ? state.autoProvision : undefined;
resourceInputs["autoUpdate"] = state ? state.autoUpdate : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["poolType"] = state ? state.poolType : undefined;
}
else {
const args = argsOrState;
resourceInputs["autoProvision"] = args ? args.autoProvision : undefined;
resourceInputs["autoUpdate"] = args ? args.autoUpdate : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["poolType"] = args ? args.poolType : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Pool.__pulumiType, name, resourceInputs, opts);
}
}
exports.Pool = Pool;
/** @internal */
Pool.__pulumiType = 'azuredevops:index/pool:Pool';
//# sourceMappingURL=pool.js.map