@pulumi/azuredevops
Version:
A Pulumi package for creating and managing Azure DevOps.
157 lines • 6.68 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.ServiceendpointOpenshift = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* Manages an Openshift service endpoint within Azure DevOps organization. Using this service endpoint requires you to first install the [OpenShift Extension](https://marketplace.visualstudio.com/items?itemName=redhat.openshift-vsts).
*
* ## 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 exampleServiceendpointOpenshift = new azuredevops.ServiceendpointOpenshift("example", {
* projectId: example.id,
* serviceEndpointName: "Example Openshift",
* serverUrl: "https://example.server",
* certificateAuthorityFile: "/opt/file",
* acceptUntrustedCerts: true,
* authBasic: {
* username: "username",
* password: "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 exampleServiceendpointOpenshift = new azuredevops.ServiceendpointOpenshift("example", {
* projectId: example.id,
* serviceEndpointName: "Example Openshift",
* serverUrl: "https://example.server",
* certificateAuthorityFile: "/opt/file",
* acceptUntrustedCerts: true,
* authToken: {
* token: "username",
* },
* });
* ```
* ```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 exampleServiceendpointOpenshift = new azuredevops.ServiceendpointOpenshift("example", {
* projectId: example.id,
* serviceEndpointName: "Example Openshift",
* serverUrl: "https://example.server",
* authNone: {
* kubeConfig: "config",
* },
* });
* ```
*
* ## Relevant Links
*
* - [Azure DevOps Service REST API 7.1 - Service Endpoints](https://docs.microsoft.com/en-us/rest/api/azure/devops/serviceendpoint/endpoints?view=azure-devops-rest-7.1)
*
* ## Import
*
* Azure DevOps Openshift Service Endpoint can be imported using **projectID/serviceEndpointID** or **projectName/serviceEndpointID**
*
* ```sh
* $ pulumi import azuredevops:index/serviceendpointOpenshift:ServiceendpointOpenshift example 00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000
* ```
*/
class ServiceendpointOpenshift extends pulumi.CustomResource {
/**
* Get an existing ServiceendpointOpenshift 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 ServiceendpointOpenshift(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of ServiceendpointOpenshift. 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'] === ServiceendpointOpenshift.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["acceptUntrustedCerts"] = state?.acceptUntrustedCerts;
resourceInputs["authBasic"] = state?.authBasic;
resourceInputs["authNone"] = state?.authNone;
resourceInputs["authToken"] = state?.authToken;
resourceInputs["authorization"] = state?.authorization;
resourceInputs["certificateAuthorityFile"] = state?.certificateAuthorityFile;
resourceInputs["description"] = state?.description;
resourceInputs["projectId"] = state?.projectId;
resourceInputs["serverUrl"] = state?.serverUrl;
resourceInputs["serviceEndpointName"] = state?.serviceEndpointName;
}
else {
const args = argsOrState;
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["acceptUntrustedCerts"] = args?.acceptUntrustedCerts;
resourceInputs["authBasic"] = args?.authBasic;
resourceInputs["authNone"] = args?.authNone;
resourceInputs["authToken"] = args?.authToken;
resourceInputs["certificateAuthorityFile"] = args?.certificateAuthorityFile;
resourceInputs["description"] = args?.description;
resourceInputs["projectId"] = args?.projectId;
resourceInputs["serverUrl"] = args?.serverUrl;
resourceInputs["serviceEndpointName"] = args?.serviceEndpointName;
resourceInputs["authorization"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(ServiceendpointOpenshift.__pulumiType, name, resourceInputs, opts);
}
}
exports.ServiceendpointOpenshift = ServiceendpointOpenshift;
/** @internal */
ServiceendpointOpenshift.__pulumiType = 'azuredevops:index/serviceendpointOpenshift:ServiceendpointOpenshift';
//# sourceMappingURL=serviceendpointOpenshift.js.map