@pulumi/f5bigip
Version:
A Pulumi package for creating and managing F5 BigIP resources.
113 lines • 5.07 kB
JavaScript
;
// *** 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.Node = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* `f5bigip.ltm.Node` Manages a node configuration
*
* For resources should be named with their `full path`.The full path is the combination of the `partition + name` of the resource( example: `/Common/my-node` ) or `partition + Direcroty + name` of the resource ( example: `/Common/test/my-node` ).
* When including directory in `full path` we have to make sure it is created in the given partition before using it.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as f5bigip from "@pulumi/f5bigip";
*
* const node = new f5bigip.ltm.Node("node", {
* name: "/Common/terraform_node1",
* address: "192.168.30.1",
* connectionLimit: 0,
* dynamicRatio: 1,
* monitor: "/Common/icmp",
* description: "Test-Node",
* rateLimit: "disabled",
* fqdn: {
* addressFamily: "ipv4",
* interval: "3000",
* },
* });
* ```
*
* ## Importing
*
* An existing Node can be imported into this resource by supplying Node Name in `full path` as `id`.
* An example is below:
* ```sh
* $ terraform import bigip_ltm_node.site2_node "/TEST/testnode"
* (or)
* $ terraform import bigip_ltm_node.site2_node "/Common/3.3.3.3"
*
* ```
*/
class Node extends pulumi.CustomResource {
/**
* Get an existing Node 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 Node(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of Node. 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'] === Node.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["address"] = state ? state.address : undefined;
resourceInputs["connectionLimit"] = state ? state.connectionLimit : undefined;
resourceInputs["description"] = state ? state.description : undefined;
resourceInputs["dynamicRatio"] = state ? state.dynamicRatio : undefined;
resourceInputs["fqdn"] = state ? state.fqdn : undefined;
resourceInputs["monitor"] = state ? state.monitor : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["rateLimit"] = state ? state.rateLimit : undefined;
resourceInputs["ratio"] = state ? state.ratio : undefined;
resourceInputs["session"] = state ? state.session : undefined;
resourceInputs["state"] = state ? state.state : undefined;
}
else {
const args = argsOrState;
if ((!args || args.address === undefined) && !opts.urn) {
throw new Error("Missing required property 'address'");
}
if ((!args || args.name === undefined) && !opts.urn) {
throw new Error("Missing required property 'name'");
}
resourceInputs["address"] = args ? args.address : undefined;
resourceInputs["connectionLimit"] = args ? args.connectionLimit : undefined;
resourceInputs["description"] = args ? args.description : undefined;
resourceInputs["dynamicRatio"] = args ? args.dynamicRatio : undefined;
resourceInputs["fqdn"] = args ? args.fqdn : undefined;
resourceInputs["monitor"] = args ? args.monitor : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["rateLimit"] = args ? args.rateLimit : undefined;
resourceInputs["ratio"] = args ? args.ratio : undefined;
resourceInputs["session"] = args ? args.session : undefined;
resourceInputs["state"] = args ? args.state : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Node.__pulumiType, name, resourceInputs, opts);
}
}
exports.Node = Node;
/** @internal */
Node.__pulumiType = 'f5bigip:ltm/node:Node';
//# sourceMappingURL=node.js.map