@equinix-labs/pulumi-equinix
Version:
A Pulumi package for creating and managing equinix cloud resources.
140 lines • 7.15 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.ServiceProfile = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Fabric V4 API compatible resource allows creation and management of Equinix Fabric Service Profile
*
* Additional documentation:
* * Getting Started: https://docs.equinix.com/en-us/Content/Interconnection/Fabric/IMPLEMENTATION/fabric-Sprofiles-implement.htm
* * API: https://developer.equinix.com/dev-docs/fabric/api-reference/fabric-v4-apis#service-profiles
*
* ## Example Usage
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as equinix from "@equinix-labs/pulumi-equinix";
*
* const newServiceProfile = new equinix.fabric.ServiceProfile("newServiceProfile", {
* description: "Service Profile for Receiving Connections",
* name: "Name Of Business + Use Case Tag",
* type: equinix.fabric.ProfileType.L2Profile,
* visibility: equinix.fabric.ProfileVisibility.Public,
* notifications: [{
* emails: ["someone@sample.com"],
* type: "BANDWIDTH_ALERT",
* }],
* allowedEmails: [
* "test@equinix.com",
* "testagain@equinix.com",
* ],
* ports: [{
* uuid: "c791f8cb-5cc9-cc90-8ce0-306a5c00a4ee",
* type: "XF_PORT",
* }],
* accessPointTypeConfigs: [{
* type: equinix.fabric.ProfileAccessPointType.Colo,
* allowRemoteConnections: true,
* allowCustomBandwidth: true,
* allowBandwidthAutoApproval: false,
* connectionRedundancyRequired: false,
* connectionLabel: "Service Profile Tag1",
* bandwidthAlertThreshold: 10,
* supportedBandwidths: [
* 100,
* 500,
* ],
* }],
* });
* ```
*/
class ServiceProfile extends pulumi.CustomResource {
/**
* Get an existing ServiceProfile 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 ServiceProfile(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of ServiceProfile. 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'] === ServiceProfile.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["accessPointTypeConfigs"] = state ? state.accessPointTypeConfigs : undefined;
resourceInputs["account"] = state ? state.account : undefined;
resourceInputs["allowedEmails"] = state ? state.allowedEmails : undefined;
resourceInputs["changeLog"] = state ? state.changeLog : undefined;
resourceInputs["customFields"] = state ? state.customFields : undefined;
resourceInputs["description"] = state ? state.description : undefined;
resourceInputs["href"] = state ? state.href : undefined;
resourceInputs["marketingInfo"] = state ? state.marketingInfo : undefined;
resourceInputs["metros"] = state ? state.metros : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["notifications"] = state ? state.notifications : undefined;
resourceInputs["ports"] = state ? state.ports : undefined;
resourceInputs["project"] = state ? state.project : undefined;
resourceInputs["selfProfile"] = state ? state.selfProfile : undefined;
resourceInputs["state"] = state ? state.state : undefined;
resourceInputs["tags"] = state ? state.tags : undefined;
resourceInputs["type"] = state ? state.type : undefined;
resourceInputs["uuid"] = state ? state.uuid : undefined;
resourceInputs["viewPoint"] = state ? state.viewPoint : undefined;
resourceInputs["virtualDevices"] = state ? state.virtualDevices : undefined;
resourceInputs["visibility"] = state ? state.visibility : undefined;
}
else {
const args = argsOrState;
if ((!args || args.description === undefined) && !opts.urn) {
throw new Error("Missing required property 'description'");
}
if ((!args || args.type === undefined) && !opts.urn) {
throw new Error("Missing required property 'type'");
}
resourceInputs["accessPointTypeConfigs"] = args ? args.accessPointTypeConfigs : undefined;
resourceInputs["allowedEmails"] = args ? args.allowedEmails : undefined;
resourceInputs["customFields"] = args ? args.customFields : undefined;
resourceInputs["description"] = args ? args.description : undefined;
resourceInputs["marketingInfo"] = args ? args.marketingInfo : undefined;
resourceInputs["metros"] = args ? args.metros : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["notifications"] = args ? args.notifications : undefined;
resourceInputs["ports"] = args ? args.ports : undefined;
resourceInputs["project"] = args ? args.project : undefined;
resourceInputs["selfProfile"] = args ? args.selfProfile : undefined;
resourceInputs["state"] = args ? args.state : undefined;
resourceInputs["tags"] = args ? args.tags : undefined;
resourceInputs["type"] = args ? args.type : undefined;
resourceInputs["viewPoint"] = args ? args.viewPoint : undefined;
resourceInputs["virtualDevices"] = args ? args.virtualDevices : undefined;
resourceInputs["visibility"] = args ? args.visibility : undefined;
resourceInputs["account"] = undefined /*out*/;
resourceInputs["changeLog"] = undefined /*out*/;
resourceInputs["href"] = undefined /*out*/;
resourceInputs["uuid"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(ServiceProfile.__pulumiType, name, resourceInputs, opts);
}
}
exports.ServiceProfile = ServiceProfile;
/** @internal */
ServiceProfile.__pulumiType = 'equinix:fabric/serviceProfile:ServiceProfile';
//# sourceMappingURL=serviceProfile.js.map