GetServerGroups
This data source provides the VServer groups related to a server load balancer.
Example Usage
using Pulumi;
using AliCloud = Pulumi.AliCloud;
class MyStack : Stack
{
public MyStack()
{
var sampleDs = Output.Create(AliCloud.Slb.GetServerGroups.InvokeAsync(new AliCloud.Slb.GetServerGroupsArgs
{
LoadBalancerId = alicloud_slb.Sample_slb.Id,
}));
this.FirstSlbServerGroupId = sampleDs.Apply(sampleDs => sampleDs.SlbServerGroups[0].Id);
}
[Output("firstSlbServerGroupId")]
public Output<string> FirstSlbServerGroupId { get; set; }
}
Coming soon!
import pulumi
import pulumi_alicloud as alicloud
sample_ds = alicloud.slb.get_server_groups(load_balancer_id=alicloud_slb["sample_slb"]["id"])
pulumi.export("firstSlbServerGroupId", sample_ds.slb_server_groups[0]["id"])import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const sampleDs = alicloud_slb_sample_slb.id.apply(id => alicloud.slb.getServerGroups({
loadBalancerId: id,
}, { async: true }));
export const firstSlbServerGroupId = sampleDs.slbServerGroups[0].id;Using GetServerGroups
function getServerGroups(args: GetServerGroupsArgs, opts?: InvokeOptions): Promise<GetServerGroupsResult>function get_server_groups(ids=None, load_balancer_id=None, name_regex=None, output_file=None, opts=None)func GetServerGroups(ctx *Context, args *GetServerGroupsArgs, opts ...InvokeOption) (*GetServerGroupsResult, error)public static class GetServerGroups {
public static Task<GetServerGroupsResult> InvokeAsync(GetServerGroupsArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
- Load
Balancer stringId ID of the SLB.
- Ids List<string>
A list of VServer group IDs to filter results.
- Name
Regex string A regex string to filter results by VServer group name.
- Output
File string
- Load
Balancer stringId ID of the SLB.
- Ids []string
A list of VServer group IDs to filter results.
- Name
Regex string A regex string to filter results by VServer group name.
- Output
File string
- load
Balancer stringId ID of the SLB.
- ids string[]
A list of VServer group IDs to filter results.
- name
Regex string A regex string to filter results by VServer group name.
- output
File string
- load_
balancer_ strid ID of the SLB.
- ids List[str]
A list of VServer group IDs to filter results.
- name_
regex str A regex string to filter results by VServer group name.
- output_
file str
GetServerGroups Result
The following output properties are available:
- Id string
The provider-assigned unique ID for this managed resource.
- Ids List<string>
A list of SLB VServer groups IDs.
- Load
Balancer stringId - Names List<string>
A list of SLB VServer groups names.
- Slb
Server List<Pulumi.Groups Ali Cloud. Slb. Outputs. Get Server Groups Slb Server Group> A list of SLB VServer groups. Each element contains the following attributes:
- Name
Regex string - Output
File string
- Id string
The provider-assigned unique ID for this managed resource.
- Ids []string
A list of SLB VServer groups IDs.
- Load
Balancer stringId - Names []string
A list of SLB VServer groups names.
- Slb
Server []GetGroups Server Groups Slb Server Group A list of SLB VServer groups. Each element contains the following attributes:
- Name
Regex string - Output
File string
- id string
The provider-assigned unique ID for this managed resource.
- ids string[]
A list of SLB VServer groups IDs.
- load
Balancer stringId - names string[]
A list of SLB VServer groups names.
- slb
Server GetGroups Server Groups Slb Server Group[] A list of SLB VServer groups. Each element contains the following attributes:
- name
Regex string - output
File string
- id str
The provider-assigned unique ID for this managed resource.
- ids List[str]
A list of SLB VServer groups IDs.
- load_
balancer_ strid - names List[str]
A list of SLB VServer groups names.
- slb_
server_ List[Getgroups Server Groups Slb Server Group] A list of SLB VServer groups. Each element contains the following attributes:
- name_
regex str - output_
file str
Supporting Types
GetServerGroupsSlbServerGroup
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
GetServerGroupsSlbServerGroupServer
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
- Instance
Id string ID of the attached ECS instance.
- Weight int
Weight associated to the ECS instance.
- Instance
Id string ID of the attached ECS instance.
- Weight int
Weight associated to the ECS instance.
- instance
Id string ID of the attached ECS instance.
- weight number
Weight associated to the ECS instance.
- instance_
id str ID of the attached ECS instance.
- weight float
Weight associated to the ECS instance.
Package Details
- Repository
- https://github.com/pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.