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.
- Master
Availability stringZone Master availability zone of the SLBs.
- Name
Regex string A regex string to filter results by SLB name.
- Network
Type string Network type of the SLBs. Valid values:
vpcandclassic.- Output
File string - Resource
Group stringId The Id of resource group which SLB belongs.
- Slave
Availability stringZone Slave availability zone of the SLBs.
- Dictionary<string, object>
A map of tags assigned to the SLB instances. The
tagscan have a maximum of 5 tag. It must be in the format:data "alicloud.slb.getLoadBalancers" "taggedInstances" { tags = { tagKey1 = "tagValue1", tagKey2 = "tagValue2" } }- Vpc
Id string ID of the VPC linked to the SLBs.
- Vswitch
Id string ID of the VSwitch linked to the SLBs.
- Address string
Service address of the SLBs.
- Ids []string
A list of SLBs IDs.
- Master
Availability stringZone Master availability zone of the SLBs.
- Name
Regex string A regex string to filter results by SLB name.
- Network
Type string Network type of the SLBs. Valid values:
vpcandclassic.- Output
File string - Resource
Group stringId The Id of resource group which SLB belongs.
- Slave
Availability stringZone Slave availability zone of the SLBs.
- map[string]interface{}
A map of tags assigned to the SLB instances. The
tagscan have a maximum of 5 tag. It must be in the format:data "alicloud.slb.getLoadBalancers" "taggedInstances" { tags = { tagKey1 = "tagValue1", tagKey2 = "tagValue2" } }- Vpc
Id string ID of the VPC linked to the SLBs.
- Vswitch
Id string ID of the VSwitch linked to the SLBs.
- address string
Service address of the SLBs.
- ids string[]
A list of SLBs IDs.
- master
Availability stringZone Master availability zone of the SLBs.
- name
Regex string A regex string to filter results by SLB name.
- network
Type string Network type of the SLBs. Valid values:
vpcandclassic.- output
File string - resource
Group stringId The Id of resource group which SLB belongs.
- slave
Availability stringZone Slave availability zone of the SLBs.
- {[key: string]: any}
A map of tags assigned to the SLB instances. The
tagscan have a maximum of 5 tag. It must be in the format:data "alicloud.slb.getLoadBalancers" "taggedInstances" { tags = { tagKey1 = "tagValue1", tagKey2 = "tagValue2" } }- vpc
Id string ID of the VPC linked to the SLBs.
- vswitch
Id 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_ strzone 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:
vpcandclassic.- output_
file str - resource_
group_ strid The Id of resource group which SLB belongs.
- slave_
availability_ strzone Slave availability zone of the SLBs.
- Dict[str, Any]
A map of tags assigned to the SLB instances. The
tagscan 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.
Ali Cloud. Slb. Outputs. Get Load Balancers Slb> A list of SLBs. Each element contains the following attributes:
- Address string
Service address of the SLB.
- Master
Availability stringZone Master availability zone of the SLBs.
- Name
Regex string - Network
Type string Network type of the SLB. Possible values:
vpcandclassic.- Output
File string - Resource
Group stringId - Slave
Availability stringZone Slave availability zone of the SLBs.
- Dictionary<string, object>
A map of tags assigned to the SLB instance.
- Vpc
Id string ID of the VPC the SLB belongs to.
- Vswitch
Id 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
[]Get
Load Balancers Slb A list of SLBs. Each element contains the following attributes:
- Address string
Service address of the SLB.
- Master
Availability stringZone Master availability zone of the SLBs.
- Name
Regex string - Network
Type string Network type of the SLB. Possible values:
vpcandclassic.- Output
File string - Resource
Group stringId - Slave
Availability stringZone Slave availability zone of the SLBs.
- map[string]interface{}
A map of tags assigned to the SLB instance.
- Vpc
Id string ID of the VPC the SLB belongs to.
- Vswitch
Id 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
Get
Load Balancers Slb[] A list of SLBs. Each element contains the following attributes:
- address string
Service address of the SLB.
- master
Availability stringZone Master availability zone of the SLBs.
- name
Regex string - network
Type string Network type of the SLB. Possible values:
vpcandclassic.- output
File string - resource
Group stringId - slave
Availability stringZone Slave availability zone of the SLBs.
- {[key: string]: any}
A map of tags assigned to the SLB instance.
- vpc
Id string ID of the VPC the SLB belongs to.
- vswitch
Id 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[Get
Load Balancers Slb] A list of SLBs. Each element contains the following attributes:
- address str
Service address of the SLB.
- master_
availability_ strzone Master availability zone of the SLBs.
- name_
regex str - network_
type str Network type of the SLB. Possible values:
vpcandclassic.- output_
file str - resource_
group_ strid - slave_
availability_ strzone Slave availability zone of the SLBs.
- 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.
- Creation
Time string SLB creation time.
- Id string
ID of the SLB.
- Internet bool
SLB addressType: internet if
true, intranet iffalse. Must befalsewhennetwork_typeisvpc.- Master
Availability stringZone Master availability zone of the SLBs.
- Name string
SLB name.
- Network
Type string Network type of the SLBs. Valid values:
vpcandclassic.- Region
Id string Region ID the SLB belongs to.
- Slave
Availability stringZone Slave availability zone of the SLBs.
- Status string
SLB current status. Possible values:
inactive,activeandlocked.- Dictionary<string, object>
A map of tags assigned to the SLB instances. The
tagscan have a maximum of 5 tag. It must be in the format:data "alicloud.slb.getLoadBalancers" "taggedInstances" { tags = { tagKey1 = "tagValue1", tagKey2 = "tagValue2" } }- Vpc
Id string ID of the VPC linked to the SLBs.
- Vswitch
Id string ID of the VSwitch linked to the SLBs.
- Address string
Service address of the SLBs.
- Creation
Time string SLB creation time.
- Id string
ID of the SLB.
- Internet bool
SLB addressType: internet if
true, intranet iffalse. Must befalsewhennetwork_typeisvpc.- Master
Availability stringZone Master availability zone of the SLBs.
- Name string
SLB name.
- Network
Type string Network type of the SLBs. Valid values:
vpcandclassic.- Region
Id string Region ID the SLB belongs to.
- Slave
Availability stringZone Slave availability zone of the SLBs.
- Status string
SLB current status. Possible values:
inactive,activeandlocked.- map[string]interface{}
A map of tags assigned to the SLB instances. The
tagscan have a maximum of 5 tag. It must be in the format:data "alicloud.slb.getLoadBalancers" "taggedInstances" { tags = { tagKey1 = "tagValue1", tagKey2 = "tagValue2" } }- Vpc
Id string ID of the VPC linked to the SLBs.
- Vswitch
Id string ID of the VSwitch linked to the SLBs.
- address string
Service address of the SLBs.
- creation
Time string SLB creation time.
- id string
ID of the SLB.
- internet boolean
SLB addressType: internet if
true, intranet iffalse. Must befalsewhennetwork_typeisvpc.- master
Availability stringZone Master availability zone of the SLBs.
- name string
SLB name.
- network
Type string Network type of the SLBs. Valid values:
vpcandclassic.- region
Id string Region ID the SLB belongs to.
- slave
Availability stringZone Slave availability zone of the SLBs.
- status string
SLB current status. Possible values:
inactive,activeandlocked.- {[key: string]: any}
A map of tags assigned to the SLB instances. The
tagscan have a maximum of 5 tag. It must be in the format:data "alicloud.slb.getLoadBalancers" "taggedInstances" { tags = { tagKey1 = "tagValue1", tagKey2 = "tagValue2" } }- vpc
Id string ID of the VPC linked to the SLBs.
- vswitch
Id 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 iffalse. Must befalsewhennetwork_typeisvpc.- master
Availability strZone Master availability zone of the SLBs.
- name str
SLB name.
- network_
type str Network type of the SLBs. Valid values:
vpcandclassic.- region
Id str Region ID the SLB belongs to.
- slave
Availability strZone Slave availability zone of the SLBs.
- status str
SLB current status. Possible values:
inactive,activeandlocked.- Dict[str, Any]
A map of tags assigned to the SLB instances. The
tagscan 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
alicloudTerraform Provider.