UNPKG

@equinix-labs/pulumi-equinix

Version:

A Pulumi package for creating and managing equinix cloud resources.

168 lines 7.23 kB
"use strict"; // *** 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.CloudRouter = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Fabric V4 API compatible resource allows creation and management of [Equinix Fabric Cloud Router](https://docs.equinix.com/en-us/Content/Interconnection/FCR/FCR-intro.htm#HowItWorks). * * Additional documentation: * * Getting Started: https://docs.equinix.com/en-us/Content/Interconnection/FCR/FCR-intro.htm#HowItWorks * * API: https://developer.equinix.com/dev-docs/fabric/api-reference/fabric-v4-apis#fabric-cloud-routers * * ## Example Usage * ### example 1 * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as equinix from "@equinix-labs/pulumi-equinix"; * * const newCloudRouter = new equinix.fabric.CloudRouter("newCloudRouter", { * name: "Router-SV", * type: "XF_ROUTER", * notifications: [{ * type: "ALL", * emails: [ * "example@equinix.com", * "test1@equinix.com", * ], * }], * order: { * purchaseOrderNumber: "1-323292", * }, * location: { * metroCode: "SV", * }, * "package": { * code: "STANDARD", * }, * project: { * projectId: "776847000642406", * }, * account: { * accountNumber: 203612, * }, * }); * ``` * ### example 2 * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as equinix from "@equinix-labs/pulumi-equinix"; * * const newCloudRouter = new equinix.fabric.CloudRouter("newCloudRouter", { * name: "Router-SV", * type: "XF_ROUTER", * notifications: [{ * type: "ALL", * emails: [ * "example@equinix.com", * "test1@equinix.com", * ], * }], * order: { * purchaseOrderNumber: "1-323292", * }, * location: { * metroCode: "SV", * }, * "package": { * code: "STANDARD", * }, * project: { * projectId: "776847000642406", * }, * marketplaceSubscription: { * type: "AWS_MARKETPLACE_SUBSCRIPTION", * uuid: "2823b8ae07-a2a2-45b4-a658-c3542bb24e9", * }, * }); * ``` */ class CloudRouter extends pulumi.CustomResource { /** * Get an existing CloudRouter 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 CloudRouter(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of CloudRouter. 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'] === CloudRouter.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["account"] = state ? state.account : undefined; resourceInputs["changeLogs"] = state ? state.changeLogs : undefined; resourceInputs["connectionsCount"] = state ? state.connectionsCount : undefined; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["equinixAsn"] = state ? state.equinixAsn : undefined; resourceInputs["href"] = state ? state.href : undefined; resourceInputs["location"] = state ? state.location : undefined; resourceInputs["marketplaceSubscription"] = state ? state.marketplaceSubscription : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["notifications"] = state ? state.notifications : undefined; resourceInputs["order"] = state ? state.order : undefined; resourceInputs["package"] = state ? state.package : undefined; resourceInputs["project"] = state ? state.project : 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.location === undefined) && !opts.urn) { throw new Error("Missing required property 'location'"); } if ((!args || args.notifications === undefined) && !opts.urn) { throw new Error("Missing required property 'notifications'"); } if ((!args || args.package === undefined) && !opts.urn) { throw new Error("Missing required property 'package'"); } if ((!args || args.project === undefined) && !opts.urn) { throw new Error("Missing required property 'project'"); } if ((!args || args.type === undefined) && !opts.urn) { throw new Error("Missing required property 'type'"); } resourceInputs["account"] = args ? args.account : undefined; resourceInputs["description"] = args ? args.description : undefined; resourceInputs["href"] = args ? args.href : undefined; resourceInputs["location"] = args ? args.location : undefined; resourceInputs["marketplaceSubscription"] = args ? args.marketplaceSubscription : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["notifications"] = args ? args.notifications : undefined; resourceInputs["order"] = args ? args.order : undefined; resourceInputs["package"] = args ? args.package : undefined; resourceInputs["project"] = args ? args.project : undefined; resourceInputs["type"] = args ? args.type : undefined; resourceInputs["uuid"] = args ? args.uuid : undefined; resourceInputs["changeLogs"] = undefined /*out*/; resourceInputs["connectionsCount"] = undefined /*out*/; resourceInputs["equinixAsn"] = undefined /*out*/; resourceInputs["state"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(CloudRouter.__pulumiType, name, resourceInputs, opts); } } exports.CloudRouter = CloudRouter; /** @internal */ CloudRouter.__pulumiType = 'equinix:fabric/cloudRouter:CloudRouter'; //# sourceMappingURL=cloudRouter.js.map