@pulumi/azuredevops
Version:
A Pulumi package for creating and managing Azure DevOps.
136 lines • 6.4 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.ServiceendpointJfrogDistributionV2 = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* Manages a JFrog Distribution V2 service endpoint within an Azure DevOps organization.
*
* > **Note:** Using this service endpoint requires you to first install [JFrog Extension](https://marketplace.visualstudio.com/items?itemName=JFrog.jfrog-azure-devops-extension).
*
* ## 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 exampleServiceendpointJfrogDistributionV2 = new azuredevops.ServiceendpointJfrogDistributionV2("example", {
* projectId: example.id,
* serviceEndpointName: "Example JFrog Distribution V2",
* description: "Managed by Pulumi",
* url: "https://artifactory.my.com",
* authenticationToken: {
* token: "0000000000000000000000000000000000000000",
* },
* });
* ```
* Alternatively a username and password may be used.
*
* ```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 exampleServiceendpointJfrogDistributionV2 = new azuredevops.ServiceendpointJfrogDistributionV2("example", {
* projectId: example.id,
* serviceEndpointName: "Example JFrog Distribution V2",
* description: "Managed by Pulumi",
* url: "https://artifactory.my.com",
* authenticationBasic: {
* username: "username",
* password: "password",
* },
* });
* ```
*
* ## Relevant Links
*
* * [Azure DevOps Service Connections](https://docs.microsoft.com/en-us/azure/devops/pipelines/library/service-endpoints?view=azure-devops&tabs=yaml)
* * [Artifactory User Token](https://docs.artifactory.org/latest/user-guide/user-token/)
*
* ## Import
*
* Azure DevOps JFrog Distribution V2 Service Endpoint can be imported using the **projectID/serviceEndpointID**, e.g.
*
* ```sh
* $ pulumi import azuredevops:index/serviceendpointJfrogDistributionV2:ServiceendpointJfrogDistributionV2 example 00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000
* ```
*/
class ServiceendpointJfrogDistributionV2 extends pulumi.CustomResource {
/**
* Get an existing ServiceendpointJfrogDistributionV2 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 ServiceendpointJfrogDistributionV2(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of ServiceendpointJfrogDistributionV2. 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'] === ServiceendpointJfrogDistributionV2.__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(ServiceendpointJfrogDistributionV2.__pulumiType, name, resourceInputs, opts);
}
}
exports.ServiceendpointJfrogDistributionV2 = ServiceendpointJfrogDistributionV2;
/** @internal */
ServiceendpointJfrogDistributionV2.__pulumiType = 'azuredevops:index/serviceendpointJfrogDistributionV2:ServiceendpointJfrogDistributionV2';
//# sourceMappingURL=serviceendpointJfrogDistributionV2.js.map