UNPKG

@pulumi/azuredevops

Version:

A Pulumi package for creating and managing Azure DevOps.

135 lines 6.94 kB
"use strict"; // *** 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.ServiceendpointCheckmarxSca = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Manages a Checkmarx SCA service endpoint within Azure DevOps. Using this service endpoint requires you to install: [Checkmarx SAST](https://marketplace.visualstudio.com/items?itemName=checkmarx.cxsast) * * ## 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 exampleServiceendpointCheckmarxSca = new azuredevops.ServiceendpointCheckmarxSca("example", { * projectId: example.id, * serviceEndpointName: "Example Checkmarx SCA", * accessControlUrl: "https://accesscontrol.com", * serverUrl: "https://server.com", * webAppUrl: "https://webapp.com", * account: "account", * username: "username", * password: "password", * }); * ``` * * ## Relevant Links * * - [Azure DevOps Service REST API 7.0 - Service Endpoints](https://docs.microsoft.com/en-us/rest/api/azure/devops/serviceendpoint/endpoints?view=azure-devops-rest-7.0) * * ## Import * * Azure DevOps Service Endpoint Check Marx SCA can be imported using **projectID/serviceEndpointID** or **projectName/serviceEndpointID** * * ```sh * $ pulumi import azuredevops:index/serviceendpointCheckmarxSca:ServiceendpointCheckmarxSca example 00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000 * ``` */ class ServiceendpointCheckmarxSca extends pulumi.CustomResource { /** * Get an existing ServiceendpointCheckmarxSca 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 ServiceendpointCheckmarxSca(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of ServiceendpointCheckmarxSca. 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'] === ServiceendpointCheckmarxSca.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["accessControlUrl"] = state ? state.accessControlUrl : undefined; resourceInputs["account"] = state ? state.account : 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["serverUrl"] = state ? state.serverUrl : undefined; resourceInputs["serviceEndpointName"] = state ? state.serviceEndpointName : undefined; resourceInputs["team"] = state ? state.team : undefined; resourceInputs["username"] = state ? state.username : undefined; resourceInputs["webAppUrl"] = state ? state.webAppUrl : undefined; } else { const args = argsOrState; if ((!args || args.accessControlUrl === undefined) && !opts.urn) { throw new Error("Missing required property 'accessControlUrl'"); } if ((!args || args.account === undefined) && !opts.urn) { throw new Error("Missing required property 'account'"); } 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.serverUrl === undefined) && !opts.urn) { throw new Error("Missing required property 'serverUrl'"); } if ((!args || args.serviceEndpointName === undefined) && !opts.urn) { throw new Error("Missing required property 'serviceEndpointName'"); } if ((!args || args.username === undefined) && !opts.urn) { throw new Error("Missing required property 'username'"); } if ((!args || args.webAppUrl === undefined) && !opts.urn) { throw new Error("Missing required property 'webAppUrl'"); } resourceInputs["accessControlUrl"] = args ? args.accessControlUrl : undefined; resourceInputs["account"] = args ? args.account : 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["serverUrl"] = args ? args.serverUrl : undefined; resourceInputs["serviceEndpointName"] = args ? args.serviceEndpointName : undefined; resourceInputs["team"] = args ? args.team : undefined; resourceInputs["username"] = args ? args.username : undefined; resourceInputs["webAppUrl"] = args ? args.webAppUrl : undefined; resourceInputs["authorization"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const secretOpts = { additionalSecretOutputs: ["password"] }; opts = pulumi.mergeOptions(opts, secretOpts); super(ServiceendpointCheckmarxSca.__pulumiType, name, resourceInputs, opts); } } exports.ServiceendpointCheckmarxSca = ServiceendpointCheckmarxSca; /** @internal */ ServiceendpointCheckmarxSca.__pulumiType = 'azuredevops:index/serviceendpointCheckmarxSca:ServiceendpointCheckmarxSca'; //# sourceMappingURL=serviceendpointCheckmarxSca.js.map