UNPKG

@volcengine/pulumi

Version:

A Pulumi package for creating and managing volcengine cloud resources.

202 lines (201 loc) 7.03 kB
import * as pulumi from "@pulumi/pulumi"; import * as outputs from "../types/output"; /** * Use this data source to query detailed information of server group servers * ## 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", * }); * 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 fooServerGroupServers = volcengine.clb.getServerGroupServersOutput({ * ids: [pulumi.all([fooServerGroupServer.id.apply(id => id.split(":")), fooServerGroupServer.id.apply(id => id.split(":")).length]).apply(([split, length]) => split[length - 1])], * serverGroupId: fooServerGroup.id, * }); * ``` */ /** @deprecated volcengine.clb.ServerGroupServers has been deprecated in favor of volcengine.clb.getServerGroupServers */ export declare function serverGroupServers(args: ServerGroupServersArgs, opts?: pulumi.InvokeOptions): Promise<ServerGroupServersResult>; /** * A collection of arguments for invoking ServerGroupServers. */ export interface ServerGroupServersArgs { /** * The list of ServerGroupServer IDs. */ ids?: string[]; /** * A Name Regex of ServerGroupServer. */ nameRegex?: string; /** * File name where to save data source results. */ outputFile?: string; /** * The ID of the ServerGroup. */ serverGroupId: string; } /** * A collection of values returned by ServerGroupServers. */ export interface ServerGroupServersResult { /** * The provider-assigned unique ID for this managed resource. */ readonly id: string; readonly ids?: string[]; readonly nameRegex?: string; readonly outputFile?: string; readonly serverGroupId: string; /** * The server list of ServerGroup. */ readonly servers: outputs.clb.ServerGroupServersServer[]; /** * The total count of ServerGroupServer query. */ readonly totalCount: number; } /** * Use this data source to query detailed information of server group servers * ## 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", * }); * 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 fooServerGroupServers = volcengine.clb.getServerGroupServersOutput({ * ids: [pulumi.all([fooServerGroupServer.id.apply(id => id.split(":")), fooServerGroupServer.id.apply(id => id.split(":")).length]).apply(([split, length]) => split[length - 1])], * serverGroupId: fooServerGroup.id, * }); * ``` */ /** @deprecated volcengine.clb.ServerGroupServers has been deprecated in favor of volcengine.clb.getServerGroupServers */ export declare function serverGroupServersOutput(args: ServerGroupServersOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output<ServerGroupServersResult>; /** * A collection of arguments for invoking ServerGroupServers. */ export interface ServerGroupServersOutputArgs { /** * The list of ServerGroupServer IDs. */ ids?: pulumi.Input<pulumi.Input<string>[]>; /** * A Name Regex of ServerGroupServer. */ nameRegex?: pulumi.Input<string>; /** * File name where to save data source results. */ outputFile?: pulumi.Input<string>; /** * The ID of the ServerGroup. */ serverGroupId: pulumi.Input<string>; }