alicloud.slb.getZones
Explore with Pulumi AI
This data source provides availability zones for SLB that can be accessed by an Alibaba Cloud account within the region configured in the provider.
NOTE: Available in v1.73.0+.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var zonesIds = AliCloud.Slb.GetZones.Invoke(new()
{
AvailableSlbAddressIpVersion = "ipv4",
AvailableSlbAddressType = "vpc",
});
});
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/slb"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := slb.GetZones(ctx, &slb.GetZonesArgs{
AvailableSlbAddressIpVersion: pulumi.StringRef("ipv4"),
AvailableSlbAddressType: pulumi.StringRef("vpc"),
}, nil)
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.slb.SlbFunctions;
import com.pulumi.alicloud.slb.inputs.GetZonesArgs;
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 zonesIds = SlbFunctions.getZones(GetZonesArgs.builder()
.availableSlbAddressIpVersion("ipv4")
.availableSlbAddressType("vpc")
.build());
}
}
import pulumi
import pulumi_alicloud as alicloud
zones_ids = alicloud.slb.get_zones(available_slb_address_ip_version="ipv4",
available_slb_address_type="vpc")
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const zonesIds = alicloud.slb.getZones({
availableSlbAddressIpVersion: "ipv4",
availableSlbAddressType: "vpc",
});
variables:
zonesIds:
fn::invoke:
Function: alicloud:slb:getZones
Arguments:
availableSlbAddressIpVersion: ipv4
availableSlbAddressType: vpc
Using getZones
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 getZones(args: GetZonesArgs, opts?: InvokeOptions): Promise<GetZonesResult>
function getZonesOutput(args: GetZonesOutputArgs, opts?: InvokeOptions): Output<GetZonesResult>
def get_zones(available_slb_address_ip_version: Optional[str] = None,
available_slb_address_type: Optional[str] = None,
enable_details: Optional[bool] = None,
master_zone_id: Optional[str] = None,
output_file: Optional[str] = None,
slave_zone_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetZonesResult
def get_zones_output(available_slb_address_ip_version: Optional[pulumi.Input[str]] = None,
available_slb_address_type: Optional[pulumi.Input[str]] = None,
enable_details: Optional[pulumi.Input[bool]] = None,
master_zone_id: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
slave_zone_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetZonesResult]
func GetZones(ctx *Context, args *GetZonesArgs, opts ...InvokeOption) (*GetZonesResult, error)
func GetZonesOutput(ctx *Context, args *GetZonesOutputArgs, opts ...InvokeOption) GetZonesResultOutput
> Note: This function is named GetZones
in the Go SDK.
public static class GetZones
{
public static Task<GetZonesResult> InvokeAsync(GetZonesArgs args, InvokeOptions? opts = null)
public static Output<GetZonesResult> Invoke(GetZonesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetZonesResult> getZones(GetZonesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:slb/getZones:getZones
arguments:
# arguments dictionary
The following arguments are supported:
- Available
Slb stringAddress Ip Version Filter the results by a slb instance address version. Can be either
ipv4
, oripv6
.- Available
Slb stringAddress Type Filter the results by a slb instance network type. Valid values:
- vpc: an internal SLB instance that is deployed in a virtual private cloud (VPC).
- classic_internet: a public-facing SLB instance.
- classic_intranet: an internal SLB instance that is deployed in a classic network.
- Enable
Details bool Default to false and only output
id
in thezones
block. Set it to true can output more details.The parameter enable_details has been deprecated from version v1.154.0+
- Master
Zone stringId The primary zone.
- Output
File string File name where to save data source results (after running
pulumi preview
).- Slave
Zone stringId The secondary zone.
- Available
Slb stringAddress Ip Version Filter the results by a slb instance address version. Can be either
ipv4
, oripv6
.- Available
Slb stringAddress Type Filter the results by a slb instance network type. Valid values:
- vpc: an internal SLB instance that is deployed in a virtual private cloud (VPC).
- classic_internet: a public-facing SLB instance.
- classic_intranet: an internal SLB instance that is deployed in a classic network.
- Enable
Details bool Default to false and only output
id
in thezones
block. Set it to true can output more details.The parameter enable_details has been deprecated from version v1.154.0+
- Master
Zone stringId The primary zone.
- Output
File string File name where to save data source results (after running
pulumi preview
).- Slave
Zone stringId The secondary zone.
- available
Slb StringAddress Ip Version Filter the results by a slb instance address version. Can be either
ipv4
, oripv6
.- available
Slb StringAddress Type Filter the results by a slb instance network type. Valid values:
- vpc: an internal SLB instance that is deployed in a virtual private cloud (VPC).
- classic_internet: a public-facing SLB instance.
- classic_intranet: an internal SLB instance that is deployed in a classic network.
- enable
Details Boolean Default to false and only output
id
in thezones
block. Set it to true can output more details.The parameter enable_details has been deprecated from version v1.154.0+
- master
Zone StringId The primary zone.
- output
File String File name where to save data source results (after running
pulumi preview
).- slave
Zone StringId The secondary zone.
- available
Slb stringAddress Ip Version Filter the results by a slb instance address version. Can be either
ipv4
, oripv6
.- available
Slb stringAddress Type Filter the results by a slb instance network type. Valid values:
- vpc: an internal SLB instance that is deployed in a virtual private cloud (VPC).
- classic_internet: a public-facing SLB instance.
- classic_intranet: an internal SLB instance that is deployed in a classic network.
- enable
Details boolean Default to false and only output
id
in thezones
block. Set it to true can output more details.The parameter enable_details has been deprecated from version v1.154.0+
- master
Zone stringId The primary zone.
- output
File string File name where to save data source results (after running
pulumi preview
).- slave
Zone stringId The secondary zone.
- available_
slb_ straddress_ ip_ version Filter the results by a slb instance address version. Can be either
ipv4
, oripv6
.- available_
slb_ straddress_ type Filter the results by a slb instance network type. Valid values:
- vpc: an internal SLB instance that is deployed in a virtual private cloud (VPC).
- classic_internet: a public-facing SLB instance.
- classic_intranet: an internal SLB instance that is deployed in a classic network.
- enable_
details bool Default to false and only output
id
in thezones
block. Set it to true can output more details.The parameter enable_details has been deprecated from version v1.154.0+
- master_
zone_ strid The primary zone.
- output_
file str File name where to save data source results (after running
pulumi preview
).- slave_
zone_ strid The secondary zone.
- available
Slb StringAddress Ip Version Filter the results by a slb instance address version. Can be either
ipv4
, oripv6
.- available
Slb StringAddress Type Filter the results by a slb instance network type. Valid values:
- vpc: an internal SLB instance that is deployed in a virtual private cloud (VPC).
- classic_internet: a public-facing SLB instance.
- classic_intranet: an internal SLB instance that is deployed in a classic network.
- enable
Details Boolean Default to false and only output
id
in thezones
block. Set it to true can output more details.The parameter enable_details has been deprecated from version v1.154.0+
- master
Zone StringId The primary zone.
- output
File String File name where to save data source results (after running
pulumi preview
).- slave
Zone StringId The secondary zone.
getZones Result
The following output properties are available:
- Id string
The provider-assigned unique ID for this managed resource.
- Ids List<string>
A list of primary zone IDs.
- Zones
List<Pulumi.
Ali Cloud. Slb. Outputs. Get Zones Zone> A list of availability zones. Each element contains the following attributes:
- Available
Slb stringAddress Ip Version - Available
Slb stringAddress Type - Enable
Details bool The parameter enable_details has been deprecated from version v1.154.0+
- Master
Zone stringId (Available in 1.157.0+) The primary zone.
- Output
File string - Slave
Zone stringId (Available in 1.157.0+) The secondary zone.
- Id string
The provider-assigned unique ID for this managed resource.
- Ids []string
A list of primary zone IDs.
- Zones
[]Get
Zones Zone A list of availability zones. Each element contains the following attributes:
- Available
Slb stringAddress Ip Version - Available
Slb stringAddress Type - Enable
Details bool The parameter enable_details has been deprecated from version v1.154.0+
- Master
Zone stringId (Available in 1.157.0+) The primary zone.
- Output
File string - Slave
Zone stringId (Available in 1.157.0+) The secondary zone.
- id String
The provider-assigned unique ID for this managed resource.
- ids List<String>
A list of primary zone IDs.
- zones
List<Get
Zones Zone> A list of availability zones. Each element contains the following attributes:
- available
Slb StringAddress Ip Version - available
Slb StringAddress Type - enable
Details Boolean The parameter enable_details has been deprecated from version v1.154.0+
- master
Zone StringId (Available in 1.157.0+) The primary zone.
- output
File String - slave
Zone StringId (Available in 1.157.0+) The secondary zone.
- id string
The provider-assigned unique ID for this managed resource.
- ids string[]
A list of primary zone IDs.
- zones
Get
Zones Zone[] A list of availability zones. Each element contains the following attributes:
- available
Slb stringAddress Ip Version - available
Slb stringAddress Type - enable
Details boolean The parameter enable_details has been deprecated from version v1.154.0+
- master
Zone stringId (Available in 1.157.0+) The primary zone.
- output
File string - slave
Zone stringId (Available in 1.157.0+) The secondary zone.
- id str
The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
A list of primary zone IDs.
- zones
Sequence[Get
Zones Zone] A list of availability zones. Each element contains the following attributes:
- available_
slb_ straddress_ ip_ version - available_
slb_ straddress_ type - enable_
details bool The parameter enable_details has been deprecated from version v1.154.0+
- master_
zone_ strid (Available in 1.157.0+) The primary zone.
- output_
file str - slave_
zone_ strid (Available in 1.157.0+) The secondary zone.
- id String
The provider-assigned unique ID for this managed resource.
- ids List<String>
A list of primary zone IDs.
- zones List<Property Map>
A list of availability zones. Each element contains the following attributes:
- available
Slb StringAddress Ip Version - available
Slb StringAddress Type - enable
Details Boolean The parameter enable_details has been deprecated from version v1.154.0+
- master
Zone StringId (Available in 1.157.0+) The primary zone.
- output
File String - slave
Zone StringId (Available in 1.157.0+) The secondary zone.
Supporting Types
GetZonesZone
- Id string
ID of the zone. It is same as
master_zone_id
.- Master
Zone stringId The primary zone.
- Slave
Zone stringId The secondary zone.
- Slb
Slave List<string>Zone Ids (Deprecated from 1.157.0) A list of slb slave zone ids in which the slb master zone. It has been deprecated from v1.157.0 and use
slave_zone_id
instead.the attribute slb_slave_zone_ids has been deprecated from version 1.157.0 and use slave_zone_id instead.
- Supported
Resources List<Pulumi.Ali Cloud. Slb. Inputs. Get Zones Zone Supported Resource> (Available in 1.154.0+)A list of available resource which the slb master zone supported.
- Id string
ID of the zone. It is same as
master_zone_id
.- Master
Zone stringId The primary zone.
- Slave
Zone stringId The secondary zone.
- Slb
Slave []stringZone Ids (Deprecated from 1.157.0) A list of slb slave zone ids in which the slb master zone. It has been deprecated from v1.157.0 and use
slave_zone_id
instead.the attribute slb_slave_zone_ids has been deprecated from version 1.157.0 and use slave_zone_id instead.
- Supported
Resources []GetZones Zone Supported Resource (Available in 1.154.0+)A list of available resource which the slb master zone supported.
- id String
ID of the zone. It is same as
master_zone_id
.- master
Zone StringId The primary zone.
- slave
Zone StringId The secondary zone.
- slb
Slave List<String>Zone Ids (Deprecated from 1.157.0) A list of slb slave zone ids in which the slb master zone. It has been deprecated from v1.157.0 and use
slave_zone_id
instead.the attribute slb_slave_zone_ids has been deprecated from version 1.157.0 and use slave_zone_id instead.
- supported
Resources List<GetZones Zone Supported Resource> (Available in 1.154.0+)A list of available resource which the slb master zone supported.
- id string
ID of the zone. It is same as
master_zone_id
.- master
Zone stringId The primary zone.
- slave
Zone stringId The secondary zone.
- slb
Slave string[]Zone Ids (Deprecated from 1.157.0) A list of slb slave zone ids in which the slb master zone. It has been deprecated from v1.157.0 and use
slave_zone_id
instead.the attribute slb_slave_zone_ids has been deprecated from version 1.157.0 and use slave_zone_id instead.
- supported
Resources GetZones Zone Supported Resource[] (Available in 1.154.0+)A list of available resource which the slb master zone supported.
- id str
ID of the zone. It is same as
master_zone_id
.- master_
zone_ strid The primary zone.
- slave_
zone_ strid The secondary zone.
- slb_
slave_ Sequence[str]zone_ ids (Deprecated from 1.157.0) A list of slb slave zone ids in which the slb master zone. It has been deprecated from v1.157.0 and use
slave_zone_id
instead.the attribute slb_slave_zone_ids has been deprecated from version 1.157.0 and use slave_zone_id instead.
- supported_
resources Sequence[GetZones Zone Supported Resource] (Available in 1.154.0+)A list of available resource which the slb master zone supported.
- id String
ID of the zone. It is same as
master_zone_id
.- master
Zone StringId The primary zone.
- slave
Zone StringId The secondary zone.
- slb
Slave List<String>Zone Ids (Deprecated from 1.157.0) A list of slb slave zone ids in which the slb master zone. It has been deprecated from v1.157.0 and use
slave_zone_id
instead.the attribute slb_slave_zone_ids has been deprecated from version 1.157.0 and use slave_zone_id instead.
- supported
Resources List<Property Map> (Available in 1.154.0+)A list of available resource which the slb master zone supported.
GetZonesZoneSupportedResource
- Address
Ip stringVersion The type of IP address.
- Address
Type string The type of network.
- Address
Ip stringVersion The type of IP address.
- Address
Type string The type of network.
- address
Ip StringVersion The type of IP address.
- address
Type String The type of network.
- address
Ip stringVersion The type of IP address.
- address
Type string The type of network.
- address_
ip_ strversion The type of IP address.
- address_
type str The type of network.
- address
Ip StringVersion The type of IP address.
- address
Type String The type of network.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
alicloud
Terraform Provider.