GetLoadBalancers

This data source provides the server load balancers of the current Alibaba Cloud user.

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var slbsDs = Output.Create(AliCloud.Slb.GetLoadBalancers.InvokeAsync(new AliCloud.Slb.GetLoadBalancersArgs
        {
            NameRegex = "sample_slb",
        }));
        this.FirstSlbId = slbsDs.Apply(slbsDs => slbsDs.Slbs[0].Id);
    }

    [Output("firstSlbId")]
    public Output<string> FirstSlbId { get; set; }
}

Coming soon!

import pulumi
import pulumi_alicloud as alicloud

slbs_ds = alicloud.slb.get_load_balancers(name_regex="sample_slb")
pulumi.export("firstSlbId", slbs_ds.slbs[0]["id"])
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const slbsDs = pulumi.output(alicloud.slb.getLoadBalancers({
    nameRegex: "sample_slb",
}, { async: true }));

export const firstSlbId = slbsDs.slbs[0].id;

Using GetLoadBalancers

function getLoadBalancers(args: GetLoadBalancersArgs, opts?: InvokeOptions): Promise<GetLoadBalancersResult>
function  get_load_balancers(address=None, ids=None, master_availability_zone=None, name_regex=None, network_type=None, output_file=None, resource_group_id=None, slave_availability_zone=None, tags=None, vpc_id=None, vswitch_id=None, opts=None)
func GetLoadBalancers(ctx *Context, args *GetLoadBalancersArgs, opts ...InvokeOption) (*GetLoadBalancersResult, error)
public static class GetLoadBalancers {
    public static Task<GetLoadBalancersResult> InvokeAsync(GetLoadBalancersArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Address string

Service address of the SLBs.

Ids List<string>

A list of SLBs IDs.

MasterAvailabilityZone string

Master availability zone of the SLBs.

NameRegex string

A regex string to filter results by SLB name.

NetworkType string

Network type of the SLBs. Valid values: vpc and classic.

OutputFile string
ResourceGroupId string

The Id of resource group which SLB belongs.

SlaveAvailabilityZone string

Slave availability zone of the SLBs.

Tags Dictionary<string, object>

A map of tags assigned to the SLB instances. The tags can have a maximum of 5 tag. It must be in the format:

data "alicloud.slb.getLoadBalancers" "taggedInstances" {
tags = {
tagKey1 = "tagValue1",
tagKey2 = "tagValue2"
}
}
VpcId string

ID of the VPC linked to the SLBs.

VswitchId string

ID of the VSwitch linked to the SLBs.

Address string

Service address of the SLBs.

Ids []string

A list of SLBs IDs.

MasterAvailabilityZone string

Master availability zone of the SLBs.

NameRegex string

A regex string to filter results by SLB name.

NetworkType string

Network type of the SLBs. Valid values: vpc and classic.

OutputFile string
ResourceGroupId string

The Id of resource group which SLB belongs.

SlaveAvailabilityZone string

Slave availability zone of the SLBs.

Tags map[string]interface{}

A map of tags assigned to the SLB instances. The tags can have a maximum of 5 tag. It must be in the format:

data "alicloud.slb.getLoadBalancers" "taggedInstances" {
tags = {
tagKey1 = "tagValue1",
tagKey2 = "tagValue2"
}
}
VpcId string

ID of the VPC linked to the SLBs.

VswitchId string

ID of the VSwitch linked to the SLBs.

address string

Service address of the SLBs.

ids string[]

A list of SLBs IDs.

masterAvailabilityZone string

Master availability zone of the SLBs.

nameRegex string

A regex string to filter results by SLB name.

networkType string

Network type of the SLBs. Valid values: vpc and classic.

outputFile string
resourceGroupId string

The Id of resource group which SLB belongs.

slaveAvailabilityZone string

Slave availability zone of the SLBs.

tags {[key: string]: any}

A map of tags assigned to the SLB instances. The tags can have a maximum of 5 tag. It must be in the format:

data "alicloud.slb.getLoadBalancers" "taggedInstances" {
tags = {
tagKey1 = "tagValue1",
tagKey2 = "tagValue2"
}
}
vpcId string

ID of the VPC linked to the SLBs.

vswitchId string

ID of the VSwitch linked to the SLBs.

address str

Service address of the SLBs.

ids List[str]

A list of SLBs IDs.

master_availability_zone str

Master availability zone of the SLBs.

name_regex str

A regex string to filter results by SLB name.

network_type str

Network type of the SLBs. Valid values: vpc and classic.

output_file str
resource_group_id str

The Id of resource group which SLB belongs.

slave_availability_zone str

Slave availability zone of the SLBs.

tags Dict[str, Any]

A map of tags assigned to the SLB instances. The tags can have a maximum of 5 tag. It must be in the format:

data "alicloud.slb.getLoadBalancers" "taggedInstances" {
tags = {
tagKey1 = "tagValue1",
tagKey2 = "tagValue2"
}
}
vpc_id str

ID of the VPC linked to the SLBs.

vswitch_id str

ID of the VSwitch linked to the SLBs.

GetLoadBalancers 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 IDs.

Names List<string>

A list of slb names.

Slbs List<Pulumi.AliCloud.Slb.Outputs.GetLoadBalancersSlb>

A list of SLBs. Each element contains the following attributes:

Address string

Service address of the SLB.

MasterAvailabilityZone string

Master availability zone of the SLBs.

NameRegex string
NetworkType string

Network type of the SLB. Possible values: vpc and classic.

OutputFile string
ResourceGroupId string
SlaveAvailabilityZone string

Slave availability zone of the SLBs.

Tags Dictionary<string, object>

A map of tags assigned to the SLB instance.

VpcId string

ID of the VPC the SLB belongs to.

VswitchId string

ID of the VSwitch the SLB belongs to.

Id string

The provider-assigned unique ID for this managed resource.

Ids []string

A list of slb IDs.

Names []string

A list of slb names.

Slbs []GetLoadBalancersSlb

A list of SLBs. Each element contains the following attributes:

Address string

Service address of the SLB.

MasterAvailabilityZone string

Master availability zone of the SLBs.

NameRegex string
NetworkType string

Network type of the SLB. Possible values: vpc and classic.

OutputFile string
ResourceGroupId string
SlaveAvailabilityZone string

Slave availability zone of the SLBs.

Tags map[string]interface{}

A map of tags assigned to the SLB instance.

VpcId string

ID of the VPC the SLB belongs to.

VswitchId string

ID of the VSwitch the SLB belongs to.

id string

The provider-assigned unique ID for this managed resource.

ids string[]

A list of slb IDs.

names string[]

A list of slb names.

slbs GetLoadBalancersSlb[]

A list of SLBs. Each element contains the following attributes:

address string

Service address of the SLB.

masterAvailabilityZone string

Master availability zone of the SLBs.

nameRegex string
networkType string

Network type of the SLB. Possible values: vpc and classic.

outputFile string
resourceGroupId string
slaveAvailabilityZone string

Slave availability zone of the SLBs.

tags {[key: string]: any}

A map of tags assigned to the SLB instance.

vpcId string

ID of the VPC the SLB belongs to.

vswitchId string

ID of the VSwitch the SLB belongs to.

id str

The provider-assigned unique ID for this managed resource.

ids List[str]

A list of slb IDs.

names List[str]

A list of slb names.

slbs List[GetLoadBalancersSlb]

A list of SLBs. Each element contains the following attributes:

address str

Service address of the SLB.

master_availability_zone str

Master availability zone of the SLBs.

name_regex str
network_type str

Network type of the SLB. Possible values: vpc and classic.

output_file str
resource_group_id str
slave_availability_zone str

Slave availability zone of the SLBs.

tags Dict[str, Any]

A map of tags assigned to the SLB instance.

vpc_id str

ID of the VPC the SLB belongs to.

vswitch_id str

ID of the VSwitch the SLB belongs to.

Supporting Types

GetLoadBalancersSlb

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

Address string

Service address of the SLBs.

CreationTime string

SLB creation time.

Id string

ID of the SLB.

Internet bool

SLB addressType: internet if true, intranet if false. Must be false when network_type is vpc.

MasterAvailabilityZone string

Master availability zone of the SLBs.

Name string

SLB name.

NetworkType string

Network type of the SLBs. Valid values: vpc and classic.

RegionId string

Region ID the SLB belongs to.

SlaveAvailabilityZone string

Slave availability zone of the SLBs.

Status string

SLB current status. Possible values: inactive, active and locked.

Tags Dictionary<string, object>

A map of tags assigned to the SLB instances. The tags can have a maximum of 5 tag. It must be in the format:

data "alicloud.slb.getLoadBalancers" "taggedInstances" {
tags = {
tagKey1 = "tagValue1",
tagKey2 = "tagValue2"
}
}
VpcId string

ID of the VPC linked to the SLBs.

VswitchId string

ID of the VSwitch linked to the SLBs.

Address string

Service address of the SLBs.

CreationTime string

SLB creation time.

Id string

ID of the SLB.

Internet bool

SLB addressType: internet if true, intranet if false. Must be false when network_type is vpc.

MasterAvailabilityZone string

Master availability zone of the SLBs.

Name string

SLB name.

NetworkType string

Network type of the SLBs. Valid values: vpc and classic.

RegionId string

Region ID the SLB belongs to.

SlaveAvailabilityZone string

Slave availability zone of the SLBs.

Status string

SLB current status. Possible values: inactive, active and locked.

Tags map[string]interface{}

A map of tags assigned to the SLB instances. The tags can have a maximum of 5 tag. It must be in the format:

data "alicloud.slb.getLoadBalancers" "taggedInstances" {
tags = {
tagKey1 = "tagValue1",
tagKey2 = "tagValue2"
}
}
VpcId string

ID of the VPC linked to the SLBs.

VswitchId string

ID of the VSwitch linked to the SLBs.

address string

Service address of the SLBs.

creationTime string

SLB creation time.

id string

ID of the SLB.

internet boolean

SLB addressType: internet if true, intranet if false. Must be false when network_type is vpc.

masterAvailabilityZone string

Master availability zone of the SLBs.

name string

SLB name.

networkType string

Network type of the SLBs. Valid values: vpc and classic.

regionId string

Region ID the SLB belongs to.

slaveAvailabilityZone string

Slave availability zone of the SLBs.

status string

SLB current status. Possible values: inactive, active and locked.

tags {[key: string]: any}

A map of tags assigned to the SLB instances. The tags can have a maximum of 5 tag. It must be in the format:

data "alicloud.slb.getLoadBalancers" "taggedInstances" {
tags = {
tagKey1 = "tagValue1",
tagKey2 = "tagValue2"
}
}
vpcId string

ID of the VPC linked to the SLBs.

vswitchId string

ID of the VSwitch linked to the SLBs.

address str

Service address of the SLBs.

creation_time str

SLB creation time.

id str

ID of the SLB.

internet bool

SLB addressType: internet if true, intranet if false. Must be false when network_type is vpc.

masterAvailabilityZone str

Master availability zone of the SLBs.

name str

SLB name.

network_type str

Network type of the SLBs. Valid values: vpc and classic.

regionId str

Region ID the SLB belongs to.

slaveAvailabilityZone str

Slave availability zone of the SLBs.

status str

SLB current status. Possible values: inactive, active and locked.

tags Dict[str, Any]

A map of tags assigned to the SLB instances. The tags can have a maximum of 5 tag. It must be in the format:

data "alicloud.slb.getLoadBalancers" "taggedInstances" {
tags = {
tagKey1 = "tagValue1",
tagKey2 = "tagValue2"
}
}
vpc_id str

ID of the VPC linked to the SLBs.

vswitch_id str

ID of the VSwitch linked to the SLBs.

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.