UNPKG

@volcengine/pulumi

Version:

A Pulumi package for creating and managing volcengine cloud resources.

105 lines 4.75 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.ServerGroupServer = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides a resource to manage alb server group server * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as volcengine from "@volcengine/pulumi"; * * const foo = new volcengine.alb.ServerGroupServer("foo", { * description: "test add server group server ecs1", * instanceId: "i-ycony2kef4ygp2f8cgmk", * ip: "172.16.0.3", * port: 5679, * serverGroupId: "rsp-1g7317vrcx3pc2zbhq4c3i6a2", * type: "ecs", * weight: 30, * }); * ``` * * ## Import * * AlbServerGroupServer can be imported using the server_group_id:server_id, e.g. * * ```sh * $ pulumi import volcengine:alb/serverGroupServer:ServerGroupServer default rsp-274xltv2*****8tlv3q3s:rs-3ciynux6i1x4w****rszh49sj * ``` */ class ServerGroupServer extends pulumi.CustomResource { /** * Get an existing ServerGroupServer 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 ServerGroupServer(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of ServerGroupServer. 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'] === ServerGroupServer.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["instanceId"] = state ? state.instanceId : undefined; resourceInputs["ip"] = state ? state.ip : undefined; resourceInputs["port"] = state ? state.port : undefined; resourceInputs["serverGroupId"] = state ? state.serverGroupId : undefined; resourceInputs["serverId"] = state ? state.serverId : undefined; resourceInputs["type"] = state ? state.type : undefined; resourceInputs["weight"] = state ? state.weight : undefined; } else { const args = argsOrState; if ((!args || args.instanceId === undefined) && !opts.urn) { throw new Error("Missing required property 'instanceId'"); } if ((!args || args.ip === undefined) && !opts.urn) { throw new Error("Missing required property 'ip'"); } if ((!args || args.port === undefined) && !opts.urn) { throw new Error("Missing required property 'port'"); } if ((!args || args.serverGroupId === undefined) && !opts.urn) { throw new Error("Missing required property 'serverGroupId'"); } if ((!args || args.type === undefined) && !opts.urn) { throw new Error("Missing required property 'type'"); } resourceInputs["description"] = args ? args.description : undefined; resourceInputs["instanceId"] = args ? args.instanceId : undefined; resourceInputs["ip"] = args ? args.ip : undefined; resourceInputs["port"] = args ? args.port : undefined; resourceInputs["serverGroupId"] = args ? args.serverGroupId : undefined; resourceInputs["type"] = args ? args.type : undefined; resourceInputs["weight"] = args ? args.weight : undefined; resourceInputs["serverId"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(ServerGroupServer.__pulumiType, name, resourceInputs, opts); } } exports.ServerGroupServer = ServerGroupServer; /** @internal */ ServerGroupServer.__pulumiType = 'volcengine:alb/serverGroupServer:ServerGroupServer'; //# sourceMappingURL=serverGroupServer.js.map