UNPKG

@pulumi/azuredevops

Version:

A Pulumi package for creating and managing Azure DevOps.

135 lines 6.39 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.ServiceendpointVisualstudiomarketplace = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Manages a Visual Studio Marketplace service endpoint within Azure DevOps. Using this service endpoint requires you to install: [Azure DevOps Extension Tasks](https://marketplace.visualstudio.com/items?itemName=ms-devlabs.vsts-developer-tools-build-tasks) * * ## Example Usage * * ### Authorize with token * ```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 exampleServiceendpointVisualstudiomarketplace = new azuredevops.ServiceendpointVisualstudiomarketplace("example", { * projectId: example.id, * serviceEndpointName: "Example Marketplace", * url: "https://markpetplace.com", * authenticationToken: { * token: "token", * }, * description: "Managed by Pulumi", * }); * ``` * * ### Authorize with username and password * * ```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 exampleServiceendpointVisualstudiomarketplace = new azuredevops.ServiceendpointVisualstudiomarketplace("example", { * projectId: example.id, * serviceEndpointName: "Example Marketplace", * url: "https://markpetplace.com", * authenticationBasic: { * 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 Visual Studio Marketplace Service Endpoint can be imported using **projectID/serviceEndpointID** or **projectName/serviceEndpointID** * * ```sh * $ pulumi import azuredevops:index/serviceendpointVisualstudiomarketplace:ServiceendpointVisualstudiomarketplace example 00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000 * ``` */ class ServiceendpointVisualstudiomarketplace extends pulumi.CustomResource { /** * Get an existing ServiceendpointVisualstudiomarketplace 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 ServiceendpointVisualstudiomarketplace(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of ServiceendpointVisualstudiomarketplace. 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'] === ServiceendpointVisualstudiomarketplace.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["authenticationBasic"] = state ? state.authenticationBasic : undefined; resourceInputs["authenticationToken"] = state ? state.authenticationToken : undefined; resourceInputs["authorization"] = state ? state.authorization : undefined; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["projectId"] = state ? state.projectId : undefined; resourceInputs["serviceEndpointName"] = state ? state.serviceEndpointName : undefined; resourceInputs["url"] = state ? state.url : undefined; } else { const args = argsOrState; 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'"); } resourceInputs["authenticationBasic"] = args ? args.authenticationBasic : undefined; resourceInputs["authenticationToken"] = args ? args.authenticationToken : undefined; resourceInputs["description"] = args ? args.description : undefined; resourceInputs["projectId"] = args ? args.projectId : undefined; resourceInputs["serviceEndpointName"] = args ? args.serviceEndpointName : undefined; resourceInputs["url"] = args ? args.url : undefined; resourceInputs["authorization"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(ServiceendpointVisualstudiomarketplace.__pulumiType, name, resourceInputs, opts); } } exports.ServiceendpointVisualstudiomarketplace = ServiceendpointVisualstudiomarketplace; /** @internal */ ServiceendpointVisualstudiomarketplace.__pulumiType = 'azuredevops:index/serviceendpointVisualstudiomarketplace:ServiceendpointVisualstudiomarketplace'; //# sourceMappingURL=serviceendpointVisualstudiomarketplace.js.map