UNPKG

@volcengine/pulumi

Version:

A Pulumi package for creating and managing volcengine cloud resources.

223 lines (222 loc) 7.67 kB
import * as pulumi from "@pulumi/pulumi"; /** * Provides a resource to manage server group server * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as volcengine from "@pulumi/volcengine"; * import * as volcengine from "@volcengine/pulumi"; * * const fooZones = volcengine.ecs.getZones({}); * const fooVpc = new volcengine.vpc.Vpc("fooVpc", { * vpcName: "acc-test-vpc", * cidrBlock: "172.16.0.0/16", * }); * const fooSubnet = new volcengine.vpc.Subnet("fooSubnet", { * subnetName: "acc-test-subnet", * cidrBlock: "172.16.0.0/24", * zoneId: fooZones.then(fooZones => fooZones.zones?.[0]?.id), * vpcId: fooVpc.id, * }); * const fooClb = new volcengine.clb.Clb("fooClb", { * type: "public", * subnetId: fooSubnet.id, * loadBalancerSpec: "small_1", * description: "acc0Demo", * loadBalancerName: "acc-test-create", * eipBillingConfig: { * isp: "BGP", * eipBillingType: "PostPaidByBandwidth", * bandwidth: 1, * }, * }); * const fooServerGroup = new volcengine.clb.ServerGroup("fooServerGroup", { * loadBalancerId: fooClb.id, * serverGroupName: "acc-test-create", * description: "hello demo11", * type: "instance", * }); * const fooIpServerGroup = new volcengine.clb.ServerGroup("fooIpServerGroup", { * loadBalancerId: fooClb.id, * serverGroupName: "acc-test-create-ip", * description: "hello demo ip server group", * type: "ip", * }); * const fooSecurityGroup = new volcengine.vpc.SecurityGroup("fooSecurityGroup", { * vpcId: fooVpc.id, * securityGroupName: "acc-test-security-group", * }); * const fooInstance = new volcengine.ecs.Instance("fooInstance", { * imageId: "image-ycjwwciuzy5pkh54xx8f", * instanceType: "ecs.c3i.large", * instanceName: "acc-test-ecs-name", * password: "93f0cb0614Aab12", * instanceChargeType: "PostPaid", * systemVolumeType: "ESSD_PL0", * systemVolumeSize: 40, * subnetId: fooSubnet.id, * securityGroupIds: [fooSecurityGroup.id], * }); * const fooServerGroupServer = new volcengine.clb.ServerGroupServer("fooServerGroupServer", { * serverGroupId: fooServerGroup.id, * instanceId: fooInstance.id, * type: "ecs", * weight: 100, * port: 80, * description: "This is a acc test server", * }); * const fooEni = new volcengine.clb.ServerGroupServer("fooEni", { * serverGroupId: fooServerGroup.id, * instanceId: "eni-btgpz5my7ta85h0b2ur*****", * type: "eni", * weight: 100, * port: 8080, * description: "This is a acc test server use eni", * }); * const fooIpServerGroupServer = new volcengine.clb.ServerGroupServer("fooIpServerGroupServer", { * serverGroupId: fooIpServerGroup.id, * instanceId: "192.168.*.*", * ip: "192.168.*.*", * type: "ip", * weight: 80, * port: 400, * description: "This is a acc test server use ip", * }); * ``` * * ## Import * * ServerGroupServer can be imported using the id, e.g. * * ```sh * $ pulumi import volcengine:clb/serverGroupServer:ServerGroupServer default rsp-274xltv2*****8tlv3q3s:rs-3ciynux6i1x4w****rszh49sj * ``` */ export declare 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: string, id: pulumi.Input<pulumi.ID>, state?: ServerGroupServerState, opts?: pulumi.CustomResourceOptions): ServerGroupServer; /** * 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: any): obj is ServerGroupServer; /** * The description of the instance. */ readonly description: pulumi.Output<string | undefined>; /** * The ID of ecs instance or the network card bound to ecs instance. When the `type` is `ip`, this parameter is an IP address. */ readonly instanceId: pulumi.Output<string>; /** * The private ip of the instance. */ readonly ip: pulumi.Output<string>; /** * The port receiving request. */ readonly port: pulumi.Output<number>; /** * The ID of the ServerGroup. */ readonly serverGroupId: pulumi.Output<string>; /** * The server id of instance in ServerGroup. */ readonly serverId: pulumi.Output<string>; /** * The type of instance. Optional choice contains `ecs`, `eni`, `ip`. When the `type` of `serverGroupId` is `ip`, only `ip` is supported. */ readonly type: pulumi.Output<string>; /** * The weight of the instance, range in 0~100. */ readonly weight: pulumi.Output<number | undefined>; /** * Create a ServerGroupServer resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: ServerGroupServerArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering ServerGroupServer resources. */ export interface ServerGroupServerState { /** * The description of the instance. */ description?: pulumi.Input<string>; /** * The ID of ecs instance or the network card bound to ecs instance. When the `type` is `ip`, this parameter is an IP address. */ instanceId?: pulumi.Input<string>; /** * The private ip of the instance. */ ip?: pulumi.Input<string>; /** * The port receiving request. */ port?: pulumi.Input<number>; /** * The ID of the ServerGroup. */ serverGroupId?: pulumi.Input<string>; /** * The server id of instance in ServerGroup. */ serverId?: pulumi.Input<string>; /** * The type of instance. Optional choice contains `ecs`, `eni`, `ip`. When the `type` of `serverGroupId` is `ip`, only `ip` is supported. */ type?: pulumi.Input<string>; /** * The weight of the instance, range in 0~100. */ weight?: pulumi.Input<number>; } /** * The set of arguments for constructing a ServerGroupServer resource. */ export interface ServerGroupServerArgs { /** * The description of the instance. */ description?: pulumi.Input<string>; /** * The ID of ecs instance or the network card bound to ecs instance. When the `type` is `ip`, this parameter is an IP address. */ instanceId: pulumi.Input<string>; /** * The private ip of the instance. */ ip?: pulumi.Input<string>; /** * The port receiving request. */ port: pulumi.Input<number>; /** * The ID of the ServerGroup. */ serverGroupId: pulumi.Input<string>; /** * The type of instance. Optional choice contains `ecs`, `eni`, `ip`. When the `type` of `serverGroupId` is `ip`, only `ip` is supported. */ type: pulumi.Input<string>; /** * The weight of the instance, range in 0~100. */ weight?: pulumi.Input<number>; }