@cuemby/equinix
Version:
A Pulumi package for creating and managing equinix cloud resources.
250 lines • 12.1 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.ECXL2Connection = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* Resource `equinix.ECXL2Connection` allows creation and management of Equinix Fabric
* layer 2 connections.
*
* ## Example Usage
* ### Non-redundant Connection from own Equinix Fabric Port
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as equinix from "@cuemby/equinix";
* import * as equinix from "@pulumi/equinix";
*
* const aws = equinix.GetECXL2Sellerprofile({
* name: "AWS Direct Connect",
* });
* const sv-qinq-pri = equinix.GetECXPort({
* name: "CX-SV5-NL-Dot1q-BO-10G-PRI",
* });
* const port_2_aws = new equinix.ECXL2Connection("port-2-aws", {
* profileUuid: aws.then(aws => aws.id),
* speed: 200,
* speedUnit: "MB",
* notifications: [
* "marry@equinix.com",
* "john@equinix.com",
* ],
* portUuid: sv_qinq_pri.then(sv_qinq_pri => sv_qinq_pri.id),
* vlanStag: 777,
* vlanCtag: 1000,
* sellerRegion: "us-west-1",
* sellerMetroCode: "SV",
* authorizationKey: "345742915919",
* });
* ```
* ### Non-redundant Connection from Network Edge device
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as equinix from "@cuemby/equinix";
* import * as equinix from "@pulumi/equinix";
*
* const gcp-1 = equinix.GetECXL2Sellerprofile({
* name: "Google Cloud Partner Interconnect Zone 1",
* });
* const router_to_gcp = new equinix.ECXL2Connection("router-to-gcp", {
* profileUuid: gcp_1.then(gcp_1 => gcp_1.id),
* deviceUuid: equinix_network_device.myrouter.id,
* deviceInterfaceId: 5,
* speed: 100,
* speedUnit: "MB",
* notifications: [
* "john@equinix.com",
* "marry@equinix.com",
* ],
* sellerMetroCode: "SV",
* sellerRegion: "us-west1",
* authorizationKey: "4d335adc-00fd-4a41-c9f3-782ca31ab3f7/us-west1/1",
* });
* ```
* ### Non-redundant Connection from an Equinix customer port using A-Side Service token
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as equinix from "@cuemby/equinix";
* import * as equinix from "@pulumi/equinix";
*
* const gcp = equinix.GetECXL2Sellerprofile({
* name: "Google Cloud Partner Interconnect Zone 1",
* });
* const token_to_gcp = new equinix.ECXL2Connection("token-to-gcp", {
* profileUuid: data.equinix_ecx_l2_sellerprofile["gcp-1"].id,
* serviceToken: "e9c22453-d3a7-4d5d-9112-d50173531392",
* speed: 100,
* speedUnit: "MB",
* notifications: [
* "john@equinix.com",
* "marry@equinix.com",
* ],
* sellerMetroCode: "SV",
* sellerRegion: "us-west1",
* authorizationKey: "4d335adc-00fd-4a41-c9f3-782ca31ab3f7/us-west1/1",
* });
* ```
* ### Non-redundant Connection from own Equinix Fabric Port to an Equinix customer port using Z-Side Service token
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as equinix from "@cuemby/equinix";
* import * as equinix from "@pulumi/equinix";
*
* const sv-qinq-pri = equinix.GetECXPort({
* name: "CX-SV5-NL-Dot1q-BO-10G-PRI",
* });
* const port_to_token = new equinix.ECXL2Connection("port-to-token", {
* zsideServiceToken: "e9c22453-d3a7-4d5d-9112-d50173531392",
* speed: 200,
* speedUnit: "MB",
* notifications: [
* "john@equinix.com",
* "marry@equinix.com",
* ],
* sellerMetroCode: "FR",
* portUuid: sv_qinq_pri.then(sv_qinq_pri => sv_qinq_pri.id),
* vlanStag: 1000,
* });
* ```
*
* > **NOTE:** See Equinix Fabric connecting to the cloud
* guide for more details on how to connect to a CSP.
* ## Update operation behavior
*
* Update of most arguments will force replacement of a connection (including related redundant
* connection in HA setup).
*
* Following arguments can be updated. **NOTE** that Equinix Fabric may still forbid updates depending
* on current connection state, used service provider or number of updates requested during the day.
*
* * `name`
* * `speed` and `speedUnit`
*
* ## Import
*
* into `vendor_token` but `service_token` and `zside_service_token` will remain empty. Equinix L2 connections can be imported using an existing `id`existing_connection_id='example-uuid-1'
*
* ```sh
* $ pulumi import equinix:index/eCXL2Connection:ECXL2Connection example ${existing_connection_id}
* ```
*
* (primary and secondary) into a single string separated by `:`. To import a redundant Equinix L2 connectionexisting_primary_connection_id='example-uuid-1' existing_secondary_connection_id='example-uuid-2'
*
* ```sh
* $ pulumi import equinix:index/eCXL2Connection:ECXL2Connection example ${existing_primary_connection_id}:${existing_secondary_connection_id}
* ```
*/
class ECXL2Connection extends pulumi.CustomResource {
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["actions"] = state ? state.actions : undefined;
resourceInputs["additionalInfos"] = state ? state.additionalInfos : undefined;
resourceInputs["authorizationKey"] = state ? state.authorizationKey : undefined;
resourceInputs["deviceInterfaceId"] = state ? state.deviceInterfaceId : undefined;
resourceInputs["deviceUuid"] = state ? state.deviceUuid : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["namedTag"] = state ? state.namedTag : undefined;
resourceInputs["notifications"] = state ? state.notifications : undefined;
resourceInputs["portUuid"] = state ? state.portUuid : undefined;
resourceInputs["profileUuid"] = state ? state.profileUuid : undefined;
resourceInputs["providerStatus"] = state ? state.providerStatus : undefined;
resourceInputs["purchaseOrderNumber"] = state ? state.purchaseOrderNumber : undefined;
resourceInputs["redundancyGroup"] = state ? state.redundancyGroup : undefined;
resourceInputs["redundancyType"] = state ? state.redundancyType : undefined;
resourceInputs["redundantUuid"] = state ? state.redundantUuid : undefined;
resourceInputs["secondaryConnection"] = state ? state.secondaryConnection : undefined;
resourceInputs["sellerMetroCode"] = state ? state.sellerMetroCode : undefined;
resourceInputs["sellerRegion"] = state ? state.sellerRegion : undefined;
resourceInputs["serviceToken"] = state ? state.serviceToken : undefined;
resourceInputs["speed"] = state ? state.speed : undefined;
resourceInputs["speedUnit"] = state ? state.speedUnit : undefined;
resourceInputs["status"] = state ? state.status : undefined;
resourceInputs["uuid"] = state ? state.uuid : undefined;
resourceInputs["vendorToken"] = state ? state.vendorToken : undefined;
resourceInputs["vlanCtag"] = state ? state.vlanCtag : undefined;
resourceInputs["vlanStag"] = state ? state.vlanStag : undefined;
resourceInputs["zsidePortUuid"] = state ? state.zsidePortUuid : undefined;
resourceInputs["zsideServiceToken"] = state ? state.zsideServiceToken : undefined;
resourceInputs["zsideVlanCtag"] = state ? state.zsideVlanCtag : undefined;
resourceInputs["zsideVlanStag"] = state ? state.zsideVlanStag : undefined;
}
else {
const args = argsOrState;
if ((!args || args.notifications === undefined) && !opts.urn) {
throw new Error("Missing required property 'notifications'");
}
if ((!args || args.speed === undefined) && !opts.urn) {
throw new Error("Missing required property 'speed'");
}
if ((!args || args.speedUnit === undefined) && !opts.urn) {
throw new Error("Missing required property 'speedUnit'");
}
resourceInputs["additionalInfos"] = args ? args.additionalInfos : undefined;
resourceInputs["authorizationKey"] = args ? args.authorizationKey : undefined;
resourceInputs["deviceInterfaceId"] = args ? args.deviceInterfaceId : undefined;
resourceInputs["deviceUuid"] = args ? args.deviceUuid : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["namedTag"] = args ? args.namedTag : undefined;
resourceInputs["notifications"] = args ? args.notifications : undefined;
resourceInputs["portUuid"] = args ? args.portUuid : undefined;
resourceInputs["profileUuid"] = args ? args.profileUuid : undefined;
resourceInputs["purchaseOrderNumber"] = args ? args.purchaseOrderNumber : undefined;
resourceInputs["secondaryConnection"] = args ? args.secondaryConnection : undefined;
resourceInputs["sellerMetroCode"] = args ? args.sellerMetroCode : undefined;
resourceInputs["sellerRegion"] = args ? args.sellerRegion : undefined;
resourceInputs["serviceToken"] = args ? args.serviceToken : undefined;
resourceInputs["speed"] = args ? args.speed : undefined;
resourceInputs["speedUnit"] = args ? args.speedUnit : undefined;
resourceInputs["vlanCtag"] = args ? args.vlanCtag : undefined;
resourceInputs["vlanStag"] = args ? args.vlanStag : undefined;
resourceInputs["zsidePortUuid"] = args ? args.zsidePortUuid : undefined;
resourceInputs["zsideServiceToken"] = args ? args.zsideServiceToken : undefined;
resourceInputs["zsideVlanCtag"] = args ? args.zsideVlanCtag : undefined;
resourceInputs["zsideVlanStag"] = args ? args.zsideVlanStag : undefined;
resourceInputs["actions"] = undefined /*out*/;
resourceInputs["providerStatus"] = undefined /*out*/;
resourceInputs["redundancyGroup"] = undefined /*out*/;
resourceInputs["redundancyType"] = undefined /*out*/;
resourceInputs["redundantUuid"] = undefined /*out*/;
resourceInputs["status"] = undefined /*out*/;
resourceInputs["uuid"] = undefined /*out*/;
resourceInputs["vendorToken"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(ECXL2Connection.__pulumiType, name, resourceInputs, opts);
}
/**
* Get an existing ECXL2Connection 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 ECXL2Connection(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of ECXL2Connection. 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'] === ECXL2Connection.__pulumiType;
}
}
exports.ECXL2Connection = ECXL2Connection;
/** @internal */
ECXL2Connection.__pulumiType = 'equinix:index/eCXL2Connection:ECXL2Connection';
//# sourceMappingURL=ecxl2connection.js.map