getMasterSlaveServerGroups

This data source provides the master slave server groups related to a server load balancer.

NOTE: Available in 1.54.0+

Example Usage

using System.Collections.Generic;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var defaultZones = Output.Create(AliCloud.GetZones.InvokeAsync(new AliCloud.GetZonesArgs
        {
            AvailableDiskCategory = "cloud_efficiency",
            AvailableResourceCreation = "VSwitch",
        }));
        var defaultInstanceTypes = defaultZones.Apply(defaultZones => Output.Create(AliCloud.Ecs.GetInstanceTypes.InvokeAsync(new AliCloud.Ecs.GetInstanceTypesArgs
        {
            AvailabilityZone = defaultZones.Zones?[0]?.Id,
            EniAmount = 2,
        })));
        var image = Output.Create(AliCloud.Ecs.GetImages.InvokeAsync(new AliCloud.Ecs.GetImagesArgs
        {
            NameRegex = "^ubuntu_18.*64",
            MostRecent = true,
            Owners = "system",
        }));
        var config = new Config();
        var name = config.Get("name") ?? "tf-testAccSlbMasterSlaveServerGroupVpc";
        var number = config.Get("number") ?? "1";
        var mainNetwork = new AliCloud.Vpc.Network("mainNetwork", new AliCloud.Vpc.NetworkArgs
        {
            CidrBlock = "172.16.0.0/16",
        });
        var mainSwitch = new AliCloud.Vpc.Switch("mainSwitch", new AliCloud.Vpc.SwitchArgs
        {
            VpcId = mainNetwork.Id,
            ZoneId = defaultZones.Apply(defaultZones => defaultZones.Zones?[0]?.Id),
            VswitchName = name,
            CidrBlock = "172.16.0.0/16",
        });
        var groupSecurityGroup = new AliCloud.Ecs.SecurityGroup("groupSecurityGroup", new AliCloud.Ecs.SecurityGroupArgs
        {
            VpcId = mainNetwork.Id,
        });
        var instanceInstance = new List<AliCloud.Ecs.Instance>();
        for (var rangeIndex = 0; rangeIndex < "2"; rangeIndex++)
        {
            var range = new { Value = rangeIndex };
            instanceInstance.Add(new AliCloud.Ecs.Instance($"instanceInstance-{range.Value}", new AliCloud.Ecs.InstanceArgs
            {
                ImageId = image.Apply(image => image.Images?[0]?.Id),
                InstanceType = defaultInstanceTypes.Apply(defaultInstanceTypes => defaultInstanceTypes.InstanceTypes?[0]?.Id),
                InstanceName = name,
                SecurityGroups = 
                {
                    groupSecurityGroup.Id,
                },
                InternetChargeType = "PayByTraffic",
                InternetMaxBandwidthOut = 10,
                AvailabilityZone = defaultZones.Apply(defaultZones => defaultZones.Zones?[0]?.Id),
                InstanceChargeType = "PostPaid",
                SystemDiskCategory = "cloud_efficiency",
                VswitchId = mainSwitch.Id,
            }));
        }
        var instanceApplicationLoadBalancer = new AliCloud.Slb.ApplicationLoadBalancer("instanceApplicationLoadBalancer", new AliCloud.Slb.ApplicationLoadBalancerArgs
        {
            LoadBalancerName = name,
            VswitchId = mainSwitch.Id,
            LoadBalancerSpec = "slb.s2.small",
        });
        var groupMasterSlaveServerGroup = new AliCloud.Slb.MasterSlaveServerGroup("groupMasterSlaveServerGroup", new AliCloud.Slb.MasterSlaveServerGroupArgs
        {
            LoadBalancerId = instanceApplicationLoadBalancer.Id,
            Servers = 
            {
                new AliCloud.Slb.Inputs.MasterSlaveServerGroupServerArgs
                {
                    ServerId = instanceInstance[0].Id,
                    Port = 100,
                    Weight = 100,
                    ServerType = "Master",
                },
                new AliCloud.Slb.Inputs.MasterSlaveServerGroupServerArgs
                {
                    ServerId = instanceInstance[1].Id,
                    Port = 100,
                    Weight = 100,
                    ServerType = "Slave",
                },
            },
        });
        var sampleDs = AliCloud.Slb.GetMasterSlaveServerGroups.Invoke(new AliCloud.Slb.GetMasterSlaveServerGroupsInvokeArgs
        {
            LoadBalancerId = instanceApplicationLoadBalancer.Id,
        });
        this.FirstSlbServerGroupId = sampleDs.Apply(sampleDs => sampleDs.Groups?[0]?.Id);
    }

    [Output("firstSlbServerGroupId")]
    public Output<string> FirstSlbServerGroupId { get; set; }
}
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/slb"
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		defaultZones, err := alicloud.GetZones(ctx, &GetZonesArgs{
			AvailableDiskCategory:     pulumi.StringRef("cloud_efficiency"),
			AvailableResourceCreation: pulumi.StringRef("VSwitch"),
		}, nil)
		if err != nil {
			return err
		}
		defaultInstanceTypes, err := ecs.GetInstanceTypes(ctx, &ecs.GetInstanceTypesArgs{
			AvailabilityZone: pulumi.StringRef(defaultZones.Zones[0].Id),
			EniAmount:        pulumi.IntRef(2),
		}, nil)
		if err != nil {
			return err
		}
		image, err := ecs.GetImages(ctx, &ecs.GetImagesArgs{
			NameRegex:  pulumi.StringRef("^ubuntu_18.*64"),
			MostRecent: pulumi.BoolRef(true),
			Owners:     pulumi.StringRef("system"),
		}, nil)
		if err != nil {
			return err
		}
		cfg := config.New(ctx, "")
		name := "tf-testAccSlbMasterSlaveServerGroupVpc"
		if param := cfg.Get("name"); param != "" {
			name = param
		}
		number := "1"
		if param := cfg.Get("number"); param != "" {
			number = param
		}
		mainNetwork, err := vpc.NewNetwork(ctx, "mainNetwork", &vpc.NetworkArgs{
			CidrBlock: pulumi.String("172.16.0.0/16"),
		})
		if err != nil {
			return err
		}
		mainSwitch, err := vpc.NewSwitch(ctx, "mainSwitch", &vpc.SwitchArgs{
			VpcId:       mainNetwork.ID(),
			ZoneId:      pulumi.String(defaultZones.Zones[0].Id),
			VswitchName: pulumi.String(name),
			CidrBlock:   pulumi.String("172.16.0.0/16"),
		})
		if err != nil {
			return err
		}
		groupSecurityGroup, err := ecs.NewSecurityGroup(ctx, "groupSecurityGroup", &ecs.SecurityGroupArgs{
			VpcId: mainNetwork.ID(),
		})
		if err != nil {
			return err
		}
		var instanceInstance []*ecs.Instance
		for key0, _ := range "2" {
			__res, err := ecs.NewInstance(ctx, fmt.Sprintf("instanceInstance-%v", key0), &ecs.InstanceArgs{
				ImageId:      pulumi.String(image.Images[0].Id),
				InstanceType: pulumi.String(defaultInstanceTypes.InstanceTypes[0].Id),
				InstanceName: pulumi.String(name),
				SecurityGroups: pulumi.StringArray{
					groupSecurityGroup.ID(),
				},
				InternetChargeType:      pulumi.String("PayByTraffic"),
				InternetMaxBandwidthOut: pulumi.Int(10),
				AvailabilityZone:        pulumi.String(defaultZones.Zones[0].Id),
				InstanceChargeType:      pulumi.String("PostPaid"),
				SystemDiskCategory:      pulumi.String("cloud_efficiency"),
				VswitchId:               mainSwitch.ID(),
			})
			if err != nil {
				return err
			}
			instanceInstance = append(instanceInstance, __res)
		}
		instanceApplicationLoadBalancer, err := slb.NewApplicationLoadBalancer(ctx, "instanceApplicationLoadBalancer", &slb.ApplicationLoadBalancerArgs{
			LoadBalancerName: pulumi.String(name),
			VswitchId:        mainSwitch.ID(),
			LoadBalancerSpec: pulumi.String("slb.s2.small"),
		})
		if err != nil {
			return err
		}
		_, err = slb.NewMasterSlaveServerGroup(ctx, "groupMasterSlaveServerGroup", &slb.MasterSlaveServerGroupArgs{
			LoadBalancerId: instanceApplicationLoadBalancer.ID(),
			Servers: slb.MasterSlaveServerGroupServerArray{
				&slb.MasterSlaveServerGroupServerArgs{
					ServerId:   instanceInstance[0].ID(),
					Port:       pulumi.Int(100),
					Weight:     pulumi.Int(100),
					ServerType: pulumi.String("Master"),
				},
				&slb.MasterSlaveServerGroupServerArgs{
					ServerId:   instanceInstance[1].ID(),
					Port:       pulumi.Int(100),
					Weight:     pulumi.Int(100),
					ServerType: pulumi.String("Slave"),
				},
			},
		})
		if err != nil {
			return err
		}
		sampleDs := slb.GetMasterSlaveServerGroupsOutput(ctx, slb.GetMasterSlaveServerGroupsOutputArgs{
			LoadBalancerId: instanceApplicationLoadBalancer.ID(),
		}, nil)
		ctx.Export("firstSlbServerGroupId", sampleDs.ApplyT(func(sampleDs slb.GetMasterSlaveServerGroupsResult) (string, error) {
			return sampleDs.Groups[0].Id, nil
		}).(pulumi.StringOutput))
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.AlicloudFunctions;
import com.pulumi.alicloud.adb.inputs.GetZonesArgs;
import com.pulumi.alicloud.ecs.EcsFunctions;
import com.pulumi.alicloud.ecp.inputs.GetInstanceTypesArgs;
import com.pulumi.alicloud.ecs.inputs.GetImagesArgs;
import com.pulumi.alicloud.vpc.Network;
import com.pulumi.alicloud.vpc.NetworkArgs;
import com.pulumi.alicloud.vpc.Switch;
import com.pulumi.alicloud.vpc.SwitchArgs;
import com.pulumi.alicloud.ecs.SecurityGroup;
import com.pulumi.alicloud.ecs.SecurityGroupArgs;
import com.pulumi.alicloud.ecs.Instance;
import com.pulumi.alicloud.ecs.InstanceArgs;
import com.pulumi.alicloud.slb.ApplicationLoadBalancer;
import com.pulumi.alicloud.slb.ApplicationLoadBalancerArgs;
import com.pulumi.alicloud.slb.MasterSlaveServerGroup;
import com.pulumi.alicloud.slb.MasterSlaveServerGroupArgs;
import com.pulumi.alicloud.slb.inputs.MasterSlaveServerGroupServerArgs;
import com.pulumi.alicloud.slb.SlbFunctions;
import com.pulumi.alicloud.slb.inputs.GetMasterSlaveServerGroupsArgs;
import com.pulumi.codegen.internal.KeyedValue;
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 config = ctx.config();
        final var defaultZones = AlicloudFunctions.getZones(GetZonesArgs.builder()
            .availableDiskCategory("cloud_efficiency")
            .availableResourceCreation("VSwitch")
            .build());

        final var defaultInstanceTypes = EcsFunctions.getInstanceTypes(GetInstanceTypesArgs.builder()
            .availabilityZone(defaultZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
            .eniAmount(2)
            .build());

        final var image = EcsFunctions.getImages(GetImagesArgs.builder()
            .nameRegex("^ubuntu_18.*64")
            .mostRecent(true)
            .owners("system")
            .build());

        final var name = config.get("name").orElse("tf-testAccSlbMasterSlaveServerGroupVpc");
        final var number = config.get("number").orElse("1");
        var mainNetwork = new Network("mainNetwork", NetworkArgs.builder()        
            .cidrBlock("172.16.0.0/16")
            .build());

        var mainSwitch = new Switch("mainSwitch", SwitchArgs.builder()        
            .vpcId(mainNetwork.id())
            .zoneId(defaultZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
            .vswitchName(name)
            .cidrBlock("172.16.0.0/16")
            .build());

        var groupSecurityGroup = new SecurityGroup("groupSecurityGroup", SecurityGroupArgs.builder()        
            .vpcId(mainNetwork.id())
            .build());

        for (var i = 0; i < "2"; i++) {
            new Instance("instanceInstance-" + i, InstanceArgs.builder()            
                .imageId(image.applyValue(getImagesResult -> getImagesResult.images()[0].id()))
                .instanceType(defaultInstanceTypes.applyValue(getInstanceTypesResult -> getInstanceTypesResult.instanceTypes()[0].id()))
                .instanceName(name)
                .securityGroups(groupSecurityGroup.id())
                .internetChargeType("PayByTraffic")
                .internetMaxBandwidthOut("10")
                .availabilityZone(defaultZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
                .instanceChargeType("PostPaid")
                .systemDiskCategory("cloud_efficiency")
                .vswitchId(mainSwitch.id())
                .build());

        
}
        var instanceApplicationLoadBalancer = new ApplicationLoadBalancer("instanceApplicationLoadBalancer", ApplicationLoadBalancerArgs.builder()        
            .loadBalancerName(name)
            .vswitchId(mainSwitch.id())
            .loadBalancerSpec("slb.s2.small")
            .build());

        var groupMasterSlaveServerGroup = new MasterSlaveServerGroup("groupMasterSlaveServerGroup", MasterSlaveServerGroupArgs.builder()        
            .loadBalancerId(instanceApplicationLoadBalancer.id())
            .servers(            
                MasterSlaveServerGroupServerArgs.builder()
                    .serverId(instanceInstance[0].id())
                    .port(100)
                    .weight(100)
                    .serverType("Master")
                    .build(),
                MasterSlaveServerGroupServerArgs.builder()
                    .serverId(instanceInstance[1].id())
                    .port(100)
                    .weight(100)
                    .serverType("Slave")
                    .build())
            .build());

        final var sampleDs = SlbFunctions.getMasterSlaveServerGroups(GetMasterSlaveServerGroupsArgs.builder()
            .loadBalancerId(instanceApplicationLoadBalancer.id())
            .build());

        ctx.export("firstSlbServerGroupId", sampleDs.applyValue(getMasterSlaveServerGroupsResult -> getMasterSlaveServerGroupsResult).applyValue(sampleDs -> sampleDs.applyValue(getMasterSlaveServerGroupsResult -> getMasterSlaveServerGroupsResult.groups()[0].id())));
    }
}
import pulumi
import pulumi_alicloud as alicloud

default_zones = alicloud.get_zones(available_disk_category="cloud_efficiency",
    available_resource_creation="VSwitch")
default_instance_types = alicloud.ecs.get_instance_types(availability_zone=default_zones.zones[0].id,
    eni_amount=2)
image = alicloud.ecs.get_images(name_regex="^ubuntu_18.*64",
    most_recent=True,
    owners="system")
config = pulumi.Config()
name = config.get("name")
if name is None:
    name = "tf-testAccSlbMasterSlaveServerGroupVpc"
number = config.get("number")
if number is None:
    number = "1"
main_network = alicloud.vpc.Network("mainNetwork", cidr_block="172.16.0.0/16")
main_switch = alicloud.vpc.Switch("mainSwitch",
    vpc_id=main_network.id,
    zone_id=default_zones.zones[0].id,
    vswitch_name=name,
    cidr_block="172.16.0.0/16")
group_security_group = alicloud.ecs.SecurityGroup("groupSecurityGroup", vpc_id=main_network.id)
instance_instance = []
for range in [{"value": i} for i in range(0, 2)]:
    instance_instance.append(alicloud.ecs.Instance(f"instanceInstance-{range['value']}",
        image_id=image.images[0].id,
        instance_type=default_instance_types.instance_types[0].id,
        instance_name=name,
        security_groups=[group_security_group.id],
        internet_charge_type="PayByTraffic",
        internet_max_bandwidth_out=10,
        availability_zone=default_zones.zones[0].id,
        instance_charge_type="PostPaid",
        system_disk_category="cloud_efficiency",
        vswitch_id=main_switch.id))
instance_application_load_balancer = alicloud.slb.ApplicationLoadBalancer("instanceApplicationLoadBalancer",
    load_balancer_name=name,
    vswitch_id=main_switch.id,
    load_balancer_spec="slb.s2.small")
group_master_slave_server_group = alicloud.slb.MasterSlaveServerGroup("groupMasterSlaveServerGroup",
    load_balancer_id=instance_application_load_balancer.id,
    servers=[
        alicloud.slb.MasterSlaveServerGroupServerArgs(
            server_id=instance_instance[0].id,
            port=100,
            weight=100,
            server_type="Master",
        ),
        alicloud.slb.MasterSlaveServerGroupServerArgs(
            server_id=instance_instance[1].id,
            port=100,
            weight=100,
            server_type="Slave",
        ),
    ])
sample_ds = alicloud.slb.get_master_slave_server_groups_output(load_balancer_id=instance_application_load_balancer.id)
pulumi.export("firstSlbServerGroupId", sample_ds.groups[0].id)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const defaultZones = alicloud.getZones({
    availableDiskCategory: "cloud_efficiency",
    availableResourceCreation: "VSwitch",
});
const defaultInstanceTypes = defaultZones.then(defaultZones => alicloud.ecs.getInstanceTypes({
    availabilityZone: defaultZones.zones?[0]?.id,
    eniAmount: 2,
}));
const image = alicloud.ecs.getImages({
    nameRegex: "^ubuntu_18.*64",
    mostRecent: true,
    owners: "system",
});
const config = new pulumi.Config();
const name = config.get("name") || "tf-testAccSlbMasterSlaveServerGroupVpc";
const number = config.get("number") || "1";
const mainNetwork = new alicloud.vpc.Network("mainNetwork", {cidrBlock: "172.16.0.0/16"});
const mainSwitch = new alicloud.vpc.Switch("mainSwitch", {
    vpcId: mainNetwork.id,
    zoneId: defaultZones.then(defaultZones => defaultZones.zones?[0]?.id),
    vswitchName: name,
    cidrBlock: "172.16.0.0/16",
});
const groupSecurityGroup = new alicloud.ecs.SecurityGroup("groupSecurityGroup", {vpcId: mainNetwork.id});
const instanceInstance: alicloud.ecs.Instance[];
for (const range = {value: 0}; range.value < "2"; range.value++) {
    instanceInstance.push(new alicloud.ecs.Instance(`instanceInstance-${range.value}`, {
        imageId: image.then(image => image.images?[0]?.id),
        instanceType: defaultInstanceTypes.then(defaultInstanceTypes => defaultInstanceTypes.instanceTypes?[0]?.id),
        instanceName: name,
        securityGroups: [groupSecurityGroup.id],
        internetChargeType: "PayByTraffic",
        internetMaxBandwidthOut: 10,
        availabilityZone: defaultZones.then(defaultZones => defaultZones.zones?[0]?.id),
        instanceChargeType: "PostPaid",
        systemDiskCategory: "cloud_efficiency",
        vswitchId: mainSwitch.id,
    }));
}
const instanceApplicationLoadBalancer = new alicloud.slb.ApplicationLoadBalancer("instanceApplicationLoadBalancer", {
    loadBalancerName: name,
    vswitchId: mainSwitch.id,
    loadBalancerSpec: "slb.s2.small",
});
const groupMasterSlaveServerGroup = new alicloud.slb.MasterSlaveServerGroup("groupMasterSlaveServerGroup", {
    loadBalancerId: instanceApplicationLoadBalancer.id,
    servers: [
        {
            serverId: instanceInstance[0].id,
            port: 100,
            weight: 100,
            serverType: "Master",
        },
        {
            serverId: instanceInstance[1].id,
            port: 100,
            weight: 100,
            serverType: "Slave",
        },
    ],
});
const sampleDs = alicloud.slb.getMasterSlaveServerGroupsOutput({
    loadBalancerId: instanceApplicationLoadBalancer.id,
});
export const firstSlbServerGroupId = sampleDs.apply(sampleDs => sampleDs.groups?[0]?.id);
configuration:
  name:
    type: string
    default: tf-testAccSlbMasterSlaveServerGroupVpc
  number:
    type: string
    default: 1
resources:
  mainNetwork:
    type: alicloud:vpc:Network
    properties:
      cidrBlock: 172.16.0.0/16
  mainSwitch:
    type: alicloud:vpc:Switch
    properties:
      vpcId: ${mainNetwork.id}
      zoneId: ${defaultZones.zones[0].id}
      vswitchName: ${name}
      cidrBlock: 172.16.0.0/16
  groupSecurityGroup:
    type: alicloud:ecs:SecurityGroup
    properties:
      vpcId: ${mainNetwork.id}
  instanceInstance:
    type: alicloud:ecs:Instance
    properties:
      imageId: ${image.images[0].id}
      instanceType: ${defaultInstanceTypes.instanceTypes[0].id}
      instanceName: ${name}
      securityGroups:
        - ${groupSecurityGroup.id}
      internetChargeType: PayByTraffic
      internetMaxBandwidthOut: 10
      availabilityZone: ${defaultZones.zones[0].id}
      instanceChargeType: PostPaid
      systemDiskCategory: cloud_efficiency
      vswitchId: ${mainSwitch.id}
    options: {}
  instanceApplicationLoadBalancer:
    type: alicloud:slb:ApplicationLoadBalancer
    properties:
      loadBalancerName: ${name}
      vswitchId: ${mainSwitch.id}
      loadBalancerSpec: slb.s2.small
  groupMasterSlaveServerGroup:
    type: alicloud:slb:MasterSlaveServerGroup
    properties:
      loadBalancerId: ${instanceApplicationLoadBalancer.id}
      servers:
        - serverId: ${instanceInstance[0].id}
          port: 100
          weight: 100
          serverType: Master
        - serverId: ${instanceInstance[1].id}
          port: 100
          weight: 100
          serverType: Slave
variables:
  defaultZones:
    Fn::Invoke:
      Function: alicloud:getZones
      Arguments:
        availableDiskCategory: cloud_efficiency
        availableResourceCreation: VSwitch
  defaultInstanceTypes:
    Fn::Invoke:
      Function: alicloud:ecs:getInstanceTypes
      Arguments:
        availabilityZone: ${defaultZones.zones[0].id}
        eniAmount: 2
  image:
    Fn::Invoke:
      Function: alicloud:ecs:getImages
      Arguments:
        nameRegex: ^ubuntu_18.*64
        mostRecent: true
        owners: system
  sampleDs:
    Fn::Invoke:
      Function: alicloud:slb:getMasterSlaveServerGroups
      Arguments:
        loadBalancerId: ${instanceApplicationLoadBalancer.id}
outputs:
  firstSlbServerGroupId: ${sampleDs.groups[0].id}

Using getMasterSlaveServerGroups

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 getMasterSlaveServerGroups(args: GetMasterSlaveServerGroupsArgs, opts?: InvokeOptions): Promise<GetMasterSlaveServerGroupsResult>
function getMasterSlaveServerGroupsOutput(args: GetMasterSlaveServerGroupsOutputArgs, opts?: InvokeOptions): Output<GetMasterSlaveServerGroupsResult>
def get_master_slave_server_groups(ids: Optional[Sequence[str]] = None,
                                   load_balancer_id: Optional[str] = None,
                                   name_regex: Optional[str] = None,
                                   output_file: Optional[str] = None,
                                   opts: Optional[InvokeOptions] = None) -> GetMasterSlaveServerGroupsResult
def get_master_slave_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,
                                   opts: Optional[InvokeOptions] = None) -> Output[GetMasterSlaveServerGroupsResult]
