UNPKG

@pulumi/linode

Version:

A Pulumi package for creating and managing linode cloud resources.

85 lines 4.39 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.NodeBalancerNode = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Provides a Linode NodeBalancer Node resource. This can be used to create, modify, and delete Linodes NodeBalancer Nodes. * For more information, see [Getting Started with NodeBalancers](https://www.linode.com/docs/platform/nodebalancer/getting-started-with-nodebalancers/) and the [Linode APIv4 docs](https://techdocs.akamai.com/linode-api/reference/post-node-balancer-node). * * ## Import * * NodeBalancer Nodes can be imported using the NodeBalancer `nodebalancer_id` followed by the NodeBalancer Config `config_id` followed by the NodeBalancer Node `id`, separated by a comma, e.g. * * ```sh * $ pulumi import linode:index/nodeBalancerNode:NodeBalancerNode https-foobar-1 1234567,7654321,9999999 * ``` */ class NodeBalancerNode extends pulumi.CustomResource { /** * Get an existing NodeBalancerNode 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 NodeBalancerNode(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of NodeBalancerNode. 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'] === NodeBalancerNode.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["address"] = state ? state.address : undefined; resourceInputs["configId"] = state ? state.configId : undefined; resourceInputs["label"] = state ? state.label : undefined; resourceInputs["mode"] = state ? state.mode : undefined; resourceInputs["nodebalancerId"] = state ? state.nodebalancerId : undefined; resourceInputs["status"] = state ? state.status : undefined; resourceInputs["weight"] = state ? state.weight : undefined; } else { const args = argsOrState; if ((!args || args.address === undefined) && !opts.urn) { throw new Error("Missing required property 'address'"); } if ((!args || args.configId === undefined) && !opts.urn) { throw new Error("Missing required property 'configId'"); } if ((!args || args.label === undefined) && !opts.urn) { throw new Error("Missing required property 'label'"); } if ((!args || args.nodebalancerId === undefined) && !opts.urn) { throw new Error("Missing required property 'nodebalancerId'"); } resourceInputs["address"] = args ? args.address : undefined; resourceInputs["configId"] = args ? args.configId : undefined; resourceInputs["label"] = args ? args.label : undefined; resourceInputs["mode"] = args ? args.mode : undefined; resourceInputs["nodebalancerId"] = args ? args.nodebalancerId : undefined; resourceInputs["weight"] = args ? args.weight : undefined; resourceInputs["status"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(NodeBalancerNode.__pulumiType, name, resourceInputs, opts); } } exports.NodeBalancerNode = NodeBalancerNode; /** @internal */ NodeBalancerNode.__pulumiType = 'linode:index/nodeBalancerNode:NodeBalancerNode'; //# sourceMappingURL=nodeBalancerNode.js.map