UNPKG

@pulumi/linode

Version:

A Pulumi package for creating and managing linode cloud resources.

99 lines 4.69 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.NodeBalancer = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Provides a Linode NodeBalancer resource. This can be used to create, modify, and delete Linodes NodeBalancers in Linode's managed load balancer service. * 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). * * ## Example Usage * * The following example shows how one might use this resource to configure a NodeBalancer. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as linode from "@pulumi/linode"; * * const foobar = new linode.NodeBalancer("foobar", { * label: "mynodebalancer", * region: "us-east", * clientConnThrottle: 20, * tags: ["foobar"], * }); * ``` * * ## Import * * Linodes NodeBalancers can be imported using the Linode NodeBalancer `id`, e.g. * * ```sh * $ pulumi import linode:index/nodeBalancer:NodeBalancer mynodebalancer 1234567 * ``` */ class NodeBalancer extends pulumi.CustomResource { /** * Get an existing NodeBalancer 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 NodeBalancer(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of NodeBalancer. 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'] === NodeBalancer.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["clientConnThrottle"] = state ? state.clientConnThrottle : undefined; resourceInputs["created"] = state ? state.created : undefined; resourceInputs["firewallId"] = state ? state.firewallId : undefined; resourceInputs["firewalls"] = state ? state.firewalls : undefined; resourceInputs["hostname"] = state ? state.hostname : undefined; resourceInputs["ipv4"] = state ? state.ipv4 : undefined; resourceInputs["ipv6"] = state ? state.ipv6 : undefined; resourceInputs["label"] = state ? state.label : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["tags"] = state ? state.tags : undefined; resourceInputs["transfers"] = state ? state.transfers : undefined; resourceInputs["updated"] = state ? state.updated : undefined; } else { const args = argsOrState; resourceInputs["clientConnThrottle"] = args ? args.clientConnThrottle : undefined; resourceInputs["firewallId"] = args ? args.firewallId : undefined; resourceInputs["label"] = args ? args.label : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["tags"] = args ? args.tags : undefined; resourceInputs["created"] = undefined /*out*/; resourceInputs["firewalls"] = undefined /*out*/; resourceInputs["hostname"] = undefined /*out*/; resourceInputs["ipv4"] = undefined /*out*/; resourceInputs["ipv6"] = undefined /*out*/; resourceInputs["transfers"] = undefined /*out*/; resourceInputs["updated"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(NodeBalancer.__pulumiType, name, resourceInputs, opts); } } exports.NodeBalancer = NodeBalancer; /** @internal */ NodeBalancer.__pulumiType = 'linode:index/nodeBalancer:NodeBalancer'; //# sourceMappingURL=nodeBalancer.js.map