@equinix-labs/pulumi-equinix
Version:
A Pulumi package for creating and managing equinix cloud resources.
236 lines • 9.09 kB
JavaScript
;
// *** 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.ServiceToken = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Fabric V4 API compatible resource allows creation and management of [Equinix Fabric Service Token](https://docs.equinix.com/en-us/Content/Interconnection/Fabric/service%20tokens/Fabric-Service-Tokens.htm).
*
* Additional documentation:
* * Getting Started: https://docs.equinix.com/en-us/Content/Interconnection/Fabric/service%20tokens/Fabric-Service-Tokens.htm
* * API: https://docs.equinix.com/en-us/Content/KnowledgeCenter/Fabric/GettingStarted/Integrating-with-Fabric-V4-APIs/ConnectUsingServiceToken.htm
*
* ## Example Usage
*
* Aside Port Service Token
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as equinix from "@equinix-labs/pulumi-equinix";
*
* const test = new equinix.fabric.ServiceToken("test", {
* description: "Aside COLO Service Token",
* expirationDateTime: "2025-01-18T06:43:49.981Z",
* notifications: [{
* emails: [
* "example@equinix.com",
* "test1@equinix.com",
* ],
* type: "ALL",
* }],
* serviceTokenConnections: [{
* aSides: [{
* accessPointSelectors: [{
* linkProtocol: {
* type: "DOT1Q",
* vlanTag: 2987,
* },
* port: {
* uuid: "<port_uuid>",
* },
* type: "COLO",
* }],
* }],
* bandwidthLimit: 1000,
* type: "EVPL_VC",
* }],
* type: "VC_TOKEN",
* });
* ```
*
* Zside Port Service Token
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as equinix from "@equinix-labs/pulumi-equinix";
*
* const test = new equinix.fabric.ServiceToken("test", {
* description: "Zside COLO Service Token",
* expirationDateTime: "2025-01-18T06:43:49.981Z",
* notifications: [{
* emails: [
* "example@equinix.com",
* "test1@equinix.com",
* ],
* type: "ALL",
* }],
* serviceTokenConnections: [{
* supportedBandwidths: [
* 50,
* 200,
* 10000,
* ],
* type: "EVPL_VC",
* zSides: [{
* accessPointSelectors: [{
* linkProtocol: {
* type: "DOT1Q",
* vlanTag: 2087,
* },
* port: {
* uuid: "<port_uuid>",
* },
* type: "COLO",
* }],
* }],
* }],
* type: "VC_TOKEN",
* });
* ```
*
* Zside Network Service Token
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as equinix from "@equinix-labs/pulumi-equinix";
*
* const test = new equinix.fabric.ServiceToken("test", {
* description: "Zside Network Service Token",
* expirationDateTime: "2025-01-18T06:43:49.986Z",
* notifications: [{
* emails: ["example@equinix.com"],
* type: "ALL",
* }],
* serviceTokenConnections: [{
* supportedBandwidths: [
* 50,
* 200,
* 10000,
* ],
* type: "EVPL_VC",
* zSides: [{
* accessPointSelectors: [{
* network: {
* uuid: "<network_uuid>",
* },
* type: "NETWORK",
* }],
* }],
* }],
* type: "VC_TOKEN",
* });
* ```
*
* Zside Virtual Device Service Token
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as equinix from "@equinix-labs/pulumi-equinix";
*
* const test = new equinix.fabric.ServiceToken("test", {
* description: "Zside VD Service Token",
* expirationDateTime: "2025-01-18T06:43:49.986Z",
* notifications: [{
* emails: ["example@equinix.com"],
* type: "ALL",
* }],
* serviceTokenConnections: [{
* supportedBandwidths: [
* 50,
* 200,
* 10000,
* ],
* type: "EVPL_VC",
* zSides: [{
* accessPointSelectors: [{
* "interface": {
* type: "NETWORK",
* },
* type: "VD",
* virtualDevice: {
* type: "EDGE",
* uuid: "<device_uuid>",
* },
* }],
* }],
* }],
* type: "VC_TOKEN",
* });
* ```
*/
class ServiceToken extends pulumi.CustomResource {
/**
* Get an existing ServiceToken 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 ServiceToken(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of ServiceToken. 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'] === ServiceToken.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["accounts"] = state ? state.accounts : undefined;
resourceInputs["changeLogs"] = state ? state.changeLogs : undefined;
resourceInputs["description"] = state ? state.description : undefined;
resourceInputs["expirationDateTime"] = state ? state.expirationDateTime : undefined;
resourceInputs["href"] = state ? state.href : undefined;
resourceInputs["issuerSide"] = state ? state.issuerSide : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["notifications"] = state ? state.notifications : undefined;
resourceInputs["project"] = state ? state.project : undefined;
resourceInputs["serviceTokenConnections"] = state ? state.serviceTokenConnections : undefined;
resourceInputs["state"] = state ? state.state : undefined;
resourceInputs["type"] = state ? state.type : undefined;
resourceInputs["uuid"] = state ? state.uuid : undefined;
}
else {
const args = argsOrState;
if ((!args || args.expirationDateTime === undefined) && !opts.urn) {
throw new Error("Missing required property 'expirationDateTime'");
}
if ((!args || args.notifications === undefined) && !opts.urn) {
throw new Error("Missing required property 'notifications'");
}
if ((!args || args.serviceTokenConnections === undefined) && !opts.urn) {
throw new Error("Missing required property 'serviceTokenConnections'");
}
if ((!args || args.type === undefined) && !opts.urn) {
throw new Error("Missing required property 'type'");
}
resourceInputs["description"] = args ? args.description : undefined;
resourceInputs["expirationDateTime"] = args ? args.expirationDateTime : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["notifications"] = args ? args.notifications : undefined;
resourceInputs["project"] = args ? args.project : undefined;
resourceInputs["serviceTokenConnections"] = args ? args.serviceTokenConnections : undefined;
resourceInputs["type"] = args ? args.type : undefined;
resourceInputs["accounts"] = undefined /*out*/;
resourceInputs["changeLogs"] = undefined /*out*/;
resourceInputs["href"] = undefined /*out*/;
resourceInputs["issuerSide"] = undefined /*out*/;
resourceInputs["state"] = undefined /*out*/;
resourceInputs["uuid"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(ServiceToken.__pulumiType, name, resourceInputs, opts);
}
}
exports.ServiceToken = ServiceToken;
/** @internal */
ServiceToken.__pulumiType = 'equinix:fabric/serviceToken:ServiceToken';
//# sourceMappingURL=serviceToken.js.map