UNPKG

@pulumi/openstack

Version:

A Pulumi package for creating and managing OpenStack cloud resources.

120 lines 5.91 kB
"use strict"; // *** 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.Pool = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Manages a V2 pool resource within OpenStack. * * > **Note:** This resource has attributes that depend on octavia minor versions. * Please ensure your Openstack cloud supports the required minor version. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as openstack from "@pulumi/openstack"; * * const pool1 = new openstack.loadbalancer.Pool("pool_1", { * protocol: "HTTP", * lbMethod: "ROUND_ROBIN", * listenerId: "d9415786-5f1a-428b-b35f-2f1523e146d2", * persistence: { * type: "APP_COOKIE", * cookieName: "testCookie", * }, * }); * ``` * * ## Import * * Load Balancer Pool can be imported using the Pool ID, e.g.: * * ```sh * $ pulumi import openstack:loadbalancer/pool:Pool pool_1 60ad9ee4-249a-4d60-a45b-aa60e046c513 * ``` */ 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["adminStateUp"] = state ? state.adminStateUp : undefined; resourceInputs["alpnProtocols"] = state ? state.alpnProtocols : undefined; resourceInputs["caTlsContainerRef"] = state ? state.caTlsContainerRef : undefined; resourceInputs["crlContainerRef"] = state ? state.crlContainerRef : undefined; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["lbMethod"] = state ? state.lbMethod : undefined; resourceInputs["listenerId"] = state ? state.listenerId : undefined; resourceInputs["loadbalancerId"] = state ? state.loadbalancerId : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["persistence"] = state ? state.persistence : undefined; resourceInputs["protocol"] = state ? state.protocol : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["tags"] = state ? state.tags : undefined; resourceInputs["tenantId"] = state ? state.tenantId : undefined; resourceInputs["tlsCiphers"] = state ? state.tlsCiphers : undefined; resourceInputs["tlsContainerRef"] = state ? state.tlsContainerRef : undefined; resourceInputs["tlsEnabled"] = state ? state.tlsEnabled : undefined; resourceInputs["tlsVersions"] = state ? state.tlsVersions : undefined; } else { const args = argsOrState; if ((!args || args.lbMethod === undefined) && !opts.urn) { throw new Error("Missing required property 'lbMethod'"); } if ((!args || args.protocol === undefined) && !opts.urn) { throw new Error("Missing required property 'protocol'"); } resourceInputs["adminStateUp"] = args ? args.adminStateUp : undefined; resourceInputs["alpnProtocols"] = args ? args.alpnProtocols : undefined; resourceInputs["caTlsContainerRef"] = args ? args.caTlsContainerRef : undefined; resourceInputs["crlContainerRef"] = args ? args.crlContainerRef : undefined; resourceInputs["description"] = args ? args.description : undefined; resourceInputs["lbMethod"] = args ? args.lbMethod : undefined; resourceInputs["listenerId"] = args ? args.listenerId : undefined; resourceInputs["loadbalancerId"] = args ? args.loadbalancerId : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["persistence"] = args ? args.persistence : undefined; resourceInputs["protocol"] = args ? args.protocol : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["tags"] = args ? args.tags : undefined; resourceInputs["tenantId"] = args ? args.tenantId : undefined; resourceInputs["tlsCiphers"] = args ? args.tlsCiphers : undefined; resourceInputs["tlsContainerRef"] = args ? args.tlsContainerRef : undefined; resourceInputs["tlsEnabled"] = args ? args.tlsEnabled : undefined; resourceInputs["tlsVersions"] = args ? args.tlsVersions : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Pool.__pulumiType, name, resourceInputs, opts); } } exports.Pool = Pool; /** @internal */ Pool.__pulumiType = 'openstack:loadbalancer/pool:Pool'; //# sourceMappingURL=pool.js.map