UNPKG

@pulumi/openstack

Version:

A Pulumi package for creating and managing OpenStack cloud resources.

107 lines 4.46 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.Member = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Manages a V2 member resource within OpenStack. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as openstack from "@pulumi/openstack"; * * const member1 = new openstack.loadbalancer.Member("member_1", { * poolId: "935685fb-a896-40f9-9ff4-ae531a3a00fe", * address: "192.168.199.23", * protocolPort: 8080, * }); * ``` * * ## Import * * Load Balancer Pool Member can be imported using the Pool ID and Member ID * separated by a slash, e.g.: * * ```sh * $ pulumi import openstack:loadbalancer/member:Member member_1 c22974d2-4c95-4bcb-9819-0afc5ed303d5/9563b79c-8460-47da-8a95-2711b746510f * ``` */ class Member extends pulumi.CustomResource { /** * Get an existing Member 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 Member(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of Member. 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'] === Member.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["address"] = state?.address; resourceInputs["adminStateUp"] = state?.adminStateUp; resourceInputs["backup"] = state?.backup; resourceInputs["monitorAddress"] = state?.monitorAddress; resourceInputs["monitorPort"] = state?.monitorPort; resourceInputs["name"] = state?.name; resourceInputs["poolId"] = state?.poolId; resourceInputs["protocolPort"] = state?.protocolPort; resourceInputs["region"] = state?.region; resourceInputs["subnetId"] = state?.subnetId; resourceInputs["tags"] = state?.tags; resourceInputs["tenantId"] = state?.tenantId; resourceInputs["weight"] = state?.weight; } else { const args = argsOrState; if (args?.address === undefined && !opts.urn) { throw new Error("Missing required property 'address'"); } if (args?.poolId === undefined && !opts.urn) { throw new Error("Missing required property 'poolId'"); } if (args?.protocolPort === undefined && !opts.urn) { throw new Error("Missing required property 'protocolPort'"); } resourceInputs["address"] = args?.address; resourceInputs["adminStateUp"] = args?.adminStateUp; resourceInputs["backup"] = args?.backup; resourceInputs["monitorAddress"] = args?.monitorAddress; resourceInputs["monitorPort"] = args?.monitorPort; resourceInputs["name"] = args?.name; resourceInputs["poolId"] = args?.poolId; resourceInputs["protocolPort"] = args?.protocolPort; resourceInputs["region"] = args?.region; resourceInputs["subnetId"] = args?.subnetId; resourceInputs["tags"] = args?.tags; resourceInputs["tenantId"] = args?.tenantId; resourceInputs["weight"] = args?.weight; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Member.__pulumiType, name, resourceInputs, opts); } } exports.Member = Member; /** @internal */ Member.__pulumiType = 'openstack:loadbalancer/member:Member'; //# sourceMappingURL=member.js.map