@pulumi/azuredevops
Version:
A Pulumi package for creating and managing Azure DevOps.
169 lines • 6.9 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.ServiceEndpointServiceFabric = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* Manages a Service Fabric service endpoint within Azure DevOps.
*
* ## Example Usage
*
* ### Client Certificate Authentication
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azuredevops from "@pulumi/azuredevops";
* import * as std from "@pulumi/std";
*
* const example = new azuredevops.Project("example", {
* name: "Example Project",
* visibility: "private",
* versionControl: "Git",
* workItemTemplate: "Agile",
* description: "Managed by Pulumi",
* });
* const exampleServiceEndpointServiceFabric = new azuredevops.ServiceEndpointServiceFabric("example", {
* projectId: example.id,
* serviceEndpointName: "Example Service Fabric",
* description: "Managed by Pulumi",
* clusterEndpoint: "tcp://test",
* certificate: {
* serverCertificateLookup: "Thumbprint",
* serverCertificateThumbprint: "0000000000000000000000000000000000000000",
* clientCertificate: std.index.filebase64({
* input: "certificate.pfx",
* }).result,
* clientCertificatePassword: "password",
* },
* });
* ```
*
* ### Azure Active Directory Authentication
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azuredevops from "@pulumi/azuredevops";
*
* const project = new azuredevops.Project("project", {
* name: "Sample Project",
* visibility: "private",
* versionControl: "Git",
* workItemTemplate: "Agile",
* });
* const test = new azuredevops.ServiceEndpointServiceFabric("test", {
* projectId: project.id,
* serviceEndpointName: "Sample Service Fabric",
* description: "Managed by Pulumi",
* clusterEndpoint: "tcp://test",
* azureActiveDirectory: {
* serverCertificateLookup: "Thumbprint",
* serverCertificateThumbprint: "0000000000000000000000000000000000000000",
* username: "username",
* password: "password",
* },
* });
* ```
*
* ### Windows Authentication
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azuredevops from "@pulumi/azuredevops";
*
* const project = new azuredevops.Project("project", {
* name: "Sample Project",
* visibility: "private",
* versionControl: "Git",
* workItemTemplate: "Agile",
* });
* const test = new azuredevops.ServiceEndpointServiceFabric("test", {
* projectId: project.id,
* serviceEndpointName: "Sample Service Fabric",
* description: "Managed by Pulumi",
* clusterEndpoint: "tcp://test",
* none: {
* unsecured: false,
* clusterSpn: "HTTP/www.contoso.com",
* },
* });
* ```
*
* ## 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 Service Fabric Service Endpoint can be imported using **projectID/serviceEndpointID** or **projectName/serviceEndpointID**
*
* ```sh
* $ pulumi import azuredevops:index/serviceEndpointServiceFabric:ServiceEndpointServiceFabric example 00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000
* ```
*/
class ServiceEndpointServiceFabric extends pulumi.CustomResource {
/**
* Get an existing ServiceEndpointServiceFabric 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 ServiceEndpointServiceFabric(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of ServiceEndpointServiceFabric. 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'] === ServiceEndpointServiceFabric.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["authorization"] = state?.authorization;
resourceInputs["azureActiveDirectory"] = state?.azureActiveDirectory;
resourceInputs["certificate"] = state?.certificate;
resourceInputs["clusterEndpoint"] = state?.clusterEndpoint;
resourceInputs["description"] = state?.description;
resourceInputs["none"] = state?.none;
resourceInputs["projectId"] = state?.projectId;
resourceInputs["serviceEndpointName"] = state?.serviceEndpointName;
}
else {
const args = argsOrState;
if (args?.clusterEndpoint === undefined && !opts.urn) {
throw new Error("Missing required property 'clusterEndpoint'");
}
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["azureActiveDirectory"] = args?.azureActiveDirectory;
resourceInputs["certificate"] = args?.certificate;
resourceInputs["clusterEndpoint"] = args?.clusterEndpoint;
resourceInputs["description"] = args?.description;
resourceInputs["none"] = args?.none;
resourceInputs["projectId"] = args?.projectId;
resourceInputs["serviceEndpointName"] = args?.serviceEndpointName;
resourceInputs["authorization"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(ServiceEndpointServiceFabric.__pulumiType, name, resourceInputs, opts);
}
}
exports.ServiceEndpointServiceFabric = ServiceEndpointServiceFabric;
/** @internal */
ServiceEndpointServiceFabric.__pulumiType = 'azuredevops:index/serviceEndpointServiceFabric:ServiceEndpointServiceFabric';
//# sourceMappingURL=serviceEndpointServiceFabric.js.map