@pulumi/f5bigip
Version:
A Pulumi package for creating and managing F5 BigIP resources.
103 lines • 4.69 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.Pool = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* `f5bigip.ltm.Pool` Manages F5 BIG-IP LTM pools via iControl REST API.
*
* For resources should be named with their `full path`. The full path is the combination of the `partition + name` of the resource or `partition + directory + name`.
* For example `/Common/my-pool`.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as f5bigip from "@pulumi/f5bigip";
*
* const monitor = new f5bigip.ltm.Monitor("monitor", {
* name: "/Common/terraform_monitor",
* parent: "/Common/http",
* });
* const pool = new f5bigip.ltm.Pool("pool", {
* name: "/Common/Axiom_Environment_APP1_Pool",
* loadBalancingMode: "round-robin",
* minimumActiveMembers: 1,
* monitors: [monitor.name],
* });
* ```
*
* ## Importing
*
* An existing pool can be imported into this resource by supplying pool Name in `full path` as `id`.
* An example is below:
* ```sh
* $ terraform import bigip_ltm_pool.k8s_prod_import /Common/k8prod_Pool
*
* ```
*/
class Pool extends pulumi.CustomResource {
/**
* Get an existing Pool 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 Pool(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of Pool. 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'] === Pool.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["allowNat"] = state ? state.allowNat : undefined;
resourceInputs["allowSnat"] = state ? state.allowSnat : undefined;
resourceInputs["description"] = state ? state.description : undefined;
resourceInputs["loadBalancingMode"] = state ? state.loadBalancingMode : undefined;
resourceInputs["minimumActiveMembers"] = state ? state.minimumActiveMembers : undefined;
resourceInputs["monitors"] = state ? state.monitors : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["reselectTries"] = state ? state.reselectTries : undefined;
resourceInputs["serviceDownAction"] = state ? state.serviceDownAction : undefined;
resourceInputs["slowRampTime"] = state ? state.slowRampTime : undefined;
}
else {
const args = argsOrState;
if ((!args || args.name === undefined) && !opts.urn) {
throw new Error("Missing required property 'name'");
}
resourceInputs["allowNat"] = args ? args.allowNat : undefined;
resourceInputs["allowSnat"] = args ? args.allowSnat : undefined;
resourceInputs["description"] = args ? args.description : undefined;
resourceInputs["loadBalancingMode"] = args ? args.loadBalancingMode : undefined;
resourceInputs["minimumActiveMembers"] = args ? args.minimumActiveMembers : undefined;
resourceInputs["monitors"] = args ? args.monitors : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["reselectTries"] = args ? args.reselectTries : undefined;
resourceInputs["serviceDownAction"] = args ? args.serviceDownAction : undefined;
resourceInputs["slowRampTime"] = args ? args.slowRampTime : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Pool.__pulumiType, name, resourceInputs, opts);
}
}
exports.Pool = Pool;
/** @internal */
Pool.__pulumiType = 'f5bigip:ltm/pool:Pool';
//# sourceMappingURL=pool.js.map