UNPKG

@pulumi/azuredevops

Version:

A Pulumi package for creating and managing Azure DevOps.

115 lines 5.59 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.ServiceendpointJenkins = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Manages a Jenkins service endpoint within Azure DevOps, which can be used as a resource in YAML pipelines to connect to a Jenkins instance. * * ## 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 exampleServiceendpointJenkins = new azuredevops.ServiceendpointJenkins("example", { * projectId: example.id, * serviceEndpointName: "jenkins-example", * description: "Service Endpoint for 'Jenkins' (Managed by Terraform)", * url: "https://example.com", * acceptUntrustedCerts: false, * username: "username", * password: "password", * }); * ``` * * ## Import * * Azure DevOps Jenkins Service Endpoint can be imported using the `projectId/id` or `projectName/id`, e.g. * * ```sh * $ pulumi import azuredevops:index/serviceendpointJenkins:ServiceendpointJenkins example projectName/00000000-0000-0000-0000-000000000000 * ``` */ class ServiceendpointJenkins extends pulumi.CustomResource { /** * Get an existing ServiceendpointJenkins 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 ServiceendpointJenkins(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of ServiceendpointJenkins. 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'] === ServiceendpointJenkins.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["acceptUntrustedCerts"] = state ? state.acceptUntrustedCerts : undefined; resourceInputs["authorization"] = state ? state.authorization : undefined; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["password"] = state ? state.password : undefined; resourceInputs["projectId"] = state ? state.projectId : undefined; resourceInputs["serviceEndpointName"] = state ? state.serviceEndpointName : undefined; resourceInputs["url"] = state ? state.url : undefined; resourceInputs["username"] = state ? state.username : undefined; } else { const args = argsOrState; if ((!args || args.password === undefined) && !opts.urn) { throw new Error("Missing required property 'password'"); } if ((!args || args.projectId === undefined) && !opts.urn) { throw new Error("Missing required property 'projectId'"); } if ((!args || args.serviceEndpointName === undefined) && !opts.urn) { throw new Error("Missing required property 'serviceEndpointName'"); } if ((!args || args.url === undefined) && !opts.urn) { throw new Error("Missing required property 'url'"); } if ((!args || args.username === undefined) && !opts.urn) { throw new Error("Missing required property 'username'"); } resourceInputs["acceptUntrustedCerts"] = args ? args.acceptUntrustedCerts : undefined; resourceInputs["description"] = args ? args.description : undefined; resourceInputs["password"] = (args === null || args === void 0 ? void 0 : args.password) ? pulumi.secret(args.password) : undefined; resourceInputs["projectId"] = args ? args.projectId : undefined; resourceInputs["serviceEndpointName"] = args ? args.serviceEndpointName : undefined; resourceInputs["url"] = args ? args.url : undefined; resourceInputs["username"] = args ? args.username : undefined; resourceInputs["authorization"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const secretOpts = { additionalSecretOutputs: ["password"] }; opts = pulumi.mergeOptions(opts, secretOpts); super(ServiceendpointJenkins.__pulumiType, name, resourceInputs, opts); } } exports.ServiceendpointJenkins = ServiceendpointJenkins; /** @internal */ ServiceendpointJenkins.__pulumiType = 'azuredevops:index/serviceendpointJenkins:ServiceendpointJenkins'; //# sourceMappingURL=serviceendpointJenkins.js.map