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:

LoadBalancerId string

ID of the SLB.

Ids List<string>

A list of VServer group IDs to filter results.

NameRegex string

A regex string to filter results by VServer group name.

OutputFile string
LoadBalancerId string

ID of the SLB.

Ids []string

A list of VServer group IDs to filter results.

NameRegex string

A regex string to filter results by VServer group name.

OutputFile string
loadBalancerId string

ID of the SLB.

ids string[]

A list of VServer group IDs to filter results.

nameRegex string

A regex string to filter results by VServer group name.

outputFile string
load_balancer_id str

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.

LoadBalancerId string
Names List<string>

A list of SLB VServer groups names.

SlbServerGroups List<Pulumi.AliCloud.Slb.Outputs.GetServerGroupsSlbServerGroup>

A list of SLB VServer groups. Each element contains the following attributes:

NameRegex string
OutputFile string
Id string

The provider-assigned unique ID for this managed resource.

Ids []string

A list of SLB VServer groups IDs.

LoadBalancerId string
Names []string

A list of SLB VServer groups names.

SlbServerGroups []GetServerGroupsSlbServerGroup

A list of SLB VServer groups. Each element contains the following attributes:

NameRegex string
OutputFile string
id string

The provider-assigned unique ID for this managed resource.

ids string[]

A list of SLB VServer groups IDs.

loadBalancerId string
names string[]

A list of SLB VServer groups names.

slbServerGroups GetServerGroupsSlbServerGroup[]

A list of SLB VServer groups. Each element contains the following attributes:

nameRegex string
outputFile string
id str

The provider-assigned unique ID for this managed resource.

ids List[str]

A list of SLB VServer groups IDs.

load_balancer_id str
names List[str]

A list of SLB VServer groups names.

slb_server_groups List[GetServerGroupsSlbServerGroup]

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.

Id string

VServer group ID.

Name string

VServer group name.

Servers List<Pulumi.AliCloud.Slb.Inputs.GetServerGroupsSlbServerGroupServerArgs>

ECS instances associated to the group. Each element contains the following attributes:

Id string

VServer group ID.

Name string

VServer group name.

Servers []GetServerGroupsSlbServerGroupServer

ECS instances associated to the group. Each element contains the following attributes:

id string

VServer group ID.

name string

VServer group name.

servers GetServerGroupsSlbServerGroupServer[]

ECS instances associated to the group. Each element contains the following attributes:

id str

VServer group ID.

name str

VServer group name.

servers List[GetServerGroupsSlbServerGroupServer]

ECS instances associated to the group. Each element contains the following attributes:

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.

InstanceId string

ID of the attached ECS instance.

Weight int

Weight associated to the ECS instance.

InstanceId string

ID of the attached ECS instance.

Weight int

Weight associated to the ECS instance.

instanceId 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 alicloud Terraform Provider.