@pulumi/azuredevops
Version:
A Pulumi package for creating and managing Azure DevOps.
110 lines • 5.16 kB
JavaScript
;
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.ServiceEndpointPipeline = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* Manages a Azure DevOps Run Pipeline Service Connection service endpoint within Azure DevOps. Allows to run downstream pipelines, monitoring their execution, collecting and consolidating artefacts produced in the delegate pipelines (yaml block `task: RunPipelines@1`). More details on Marketplace page: [RunPipelines](https://marketplace.visualstudio.com/items?itemName=CSE-DevOps.RunPipelines)
*
* ## 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 exampleServiceEndpointPipeline = new azuredevops.ServiceEndpointPipeline("example", {
* projectId: example.id,
* serviceEndpointName: "Example Pipeline Runner",
* organizationName: "Organization Name",
* authPersonal: {
* personalAccessToken: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
* },
* description: "Managed by Pulumi",
* });
* ```
*
* ## Relevant Links
*
* - [Azure DevOps Service REST API 7.0 - Agent Pools](https://docs.microsoft.com/en-us/rest/api/azure/devops/serviceendpoint/endpoints?view=azure-devops-rest-7.0)
*
* ## Import
*
* Azure DevOps Run Pipeline Service Endpoint can be imported using the `project id`, `service connection id`, e.g.
*
* ```sh
* $ pulumi import azuredevops:index/serviceEndpointPipeline:ServiceEndpointPipeline example projectID/00000000-0000-0000-0000-000000000000
* ```
*/
class ServiceEndpointPipeline extends pulumi.CustomResource {
/**
* Get an existing ServiceEndpointPipeline 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 ServiceEndpointPipeline(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of ServiceEndpointPipeline. 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'] === ServiceEndpointPipeline.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["authPersonal"] = state?.authPersonal;
resourceInputs["authorization"] = state?.authorization;
resourceInputs["description"] = state?.description;
resourceInputs["organizationName"] = state?.organizationName;
resourceInputs["projectId"] = state?.projectId;
resourceInputs["serviceEndpointName"] = state?.serviceEndpointName;
}
else {
const args = argsOrState;
if (args?.authPersonal === undefined && !opts.urn) {
throw new Error("Missing required property 'authPersonal'");
}
if (args?.organizationName === undefined && !opts.urn) {
throw new Error("Missing required property 'organizationName'");
}
if (args?.projectId === undefined && !opts.urn) {
throw new Error("Missing required property 'projectId'");
}
if (args?.serviceEndpointName === undefined && !opts.urn) {
throw new Error("Missing required property 'serviceEndpointName'");
}
resourceInputs["authPersonal"] = args?.authPersonal;
resourceInputs["description"] = args?.description;
resourceInputs["organizationName"] = args?.organizationName;
resourceInputs["projectId"] = args?.projectId;
resourceInputs["serviceEndpointName"] = args?.serviceEndpointName;
resourceInputs["authorization"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(ServiceEndpointPipeline.__pulumiType, name, resourceInputs, opts);
}
}
exports.ServiceEndpointPipeline = ServiceEndpointPipeline;
/** @internal */
ServiceEndpointPipeline.__pulumiType = 'azuredevops:index/serviceEndpointPipeline:ServiceEndpointPipeline';
//# sourceMappingURL=serviceEndpointPipeline.js.map