Volcengine v0.0.38 published on Friday, Oct 31, 2025 by Volcengine
Volcengine v0.0.38 published on Friday, Oct 31, 2025 by Volcengine
Use this data source to query detailed information of server group servers
Example Usage
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,
});
import pulumi
import pulumi_volcengine as volcengine
foo_zones = volcengine.ecs.get_zones()
foo_vpc = volcengine.vpc.Vpc("fooVpc",
vpc_name="acc-test-vpc",
cidr_block="172.16.0.0/16")
foo_subnet = volcengine.vpc.Subnet("fooSubnet",
subnet_name="acc-test-subnet",
cidr_block="172.16.0.0/24",
zone_id=foo_zones.zones[0].id,
vpc_id=foo_vpc.id)
foo_clb = volcengine.clb.Clb("fooClb",
type="public",
subnet_id=foo_subnet.id,
load_balancer_spec="small_1",
description="acc0Demo",
load_balancer_name="acc-test-create",
eip_billing_config=volcengine.clb.ClbEipBillingConfigArgs(
isp="BGP",
eip_billing_type="PostPaidByBandwidth",
bandwidth=1,
))
foo_server_group = volcengine.clb.ServerGroup("fooServerGroup",
load_balancer_id=foo_clb.id,
server_group_name="acc-test-create",
description="hello demo11")
foo_security_group = volcengine.vpc.SecurityGroup("fooSecurityGroup",
vpc_id=foo_vpc.id,
security_group_name="acc-test-security-group")
foo_instance = volcengine.ecs.Instance("fooInstance",
image_id="image-ycjwwciuzy5pkh54xx8f",
instance_type="ecs.c3i.large",
instance_name="acc-test-ecs-name",
password="93f0cb0614Aab12",
instance_charge_type="PostPaid",
system_volume_type="ESSD_PL0",
system_volume_size=40,
subnet_id=foo_subnet.id,
security_group_ids=[foo_security_group.id])
foo_server_group_server = volcengine.clb.ServerGroupServer("fooServerGroupServer",
server_group_id=foo_server_group.id,
instance_id=foo_instance.id,
type="ecs",
weight=100,
port=80,
description="This is a acc test server")
foo_server_group_servers = volcengine.clb.get_server_group_servers_output(ids=[pulumi.Output.all(foo_server_group_server.id.apply(lambda id: id.split(":")), len(foo_server_group_server.id.apply(lambda id: id.split(":")))).apply(lambda split, length: split[length - 1])],
server_group_id=foo_server_group.id)
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/clb"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/ecs"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/vpc"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
fooZones, err := ecs.GetZones(ctx, nil, nil)
if err != nil {
return err
}
fooVpc, err := vpc.NewVpc(ctx, "fooVpc", &vpc.VpcArgs{
VpcName: pulumi.String("acc-test-vpc"),
CidrBlock: pulumi.String("172.16.0.0/16"),
})
if err != nil {
return err
}
fooSubnet, err := vpc.NewSubnet(ctx, "fooSubnet", &vpc.SubnetArgs{
SubnetName: pulumi.String("acc-test-subnet"),
CidrBlock: pulumi.String("172.16.0.0/24"),
ZoneId: pulumi.String(fooZones.Zones[0].Id),
VpcId: fooVpc.ID(),
})
if err != nil {
return err
}
fooClb, err := clb.NewClb(ctx, "fooClb", &clb.ClbArgs{
Type: pulumi.String("public"),
SubnetId: fooSubnet.ID(),
LoadBalancerSpec: pulumi.String("small_1"),
Description: pulumi.String("acc0Demo"),
LoadBalancerName: pulumi.String("acc-test-create"),
EipBillingConfig: &clb.ClbEipBillingConfigArgs{
Isp: pulumi.String("BGP"),
EipBillingType: pulumi.String("PostPaidByBandwidth"),
Bandwidth: pulumi.Int(1),
},
})
if err != nil {
return err
}
fooServerGroup, err := clb.NewServerGroup(ctx, "fooServerGroup", &clb.ServerGroupArgs{
LoadBalancerId: fooClb.ID(),
ServerGroupName: pulumi.String("acc-test-create"),
Description: pulumi.String("hello demo11"),
})
if err != nil {
return err
}
fooSecurityGroup, err := vpc.NewSecurityGroup(ctx, "fooSecurityGroup", &vpc.SecurityGroupArgs{
VpcId: fooVpc.ID(),
SecurityGroupName: pulumi.String("acc-test-security-group"),
})
if err != nil {
return err
}
fooInstance, err := ecs.NewInstance(ctx, "fooInstance", &ecs.InstanceArgs{
ImageId: pulumi.String("image-ycjwwciuzy5pkh54xx8f"),
InstanceType: pulumi.String("ecs.c3i.large"),
InstanceName: pulumi.String("acc-test-ecs-name"),
Password: pulumi.String("93f0cb0614Aab12"),
InstanceChargeType: pulumi.String("PostPaid"),
SystemVolumeType: pulumi.String("ESSD_PL0"),
SystemVolumeSize: pulumi.Int(40),
SubnetId: fooSubnet.ID(),
SecurityGroupIds: pulumi.StringArray{
fooSecurityGroup.ID(),
},
})
if err != nil {
return err
}
fooServerGroupServer, err := clb.NewServerGroupServer(ctx, "fooServerGroupServer", &clb.ServerGroupServerArgs{
ServerGroupId: fooServerGroup.ID(),
InstanceId: fooInstance.ID(),
Type: pulumi.String("ecs"),
Weight: pulumi.Int(100),
Port: pulumi.Int(80),
Description: pulumi.String("This is a acc test server"),
})
if err != nil {
return err
}
_ = clb.GetServerGroupServersOutput(ctx, clb.GetServerGroupServersOutputArgs{
Ids: pulumi.StringArray{
pulumi.All(fooServerGroupServer.ID().ApplyT(func(id string) (pulumi.StringArray, error) {
return pulumi.StringArray("TODO: call split"), nil
}).(pulumi.StringArrayOutput), len(fooServerGroupServer.ID().ApplyT(func(id string) (pulumi.StringArray, error) {
return pulumi.StringArray("TODO: call split"), nil
}).(pulumi.StringArrayOutput))).ApplyT(func(_args []interface{}) (string, error) {
split := _args[0].([]string)
length := _args[1].(int)
return "TODO: call element", nil
}).(pulumi.StringOutput),
},
ServerGroupId: fooServerGroup.ID(),
}, nil)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() =>
{
var fooZones = Volcengine.Ecs.GetZones.Invoke();
var fooVpc = new Volcengine.Vpc.Vpc("fooVpc", new()
{
VpcName = "acc-test-vpc",
CidrBlock = "172.16.0.0/16",
});
var fooSubnet = new Volcengine.Vpc.Subnet("fooSubnet", new()
{
SubnetName = "acc-test-subnet",
CidrBlock = "172.16.0.0/24",
ZoneId = fooZones.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
VpcId = fooVpc.Id,
});
var fooClb = new Volcengine.Clb.Clb("fooClb", new()
{
Type = "public",
SubnetId = fooSubnet.Id,
LoadBalancerSpec = "small_1",
Description = "acc0Demo",
LoadBalancerName = "acc-test-create",
EipBillingConfig = new Volcengine.Clb.Inputs.ClbEipBillingConfigArgs
{
Isp = "BGP",
EipBillingType = "PostPaidByBandwidth",
Bandwidth = 1,
},
});
var fooServerGroup = new Volcengine.Clb.ServerGroup("fooServerGroup", new()
{
LoadBalancerId = fooClb.Id,
ServerGroupName = "acc-test-create",
Description = "hello demo11",
});
var fooSecurityGroup = new Volcengine.Vpc.SecurityGroup("fooSecurityGroup", new()
{
VpcId = fooVpc.Id,
SecurityGroupName = "acc-test-security-group",
});
var fooInstance = new Volcengine.Ecs.Instance("fooInstance", new()
{
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 = new[]
{
fooSecurityGroup.Id,
},
});
var fooServerGroupServer = new Volcengine.Clb.ServerGroupServer("fooServerGroupServer", new()
{
ServerGroupId = fooServerGroup.Id,
InstanceId = fooInstance.Id,
Type = "ecs",
Weight = 100,
Port = 80,
Description = "This is a acc test server",
});
var fooServerGroupServers = Volcengine.Clb.GetServerGroupServers.Invoke(new()
{
Ids = new[]
{
fooServerGroupServer.Id.Split(":")[fooServerGroupServer.Id.Split(":").Length - 1],
},
ServerGroupId = fooServerGroup.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.volcengine.ecs.EcsFunctions;
import com.pulumi.volcengine.ecs.inputs.GetZonesArgs;
import com.pulumi.volcengine.vpc.Vpc;
import com.pulumi.volcengine.vpc.VpcArgs;
import com.pulumi.volcengine.vpc.Subnet;
import com.pulumi.volcengine.vpc.SubnetArgs;
import com.pulumi.volcengine.clb.Clb;
import com.pulumi.volcengine.clb.ClbArgs;
import com.pulumi.volcengine.clb.inputs.ClbEipBillingConfigArgs;
import com.pulumi.volcengine.clb.ServerGroup;
import com.pulumi.volcengine.clb.ServerGroupArgs;
import com.pulumi.volcengine.vpc.SecurityGroup;
import com.pulumi.volcengine.vpc.SecurityGroupArgs;
import com.pulumi.volcengine.ecs.Instance;
import com.pulumi.volcengine.ecs.InstanceArgs;
import com.pulumi.volcengine.clb.ServerGroupServer;
import com.pulumi.volcengine.clb.ServerGroupServerArgs;
import com.pulumi.volcengine.clb.ClbFunctions;
import com.pulumi.volcengine.clb.inputs.GetServerGroupServersArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var fooZones = EcsFunctions.getZones();
var fooVpc = new Vpc("fooVpc", VpcArgs.builder()
.vpcName("acc-test-vpc")
.cidrBlock("172.16.0.0/16")
.build());
var fooSubnet = new Subnet("fooSubnet", SubnetArgs.builder()
.subnetName("acc-test-subnet")
.cidrBlock("172.16.0.0/24")
.zoneId(fooZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
.vpcId(fooVpc.id())
.build());
var fooClb = new Clb("fooClb", ClbArgs.builder()
.type("public")
.subnetId(fooSubnet.id())
.loadBalancerSpec("small_1")
.description("acc0Demo")
.loadBalancerName("acc-test-create")
.eipBillingConfig(ClbEipBillingConfigArgs.builder()
.isp("BGP")
.eipBillingType("PostPaidByBandwidth")
.bandwidth(1)
.build())
.build());
var fooServerGroup = new ServerGroup("fooServerGroup", ServerGroupArgs.builder()
.loadBalancerId(fooClb.id())
.serverGroupName("acc-test-create")
.description("hello demo11")
.build());
var fooSecurityGroup = new SecurityGroup("fooSecurityGroup", SecurityGroupArgs.builder()
.vpcId(fooVpc.id())
.securityGroupName("acc-test-security-group")
.build());
var fooInstance = new Instance("fooInstance", InstanceArgs.builder()
.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())
.build());
var fooServerGroupServer = new ServerGroupServer("fooServerGroupServer", ServerGroupServerArgs.builder()
.serverGroupId(fooServerGroup.id())
.instanceId(fooInstance.id())
.type("ecs")
.weight(100)
.port(80)
.description("This is a acc test server")
.build());
final var fooServerGroupServers = ClbFunctions.getServerGroupServers(GetServerGroupServersArgs.builder()
.ids(Output.tuple(fooServerGroupServer.id().applyValue(id -> id.split(":")), fooServerGroupServer.id().applyValue(id -> id.split(":")).length()).applyValue(values -> {
var split = values.t1;
var length = values.t2;
return split[length - 1];
}))
.serverGroupId(fooServerGroup.id())
.build());
}
}
Example coming soon!
Using getServerGroupServers
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getServerGroupServers(args: GetServerGroupServersArgs, opts?: InvokeOptions): Promise<GetServerGroupServersResult>
function getServerGroupServersOutput(args: GetServerGroupServersOutputArgs, opts?: InvokeOptions): Output<GetServerGroupServersResult>def get_server_group_servers(ids: Optional[Sequence[str]] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
server_group_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetServerGroupServersResult
def get_server_group_servers_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
name_regex: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
server_group_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetServerGroupServersResult]func GetServerGroupServers(ctx *Context, args *GetServerGroupServersArgs, opts ...InvokeOption) (*GetServerGroupServersResult, error)
func GetServerGroupServersOutput(ctx *Context, args *GetServerGroupServersOutputArgs, opts ...InvokeOption) GetServerGroupServersResultOutput> Note: This function is named GetServerGroupServers in the Go SDK.
public static class GetServerGroupServers
{
public static Task<GetServerGroupServersResult> InvokeAsync(GetServerGroupServersArgs args, InvokeOptions? opts = null)
public static Output<GetServerGroupServersResult> Invoke(GetServerGroupServersInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetServerGroupServersResult> getServerGroupServers(GetServerGroupServersArgs args, InvokeOptions options)
public static Output<GetServerGroupServersResult> getServerGroupServers(GetServerGroupServersArgs args, InvokeOptions options)
fn::invoke:
function: volcengine:clb/getServerGroupServers:getServerGroupServers
arguments:
# arguments dictionaryThe following arguments are supported:
- Server
Group stringId - The ID of the ServerGroup.
- Ids List<string>
- The list of ServerGroupServer IDs.
- Name
Regex string - A Name Regex of ServerGroupServer.
- Output
File string - File name where to save data source results.
- Server
Group stringId - The ID of the ServerGroup.
- Ids []string
- The list of ServerGroupServer IDs.
- Name
Regex string - A Name Regex of ServerGroupServer.
- Output
File string - File name where to save data source results.
- server
Group StringId - The ID of the ServerGroup.
- ids List<String>
- The list of ServerGroupServer IDs.
- name
Regex String - A Name Regex of ServerGroupServer.
- output
File String - File name where to save data source results.
- server
Group stringId - The ID of the ServerGroup.
- ids string[]
- The list of ServerGroupServer IDs.
- name
Regex string - A Name Regex of ServerGroupServer.
- output
File string - File name where to save data source results.
- server_
group_ strid - The ID of the ServerGroup.
- ids Sequence[str]
- The list of ServerGroupServer IDs.
- name_
regex str - A Name Regex of ServerGroupServer.
- output_
file str - File name where to save data source results.
- server
Group StringId - The ID of the ServerGroup.
- ids List<String>
- The list of ServerGroupServer IDs.
- name
Regex String - A Name Regex of ServerGroupServer.
- output
File String - File name where to save data source results.
getServerGroupServers Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Server
Group stringId - Servers
List<Get
Server Group Servers Server> - The server list of ServerGroup.
- Total
Count int - The total count of ServerGroupServer query.
- Ids List<string>
- Name
Regex string - Output
File string
- Id string
- The provider-assigned unique ID for this managed resource.
- Server
Group stringId - Servers
[]Get
Server Group Servers Server - The server list of ServerGroup.
- Total
Count int - The total count of ServerGroupServer query.
- Ids []string
- Name
Regex string - Output
File string
- id String
- The provider-assigned unique ID for this managed resource.
- server
Group StringId - servers
List<Get
Server Group Servers Server> - The server list of ServerGroup.
- total
Count Integer - The total count of ServerGroupServer query.
- ids List<String>
- name
Regex String - output
File String
- id string
- The provider-assigned unique ID for this managed resource.
- server
Group stringId - servers
Get
Server Group Servers Server[] - The server list of ServerGroup.
- total
Count number - The total count of ServerGroupServer query.
- ids string[]
- name
Regex string - output
File string
- id str
- The provider-assigned unique ID for this managed resource.
- server_
group_ strid - servers
Sequence[Get
Server Group Servers Server] - The server list of ServerGroup.
- total_
count int - The total count of ServerGroupServer query.
- ids Sequence[str]
- name_
regex str - output_
file str
- id String
- The provider-assigned unique ID for this managed resource.
- server
Group StringId - servers List<Property Map>
- The server list of ServerGroup.
- total
Count Number - The total count of ServerGroupServer query.
- ids List<String>
- name
Regex String - output
File String
Supporting Types
GetServerGroupServersServer
- Description string
- The description of the instance.
- Id string
- The server id of instance in ServerGroup.
- Instance
Id string - The ID of ecs instance or the network card bound to ecs instance.
- Ip string
- The private ip of the instance.
- Port int
- The port receiving request.
- Server
Id string - The server id of instance in ServerGroup.
- Type string
- The type of instance. Optional choice contains
ecs,eni. - Weight int
- The weight of the instance.
- Description string
- The description of the instance.
- Id string
- The server id of instance in ServerGroup.
- Instance
Id string - The ID of ecs instance or the network card bound to ecs instance.
- Ip string
- The private ip of the instance.
- Port int
- The port receiving request.
- Server
Id string - The server id of instance in ServerGroup.
- Type string
- The type of instance. Optional choice contains
ecs,eni. - Weight int
- The weight of the instance.
- description String
- The description of the instance.
- id String
- The server id of instance in ServerGroup.
- instance
Id String - The ID of ecs instance or the network card bound to ecs instance.
- ip String
- The private ip of the instance.
- port Integer
- The port receiving request.
- server
Id String - The server id of instance in ServerGroup.
- type String
- The type of instance. Optional choice contains
ecs,eni. - weight Integer
- The weight of the instance.
- description string
- The description of the instance.
- id string
- The server id of instance in ServerGroup.
- instance
Id string - The ID of ecs instance or the network card bound to ecs instance.
- ip string
- The private ip of the instance.
- port number
- The port receiving request.
- server
Id string - The server id of instance in ServerGroup.
- type string
- The type of instance. Optional choice contains
ecs,eni. - weight number
- The weight of the instance.
- description str
- The description of the instance.
- id str
- The server id of instance in ServerGroup.
- instance_
id str - The ID of ecs instance or the network card bound to ecs instance.
- ip str
- The private ip of the instance.
- port int
- The port receiving request.
- server_
id str - The server id of instance in ServerGroup.
- type str
- The type of instance. Optional choice contains
ecs,eni. - weight int
- The weight of the instance.
- description String
- The description of the instance.
- id String
- The server id of instance in ServerGroup.
- instance
Id String - The ID of ecs instance or the network card bound to ecs instance.
- ip String
- The private ip of the instance.
- port Number
- The port receiving request.
- server
Id String - The server id of instance in ServerGroup.
- type String
- The type of instance. Optional choice contains
ecs,eni. - weight Number
- The weight of the instance.
Package Details
- Repository
- volcengine volcengine/pulumi-volcengine
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
volcengineTerraform Provider.
Volcengine v0.0.38 published on Friday, Oct 31, 2025 by Volcengine
