UNPKG

@pulumi/linode

Version:

A Pulumi package for creating and managing linode cloud resources.

95 lines 4.21 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.NetworkingIp = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Manages allocation of reserved IPv4 address in a region and optionally assigning the reserved address to a Linode instance. * * For more information, see the corresponding [API documentation](https://techdocs.akamai.com/linode-api/reference/post-allocate-ip). * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as linode from "@pulumi/linode"; * * const testIp = new linode.NetworkingIp("test_ip", { * type: "ipv4", * linodeId: 12345, * "public": true, * }); * ``` * * ## Import * * IP addresses can be imported using the IP address ID, e.g. * * ```sh * $ pulumi import linode:index/networkingIp:NetworkingIp example_ip 172.104.30.209 * ``` */ class NetworkingIp extends pulumi.CustomResource { /** * Get an existing NetworkingIp 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 NetworkingIp(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of NetworkingIp. 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'] === NetworkingIp.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["address"] = state ? state.address : undefined; resourceInputs["gateway"] = state ? state.gateway : undefined; resourceInputs["linodeId"] = state ? state.linodeId : undefined; resourceInputs["prefix"] = state ? state.prefix : undefined; resourceInputs["public"] = state ? state.public : undefined; resourceInputs["rdns"] = state ? state.rdns : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["reserved"] = state ? state.reserved : undefined; resourceInputs["subnetMask"] = state ? state.subnetMask : undefined; resourceInputs["type"] = state ? state.type : undefined; resourceInputs["vpcNat11"] = state ? state.vpcNat11 : undefined; } else { const args = argsOrState; resourceInputs["linodeId"] = args ? args.linodeId : undefined; resourceInputs["public"] = args ? args.public : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["reserved"] = args ? args.reserved : undefined; resourceInputs["type"] = args ? args.type : undefined; resourceInputs["address"] = undefined /*out*/; resourceInputs["gateway"] = undefined /*out*/; resourceInputs["prefix"] = undefined /*out*/; resourceInputs["rdns"] = undefined /*out*/; resourceInputs["subnetMask"] = undefined /*out*/; resourceInputs["vpcNat11"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(NetworkingIp.__pulumiType, name, resourceInputs, opts); } } exports.NetworkingIp = NetworkingIp; /** @internal */ NetworkingIp.__pulumiType = 'linode:index/networkingIp:NetworkingIp'; //# sourceMappingURL=networkingIp.js.map