@pulumi/azuredevops
Version:
A Pulumi package for creating and managing Azure DevOps.
128 lines • 6.56 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.ServiceendpointDynamicsLifecycleServices = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* Manages a Dynamics Lifecycle Services service endpoint within Azure DevOps. Using this service endpoint requires you to install: [Dynamics Lifecycle Services](https://marketplace.visualstudio.com/items?itemName=Dyn365FinOps.dynamics365-finops-tools)
*
* ## 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 exampleServiceendpointDynamicsLifecycleServices = new azuredevops.ServiceendpointDynamicsLifecycleServices("example", {
* projectId: example.id,
* serviceEndpointName: "Example Service connection",
* authorizationEndpoint: "https://login.microsoftonline.com/organization",
* lifecycleServicesApiEndpoint: "https://lcsapi.lcs.dynamics.com",
* clientId: "00000000-0000-0000-0000-000000000000",
* username: "username",
* password: "password",
* description: "Managed by Pulumi",
* });
* ```
*
* ## Relevant Links
*
* - [Azure DevOps Service REST API 7.0 - Endpoints](https://docs.microsoft.com/en-us/rest/api/azure/devops/serviceendpoint/endpoints?view=azure-devops-rest-7.0)
*
* ## Import
*
* Azure DevOps Dynamics Life Cycle Service Endpoint can be imported using **projectID/serviceEndpointID** or **projectName/serviceEndpointID**
*
* ```sh
* $ pulumi import azuredevops:index/serviceendpointDynamicsLifecycleServices:ServiceendpointDynamicsLifecycleServices example 00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000
* ```
*/
class ServiceendpointDynamicsLifecycleServices extends pulumi.CustomResource {
/**
* Get an existing ServiceendpointDynamicsLifecycleServices 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 ServiceendpointDynamicsLifecycleServices(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of ServiceendpointDynamicsLifecycleServices. 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'] === ServiceendpointDynamicsLifecycleServices.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["authorization"] = state?.authorization;
resourceInputs["authorizationEndpoint"] = state?.authorizationEndpoint;
resourceInputs["clientId"] = state?.clientId;
resourceInputs["description"] = state?.description;
resourceInputs["lifecycleServicesApiEndpoint"] = state?.lifecycleServicesApiEndpoint;
resourceInputs["password"] = state?.password;
resourceInputs["projectId"] = state?.projectId;
resourceInputs["serviceEndpointName"] = state?.serviceEndpointName;
resourceInputs["username"] = state?.username;
}
else {
const args = argsOrState;
if (args?.authorizationEndpoint === undefined && !opts.urn) {
throw new Error("Missing required property 'authorizationEndpoint'");
}
if (args?.clientId === undefined && !opts.urn) {
throw new Error("Missing required property 'clientId'");
}
if (args?.lifecycleServicesApiEndpoint === undefined && !opts.urn) {
throw new Error("Missing required property 'lifecycleServicesApiEndpoint'");
}
if (args?.password === undefined && !opts.urn) {
throw new Error("Missing required property 'password'");
}
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'");
}
if (args?.username === undefined && !opts.urn) {
throw new Error("Missing required property 'username'");
}
resourceInputs["authorizationEndpoint"] = args?.authorizationEndpoint;
resourceInputs["clientId"] = args?.clientId;
resourceInputs["description"] = args?.description;
resourceInputs["lifecycleServicesApiEndpoint"] = args?.lifecycleServicesApiEndpoint;
resourceInputs["password"] = args?.password ? pulumi.secret(args.password) : undefined;
resourceInputs["projectId"] = args?.projectId;
resourceInputs["serviceEndpointName"] = args?.serviceEndpointName;
resourceInputs["username"] = args?.username;
resourceInputs["authorization"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
const secretOpts = { additionalSecretOutputs: ["password"] };
opts = pulumi.mergeOptions(opts, secretOpts);
super(ServiceendpointDynamicsLifecycleServices.__pulumiType, name, resourceInputs, opts);
}
}
exports.ServiceendpointDynamicsLifecycleServices = ServiceendpointDynamicsLifecycleServices;
/** @internal */
ServiceendpointDynamicsLifecycleServices.__pulumiType = 'azuredevops:index/serviceendpointDynamicsLifecycleServices:ServiceendpointDynamicsLifecycleServices';
//# sourceMappingURL=serviceendpointDynamicsLifecycleServices.js.map