@pulumi/linode
Version:
A Pulumi package for creating and managing linode cloud resources.
85 lines • 4.06 kB
JavaScript
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** 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, { ...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?.address;
resourceInputs["configId"] = state?.configId;
resourceInputs["label"] = state?.label;
resourceInputs["mode"] = state?.mode;
resourceInputs["nodebalancerId"] = state?.nodebalancerId;
resourceInputs["status"] = state?.status;
resourceInputs["weight"] = state?.weight;
}
else {
const args = argsOrState;
if (args?.address === undefined && !opts.urn) {
throw new Error("Missing required property 'address'");
}
if (args?.configId === undefined && !opts.urn) {
throw new Error("Missing required property 'configId'");
}
if (args?.label === undefined && !opts.urn) {
throw new Error("Missing required property 'label'");
}
if (args?.nodebalancerId === undefined && !opts.urn) {
throw new Error("Missing required property 'nodebalancerId'");
}
resourceInputs["address"] = args?.address;
resourceInputs["configId"] = args?.configId;
resourceInputs["label"] = args?.label;
resourceInputs["mode"] = args?.mode;
resourceInputs["nodebalancerId"] = args?.nodebalancerId;
resourceInputs["weight"] = args?.weight;
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
;