func GetMasterSlaveServerGroups(ctx *Context, args *GetMasterSlaveServerGroupsArgs, opts ...InvokeOption) (*GetMasterSlaveServerGroupsResult, error)
func GetMasterSlaveServerGroupsOutput(ctx *Context, args *GetMasterSlaveServerGroupsOutputArgs, opts ...InvokeOption) GetMasterSlaveServerGroupsResultOutput

> Note: This function is named GetMasterSlaveServerGroups in the Go SDK.

public static class GetMasterSlaveServerGroups 
{
    public static Task<GetMasterSlaveServerGroupsResult> InvokeAsync(GetMasterSlaveServerGroupsArgs args, InvokeOptions? opts = null)
    public static Output<GetMasterSlaveServerGroupsResult> Invoke(GetMasterSlaveServerGroupsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetMasterSlaveServerGroupsResult> getMasterSlaveServerGroups(GetMasterSlaveServerGroupsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: alicloud:slb/getMasterSlaveServerGroups:getMasterSlaveServerGroups
  arguments:
    # arguments dictionary

The following arguments are supported:

LoadBalancerId string

ID of the SLB.

Ids List<string>

A list of master slave server group IDs to filter results.

NameRegex string

A regex string to filter results by master slave server group name.

OutputFile string
LoadBalancerId string

ID of the SLB.

Ids []string

A list of master slave server group IDs to filter results.

NameRegex string

A regex string to filter results by master slave server group name.

OutputFile string
loadBalancerId String

ID of the SLB.

ids List<String>

A list of master slave server group IDs to filter results.

nameRegex String

A regex string to filter results by master slave server group name.

outputFile String
loadBalancerId string

ID of the SLB.

ids string[]

A list of master slave server group IDs to filter results.

nameRegex string

A regex string to filter results by master slave server group name.

outputFile string
load_balancer_id str

ID of the SLB.

ids Sequence[str]

A list of master slave server group IDs to filter results.

name_regex str

A regex string to filter results by master slave server group name.

output_file str
loadBalancerId String

ID of the SLB.

ids List<String>

A list of master slave server group IDs to filter results.

nameRegex String

A regex string to filter results by master slave server group name.

outputFile String

getMasterSlaveServerGroups Result

The following output properties are available:

Groups List<Pulumi.AliCloud.Slb.Outputs.GetMasterSlaveServerGroupsGroup>

A list of SLB master slave server groups. Each element contains the following attributes:

Id string

The provider-assigned unique ID for this managed resource.

Ids List<string>

A list of SLB master slave server groups IDs.

LoadBalancerId string
Names List<string>

A list of SLB master slave server groups names.

NameRegex string
OutputFile string
Groups []GetMasterSlaveServerGroupsGroup

A list of SLB master slave server groups. Each element contains the following attributes:

Id string

The provider-assigned unique ID for this managed resource.

Ids []string

A list of SLB master slave server groups IDs.

LoadBalancerId string
Names []string

A list of SLB master slave server groups names.

NameRegex string
OutputFile string
groups List<GetMasterSlaveServerGroupsGroup>

A list of SLB master slave server groups. Each element contains the following attributes:

id String

The provider-assigned unique ID for this managed resource.

ids List<String>

A list of SLB master slave server groups IDs.

loadBalancerId String
names List<String>

A list of SLB master slave server groups names.

nameRegex String
outputFile String
groups GetMasterSlaveServerGroupsGroup[]

A list of SLB master slave server groups. Each element contains the following attributes:

id string

The provider-assigned unique ID for this managed resource.

ids string[]

A list of SLB master slave server groups IDs.

loadBalancerId string
names string[]

A list of SLB master slave server groups names.

nameRegex string
outputFile string
groups Sequence[GetMasterSlaveServerGroupsGroup]

A list of SLB master slave server groups. Each element contains the following attributes:

id str

The provider-assigned unique ID for this managed resource.

ids Sequence[str]

A list of SLB master slave server groups IDs.

load_balancer_id str
names Sequence[str]

A list of SLB master slave server groups names.

name_regex str
output_file str
groups List<Property Map>

A list of SLB master slave server groups. Each element contains the following attributes:

id String

The provider-assigned unique ID for this managed resource.

ids List<String>

A list of SLB master slave server groups IDs.

loadBalancerId String
names List<String>

A list of SLB master slave server groups names.

nameRegex String
outputFile String

Supporting Types

GetMasterSlaveServerGroupsGroup

Id string

master slave server group ID.

Name string

master slave server group name.

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

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

Id string

master slave server group ID.

Name string

master slave server group name.

Servers []GetMasterSlaveServerGroupsGroupServer

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

id String

master slave server group ID.

name String

master slave server group name.

servers List<GetMasterSlaveServerGroupsGroupServer>

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

id string

master slave server group ID.

name string

master slave server group name.

servers GetMasterSlaveServerGroupsGroupServer[]

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

id str

master slave server group ID.

name str

master slave server group name.

servers Sequence[GetMasterSlaveServerGroupsGroupServer]

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

id String

master slave server group ID.

name String

master slave server group name.

servers List<Property Map>

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

GetMasterSlaveServerGroupsGroupServer

InstanceId string

ID of the attached ECS instance.

IsBackup int

(Removed from v1.63.0) Determine if the server is executing.

Port int

The port used by the master slave server group.

ServerType string

The server type of the attached ECS instance.

Weight int

Weight associated to the ECS instance.

InstanceId string

ID of the attached ECS instance.

IsBackup int

(Removed from v1.63.0) Determine if the server is executing.

Port int

The port used by the master slave server group.

ServerType string

The server type of the attached ECS instance.

Weight int

Weight associated to the ECS instance.

instanceId String

ID of the attached ECS instance.

isBackup Integer

(Removed from v1.63.0) Determine if the server is executing.

port Integer

The port used by the master slave server group.

serverType String

The server type of the attached ECS instance.

weight Integer

Weight associated to the ECS instance.

instanceId string

ID of the attached ECS instance.

isBackup number

(Removed from v1.63.0) Determine if the server is executing.

port number

The port used by the master slave server group.

serverType string

The server type of the attached ECS instance.

weight number

Weight associated to the ECS instance.

instance_id str

ID of the attached ECS instance.

is_backup int

(Removed from v1.63.0) Determine if the server is executing.

port int

The port used by the master slave server group.

server_type str

The server type of the attached ECS instance.

weight int

Weight associated to the ECS instance.

instanceId String

ID of the attached ECS instance.

isBackup Number

(Removed from v1.63.0) Determine if the server is executing.

port Number

The port used by the master slave server group.

serverType String

The server type of the attached ECS instance.

weight Number

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.