UNPKG

@cuemby/equinix

Version:

A Pulumi package for creating and managing equinix cloud resources.

92 lines 4.88 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.MetalIPAttachment = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Provides a resource to attach elastic IP subnets to devices. * * To attach an IP subnet from a reserved block to a provisioned device, you must derive a subnet CIDR * belonging to one of your reserved blocks in the same project and facility as the target device. * * For example, you have reserved IPv4 address block `147.229.10.152/30`, you can choose to assign * either the whole block as one subnet to a device; or 2 subnets with CIDRs `147.229.10.152/31` and * `147.229.10.154/31`; or 4 subnets with mask prefix length `32`. More about the elastic IP subnets * is [here](https://metal.equinix.com/developers/docs/networking/elastic-ips/). * * Device and reserved block must be in the same facility. */ class MetalIPAttachment extends pulumi.CustomResource { constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["address"] = state ? state.address : undefined; resourceInputs["addressFamily"] = state ? state.addressFamily : undefined; resourceInputs["cidr"] = state ? state.cidr : undefined; resourceInputs["cidrNotation"] = state ? state.cidrNotation : undefined; resourceInputs["deviceId"] = state ? state.deviceId : undefined; resourceInputs["gateway"] = state ? state.gateway : undefined; resourceInputs["global"] = state ? state.global : undefined; resourceInputs["manageable"] = state ? state.manageable : undefined; resourceInputs["management"] = state ? state.management : undefined; resourceInputs["netmask"] = state ? state.netmask : undefined; resourceInputs["network"] = state ? state.network : undefined; resourceInputs["public"] = state ? state.public : undefined; resourceInputs["vrfId"] = state ? state.vrfId : undefined; } else { const args = argsOrState; if ((!args || args.cidrNotation === undefined) && !opts.urn) { throw new Error("Missing required property 'cidrNotation'"); } if ((!args || args.deviceId === undefined) && !opts.urn) { throw new Error("Missing required property 'deviceId'"); } resourceInputs["cidrNotation"] = args ? args.cidrNotation : undefined; resourceInputs["deviceId"] = args ? args.deviceId : undefined; resourceInputs["address"] = undefined /*out*/; resourceInputs["addressFamily"] = undefined /*out*/; resourceInputs["cidr"] = undefined /*out*/; resourceInputs["gateway"] = undefined /*out*/; resourceInputs["global"] = undefined /*out*/; resourceInputs["manageable"] = undefined /*out*/; resourceInputs["management"] = undefined /*out*/; resourceInputs["netmask"] = undefined /*out*/; resourceInputs["network"] = undefined /*out*/; resourceInputs["public"] = undefined /*out*/; resourceInputs["vrfId"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(MetalIPAttachment.__pulumiType, name, resourceInputs, opts); } /** * Get an existing MetalIPAttachment 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 MetalIPAttachment(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of MetalIPAttachment. 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'] === MetalIPAttachment.__pulumiType; } } exports.MetalIPAttachment = MetalIPAttachment; /** @internal */ MetalIPAttachment.__pulumiType = 'equinix:index/metalIPAttachment:MetalIPAttachment'; //# sourceMappingURL=metalIPAttachment.js.map