Volcengine v0.0.26 published on Friday, Sep 13, 2024 by Volcengine
volcengine.clb.ServerGroups
Explore with Pulumi AI
Use this data source to query detailed information of server groups
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() =>
{
var fooZones = Volcengine.Ecs.Zones.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(zonesResult => zonesResult.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 fooServerGroups = Volcengine.Clb.ServerGroups.Invoke(new()
{
Ids = new[]
{
fooServerGroup.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.Zones(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
}
_ = clb.ServerGroupsOutput(ctx, clb.ServerGroupsOutputArgs{
Ids: pulumi.StringArray{
fooServerGroup.ID(),
},
}, nil)
return nil
})
}
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.ZonesArgs;
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.clb.ClbFunctions;
import com.pulumi.volcengine.clb.inputs.ServerGroupsArgs;
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.Zones();
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(zonesResult -> zonesResult.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());
final var fooServerGroups = ClbFunctions.ServerGroups(ServerGroupsArgs.builder()
.ids(fooServerGroup.id())
.build());
}
}
import pulumi
import pulumi_volcengine as volcengine
foo_zones = volcengine.ecs.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_server_groups = volcengine.clb.server_groups_output(ids=[foo_server_group.id])
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@pulumi/volcengine";
import * as volcengine from "@volcengine/pulumi";
const fooZones = volcengine.ecs.Zones({});
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 fooServerGroups = volcengine.clb.ServerGroupsOutput({
ids: [fooServerGroup.id],
});
resources:
fooVpc:
type: volcengine:vpc:Vpc
properties:
vpcName: acc-test-vpc
cidrBlock: 172.16.0.0/16
fooSubnet:
type: volcengine:vpc:Subnet
properties:
subnetName: acc-test-subnet
cidrBlock: 172.16.0.0/24
zoneId: ${fooZones.zones[0].id}
vpcId: ${fooVpc.id}
fooClb:
type: volcengine:clb:Clb
properties:
type: public
subnetId: ${fooSubnet.id}
loadBalancerSpec: small_1
description: acc0Demo
loadBalancerName: acc-test-create
eipBillingConfig:
isp: BGP
eipBillingType: PostPaidByBandwidth
bandwidth: 1
fooServerGroup:
type: volcengine:clb:ServerGroup
properties:
loadBalancerId: ${fooClb.id}
serverGroupName: acc-test-create
description: hello demo11
variables:
fooZones:
fn::invoke:
Function: volcengine:ecs:Zones
Arguments: {}
fooServerGroups:
fn::invoke:
Function: volcengine:clb:ServerGroups
Arguments:
ids:
- ${fooServerGroup.id}
Using ServerGroups
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 serverGroups(args: ServerGroupsArgs, opts?: InvokeOptions): Promise<ServerGroupsResult>
function serverGroupsOutput(args: ServerGroupsOutputArgs, opts?: InvokeOptions): Output<ServerGroupsResult>
def server_groups(ids: Optional[Sequence[str]] = None,
load_balancer_id: Optional[str] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
server_group_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> ServerGroupsResult
def server_groups_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
load_balancer_id: Optional[pulumi.Input[str]] = None,
name_regex: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
server_group_name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[ServerGroupsResult]
func ServerGroups(ctx *Context, args *ServerGroupsArgs, opts ...InvokeOption) (*ServerGroupsResult, error)
func ServerGroupsOutput(ctx *Context, args *ServerGroupsOutputArgs, opts ...InvokeOption) ServerGroupsResultOutput
public static class ServerGroups
{
public static Task<ServerGroupsResult> InvokeAsync(ServerGroupsArgs args, InvokeOptions? opts = null)
public static Output<ServerGroupsResult> Invoke(ServerGroupsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<ServerGroupsResult> serverGroups(ServerGroupsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: volcengine:clb:ServerGroups
arguments:
# arguments dictionary
The following arguments are supported:
- Ids List<string>
- A list of ServerGroup IDs.
- Load
Balancer stringId - The id of the Clb.
- Name
Regex string - A Name Regex of ServerGroup.
- Output
File string - File name where to save data source results.
- Server
Group stringName - The name of the ServerGroup.
- Ids []string
- A list of ServerGroup IDs.
- Load
Balancer stringId - The id of the Clb.
- Name
Regex string - A Name Regex of ServerGroup.
- Output
File string - File name where to save data source results.
- Server
Group stringName - The name of the ServerGroup.
- ids List<String>
- A list of ServerGroup IDs.
- load
Balancer StringId - The id of the Clb.
- name
Regex String - A Name Regex of ServerGroup.
- output
File String - File name where to save data source results.
- server
Group StringName - The name of the ServerGroup.
- ids string[]
- A list of ServerGroup IDs.
- load
Balancer stringId - The id of the Clb.
- name
Regex string - A Name Regex of ServerGroup.
- output
File string - File name where to save data source results.
- server
Group stringName - The name of the ServerGroup.
- ids Sequence[str]
- A list of ServerGroup IDs.
- load_
balancer_ strid - The id of the Clb.
- name_
regex str - A Name Regex of ServerGroup.
- output_
file str - File name where to save data source results.
- server_
group_ strname - The name of the ServerGroup.
- ids List<String>
- A list of ServerGroup IDs.
- load
Balancer StringId - The id of the Clb.
- name
Regex String - A Name Regex of ServerGroup.
- output
File String - File name where to save data source results.
- server
Group StringName - The name of the ServerGroup.
ServerGroups Result
The following output properties are available:
- Groups
List<Server
Groups Group> - The collection of ServerGroup query.
- Id string
- The provider-assigned unique ID for this managed resource.
- Total
Count int - The total count of ServerGroup query.
- Ids List<string>
- Load
Balancer stringId - Name
Regex string - Output
File string - Server
Group stringName - The name of the ServerGroup.
- Groups
[]Server
Groups Group - The collection of ServerGroup query.
- Id string
- The provider-assigned unique ID for this managed resource.
- Total
Count int - The total count of ServerGroup query.
- Ids []string
- Load
Balancer stringId - Name
Regex string - Output
File string - Server
Group stringName - The name of the ServerGroup.
- groups
List<Server
Groups Group> - The collection of ServerGroup query.
- id String
- The provider-assigned unique ID for this managed resource.
- total
Count Integer - The total count of ServerGroup query.
- ids List<String>
- load
Balancer StringId - name
Regex String - output
File String - server
Group StringName - The name of the ServerGroup.
- groups
Server
Groups Group[] - The collection of ServerGroup query.
- id string
- The provider-assigned unique ID for this managed resource.
- total
Count number - The total count of ServerGroup query.
- ids string[]
- load
Balancer stringId - name
Regex string - output
File string - server
Group stringName - The name of the ServerGroup.
- groups
Sequence[Server
Groups Group] - The collection of ServerGroup query.
- id str
- The provider-assigned unique ID for this managed resource.
- total_
count int - The total count of ServerGroup query.
- ids Sequence[str]
- load_
balancer_ strid - name_
regex str - output_
file str - server_
group_ strname - The name of the ServerGroup.
- groups List<Property Map>
- The collection of ServerGroup query.
- id String
- The provider-assigned unique ID for this managed resource.
- total
Count Number - The total count of ServerGroup query.
- ids List<String>
- load
Balancer StringId - name
Regex String - output
File String - server
Group StringName - The name of the ServerGroup.
Supporting Types
ServerGroupsGroup
- Address
Ip stringVersion - The address ip version of the ServerGroup.
- Create
Time string - The create time of the ServerGroup.
- Description string
- The description of the ServerGroup.
- Id string
- The ID of the ServerGroup.
- Server
Group stringId - The ID of the ServerGroup.
- Server
Group stringName - The name of the ServerGroup.
- Update
Time string - The update time of the ServerGroup.
- Address
Ip stringVersion - The address ip version of the ServerGroup.
- Create
Time string - The create time of the ServerGroup.
- Description string
- The description of the ServerGroup.
- Id string
- The ID of the ServerGroup.
- Server
Group stringId - The ID of the ServerGroup.
- Server
Group stringName - The name of the ServerGroup.
- Update
Time string - The update time of the ServerGroup.
- address
Ip StringVersion - The address ip version of the ServerGroup.
- create
Time String - The create time of the ServerGroup.
- description String
- The description of the ServerGroup.
- id String
- The ID of the ServerGroup.
- server
Group StringId - The ID of the ServerGroup.
- server
Group StringName - The name of the ServerGroup.
- update
Time String - The update time of the ServerGroup.
- address
Ip stringVersion - The address ip version of the ServerGroup.
- create
Time string - The create time of the ServerGroup.
- description string
- The description of the ServerGroup.
- id string
- The ID of the ServerGroup.
- server
Group stringId - The ID of the ServerGroup.
- server
Group stringName - The name of the ServerGroup.
- update
Time string - The update time of the ServerGroup.
- address_
ip_ strversion - The address ip version of the ServerGroup.
- create_
time str - The create time of the ServerGroup.
- description str
- The description of the ServerGroup.
- id str
- The ID of the ServerGroup.
- server_
group_ strid - The ID of the ServerGroup.
- server_
group_ strname - The name of the ServerGroup.
- update_
time str - The update time of the ServerGroup.
- address
Ip StringVersion - The address ip version of the ServerGroup.
- create
Time String - The create time of the ServerGroup.
- description String
- The description of the ServerGroup.
- id String
- The ID of the ServerGroup.
- server
Group StringId - The ID of the ServerGroup.
- server
Group StringName - The name of the ServerGroup.
- update
Time String - The update time of the ServerGroup.
Package Details
- Repository
- volcengine volcengine/pulumi-volcengine
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
volcengine
Terraform Provider.