alicloud.getZones
Explore with Pulumi AI
This data source provides availability zones that can be accessed by an Alibaba Cloud account within the region configured in the provider.
NOTE: If one zone is sold out, it will not be exported.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
// Declare the data source
const zonesDs = alicloud.getZones({
availableInstanceType: "ecs.n4.large",
availableDiskCategory: "cloud_ssd",
});
import pulumi
import pulumi_alicloud as alicloud
# Declare the data source
zones_ds = alicloud.get_zones(available_instance_type="ecs.n4.large",
available_disk_category="cloud_ssd")
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Declare the data source
_, err := alicloud.GetZones(ctx, &alicloud.GetZonesArgs{
AvailableInstanceType: pulumi.StringRef("ecs.n4.large"),
AvailableDiskCategory: pulumi.StringRef("cloud_ssd"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
// Declare the data source
var zonesDs = AliCloud.GetZones.Invoke(new()
{
AvailableInstanceType = "ecs.n4.large",
AvailableDiskCategory = "cloud_ssd",
});
});
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.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) {
// Declare the data source
final var zonesDs = AlicloudFunctions.getZones(GetZonesArgs.builder()
.availableInstanceType("ecs.n4.large")
.availableDiskCategory("cloud_ssd")
.build());
}
}
variables:
# Declare the data source
zonesDs:
fn::invoke:
Function: alicloud:getZones
Arguments:
availableInstanceType: ecs.n4.large
availableDiskCategory: cloud_ssd
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_disk_category: Optional[str] = None,
available_instance_type: Optional[str] = None,
available_resource_creation: Optional[str] = None,
available_slb_address_ip_version: Optional[str] = None,
available_slb_address_type: Optional[str] = None,
enable_details: Optional[bool] = None,
instance_charge_type: Optional[str] = None,
multi: Optional[bool] = None,
network_type: Optional[str] = None,
output_file: Optional[str] = None,
spot_strategy: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetZonesResult
def get_zones_output(available_disk_category: Optional[pulumi.Input[str]] = None,
available_instance_type: Optional[pulumi.Input[str]] = None,
available_resource_creation: Optional[pulumi.Input[str]] = None,
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,
instance_charge_type: Optional[pulumi.Input[str]] = None,
multi: Optional[pulumi.Input[bool]] = None,
network_type: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
spot_strategy: 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:index/getZones:getZones
arguments:
# arguments dictionary
The following arguments are supported:
- Available
Disk stringCategory - Filter the results by a specific disk category. Can be either
cloud
,cloud_efficiency
,cloud_ssd
,ephemeral_ssd
. - Available
Instance stringType - Filter the results by a specific instance type.
- Available
Resource stringCreation Filter the results by a specific resource type. Valid values:
Instance
,Disk
,VSwitch
,Rds
,KVStore
,FunctionCompute
,Elasticsearch
,Slb
.NOTE: From version 1.134.0, the
available_resource_creation
value "Rds" has been deprecated. If you want to fetch the available zones for RDS instance, you can use datasource alicloud_db_zones- Available
Slb stringAddress Ip Version Filter the results by a slb instance address version. Can be either
ipv4
, oripv6
.NOTE: The disk category
cloud
has been outdated and can only be used by non-I/O Optimized ECS instances. Many availability zones don't support it. It is recommended to usecloud_efficiency
orcloud_ssd
.- Available
Slb stringAddress Type - Filter the results by a slb instance address type. Can be either
Vpc
,classic_internet
orclassic_intranet
- Enable
Details bool - Default to false and only output
id
in thezones
block. Set it to true can output more details. - Instance
Charge stringType - Filter the results by a specific ECS instance charge type. Valid values:
PrePaid
andPostPaid
. Default toPostPaid
. - Multi bool
- Indicate whether the zones can be used in a multi AZ configuration. Default to
false
. Multi AZ is usually used to launch RDS instances. - Network
Type string - Filter the results by a specific network type. Valid values:
Classic
andVpc
. - Output
File string - File name where to save data source results (after running
pulumi preview
). - Spot
Strategy string - (Optional) Filter the results by a specific ECS spot type. Valid values:
NoSpot
,SpotWithPriceLimit
andSpotAsPriceGo
. Default toNoSpot
.
- (Optional) Filter the results by a specific ECS spot type. Valid values:
- Available
Disk stringCategory - Filter the results by a specific disk category. Can be either
cloud
,cloud_efficiency
,cloud_ssd
,ephemeral_ssd
. - Available
Instance stringType - Filter the results by a specific instance type.
- Available
Resource stringCreation Filter the results by a specific resource type. Valid values:
Instance
,Disk
,VSwitch
,Rds
,KVStore
,FunctionCompute
,Elasticsearch
,Slb
.NOTE: From version 1.134.0, the
available_resource_creation
value "Rds" has been deprecated. If you want to fetch the available zones for RDS instance, you can use datasource alicloud_db_zones- Available
Slb stringAddress Ip Version Filter the results by a slb instance address version. Can be either
ipv4
, oripv6
.NOTE: The disk category
cloud
has been outdated and can only be used by non-I/O Optimized ECS instances. Many availability zones don't support it. It is recommended to usecloud_efficiency
orcloud_ssd
.- Available
Slb stringAddress Type - Filter the results by a slb instance address type. Can be either
Vpc
,classic_internet
orclassic_intranet
- Enable
Details bool - Default to false and only output
id
in thezones
block. Set it to true can output more details. - Instance
Charge stringType - Filter the results by a specific ECS instance charge type. Valid values:
PrePaid
andPostPaid
. Default toPostPaid
. - Multi bool
- Indicate whether the zones can be used in a multi AZ configuration. Default to
false
. Multi AZ is usually used to launch RDS instances. - Network
Type string - Filter the results by a specific network type. Valid values:
Classic
andVpc
. - Output
File string - File name where to save data source results (after running
pulumi preview
). - Spot
Strategy string - (Optional) Filter the results by a specific ECS spot type. Valid values:
NoSpot
,SpotWithPriceLimit
andSpotAsPriceGo
. Default toNoSpot
.
- (Optional) Filter the results by a specific ECS spot type. Valid values:
- available
Disk StringCategory - Filter the results by a specific disk category. Can be either
cloud
,cloud_efficiency
,cloud_ssd
,ephemeral_ssd
. - available
Instance StringType - Filter the results by a specific instance type.
- available
Resource StringCreation Filter the results by a specific resource type. Valid values:
Instance
,Disk
,VSwitch
,Rds
,KVStore
,FunctionCompute
,Elasticsearch
,Slb
.NOTE: From version 1.134.0, the
available_resource_creation
value "Rds" has been deprecated. If you want to fetch the available zones for RDS instance, you can use datasource alicloud_db_zones- available
Slb StringAddress Ip Version Filter the results by a slb instance address version. Can be either
ipv4
, oripv6
.NOTE: The disk category
cloud
has been outdated and can only be used by non-I/O Optimized ECS instances. Many availability zones don't support it. It is recommended to usecloud_efficiency
orcloud_ssd
.- available
Slb StringAddress Type - Filter the results by a slb instance address type. Can be either
Vpc
,classic_internet
orclassic_intranet
- enable
Details Boolean - Default to false and only output
id
in thezones
block. Set it to true can output more details. - instance
Charge StringType - Filter the results by a specific ECS instance charge type. Valid values:
PrePaid
andPostPaid
. Default toPostPaid
. - multi Boolean
- Indicate whether the zones can be used in a multi AZ configuration. Default to
false
. Multi AZ is usually used to launch RDS instances. - network
Type String - Filter the results by a specific network type. Valid values:
Classic
andVpc
. - output
File String - File name where to save data source results (after running
pulumi preview
). - spot
Strategy String - (Optional) Filter the results by a specific ECS spot type. Valid values:
NoSpot
,SpotWithPriceLimit
andSpotAsPriceGo
. Default toNoSpot
.
- (Optional) Filter the results by a specific ECS spot type. Valid values:
- available
Disk stringCategory - Filter the results by a specific disk category. Can be either
cloud
,cloud_efficiency
,cloud_ssd
,ephemeral_ssd
. - available
Instance stringType - Filter the results by a specific instance type.
- available
Resource stringCreation Filter the results by a specific resource type. Valid values:
Instance
,Disk
,VSwitch
,Rds
,KVStore
,FunctionCompute
,Elasticsearch
,Slb
.NOTE: From version 1.134.0, the
available_resource_creation
value "Rds" has been deprecated. If you want to fetch the available zones for RDS instance, you can use datasource alicloud_db_zones- available
Slb stringAddress Ip Version Filter the results by a slb instance address version. Can be either
ipv4
, oripv6
.NOTE: The disk category
cloud
has been outdated and can only be used by non-I/O Optimized ECS instances. Many availability zones don't support it. It is recommended to usecloud_efficiency
orcloud_ssd
.- available
Slb stringAddress Type - Filter the results by a slb instance address type. Can be either
Vpc
,classic_internet
orclassic_intranet
- enable
Details boolean - Default to false and only output
id
in thezones
block. Set it to true can output more details. - instance
Charge stringType - Filter the results by a specific ECS instance charge type. Valid values:
PrePaid
andPostPaid
. Default toPostPaid
. - multi boolean
- Indicate whether the zones can be used in a multi AZ configuration. Default to
false
. Multi AZ is usually used to launch RDS instances. - network
Type string - Filter the results by a specific network type. Valid values:
Classic
andVpc
. - output
File string - File name where to save data source results (after running
pulumi preview
). - spot
Strategy string - (Optional) Filter the results by a specific ECS spot type. Valid values:
NoSpot
,SpotWithPriceLimit
andSpotAsPriceGo
. Default toNoSpot
.
- (Optional) Filter the results by a specific ECS spot type. Valid values:
- available_
disk_ strcategory - Filter the results by a specific disk category. Can be either
cloud
,cloud_efficiency
,cloud_ssd
,ephemeral_ssd
. - available_
instance_ strtype - Filter the results by a specific instance type.
- available_
resource_ strcreation Filter the results by a specific resource type. Valid values:
Instance
,Disk
,VSwitch
,Rds
,KVStore
,FunctionCompute
,Elasticsearch
,Slb
.NOTE: From version 1.134.0, the
available_resource_creation
value "Rds" has been deprecated. If you want to fetch the available zones for RDS instance, you can use datasource alicloud_db_zones- available_
slb_ straddress_ ip_ version Filter the results by a slb instance address version. Can be either
ipv4
, oripv6
.NOTE: The disk category
cloud
has been outdated and can only be used by non-I/O Optimized ECS instances. Many availability zones don't support it. It is recommended to usecloud_efficiency
orcloud_ssd
.- available_
slb_ straddress_ type - Filter the results by a slb instance address type. Can be either
Vpc
,classic_internet
orclassic_intranet
- enable_
details bool - Default to false and only output
id
in thezones
block. Set it to true can output more details. - instance_
charge_ strtype - Filter the results by a specific ECS instance charge type. Valid values:
PrePaid
andPostPaid
. Default toPostPaid
. - multi bool
- Indicate whether the zones can be used in a multi AZ configuration. Default to
false
. Multi AZ is usually used to launch RDS instances. - network_
type str - Filter the results by a specific network type. Valid values:
Classic
andVpc
. - output_
file str - File name where to save data source results (after running
pulumi preview
). - spot_
strategy str - (Optional) Filter the results by a specific ECS spot type. Valid values:
NoSpot
,SpotWithPriceLimit
andSpotAsPriceGo
. Default toNoSpot
.
- (Optional) Filter the results by a specific ECS spot type. Valid values:
- available
Disk StringCategory - Filter the results by a specific disk category. Can be either
cloud
,cloud_efficiency
,cloud_ssd
,ephemeral_ssd
. - available
Instance StringType - Filter the results by a specific instance type.
- available
Resource StringCreation Filter the results by a specific resource type. Valid values:
Instance
,Disk
,VSwitch
,Rds
,KVStore
,FunctionCompute
,Elasticsearch
,Slb
.NOTE: From version 1.134.0, the
available_resource_creation
value "Rds" has been deprecated. If you want to fetch the available zones for RDS instance, you can use datasource alicloud_db_zones- available
Slb StringAddress Ip Version Filter the results by a slb instance address version. Can be either
ipv4
, oripv6
.NOTE: The disk category
cloud
has been outdated and can only be used by non-I/O Optimized ECS instances. Many availability zones don't support it. It is recommended to usecloud_efficiency
orcloud_ssd
.- available
Slb StringAddress Type - Filter the results by a slb instance address type. Can be either
Vpc
,classic_internet
orclassic_intranet
- enable
Details Boolean - Default to false and only output
id
in thezones
block. Set it to true can output more details. - instance
Charge StringType - Filter the results by a specific ECS instance charge type. Valid values:
PrePaid
andPostPaid
. Default toPostPaid
. - multi Boolean
- Indicate whether the zones can be used in a multi AZ configuration. Default to
false
. Multi AZ is usually used to launch RDS instances. - network
Type String - Filter the results by a specific network type. Valid values:
Classic
andVpc
. - output
File String - File name where to save data source results (after running
pulumi preview
). - spot
Strategy String - (Optional) Filter the results by a specific ECS spot type. Valid values:
NoSpot
,SpotWithPriceLimit
andSpotAsPriceGo
. Default toNoSpot
.
- (Optional) Filter the results by a specific ECS spot type. Valid values:
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 zone IDs.
- Zones
List<Pulumi.
Ali Cloud. Outputs. Get Zones Zone> - A list of availability zones. Each element contains the following attributes:
- Available
Disk stringCategory - Available
Instance stringType - Available
Resource stringCreation - Type of resources that can be created.
- Available
Slb stringAddress Ip Version - Available
Slb stringAddress Type - Enable
Details bool - Instance
Charge stringType - Multi bool
- Network
Type string - Output
File string - Spot
Strategy string
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- A list of zone IDs.
- Zones
[]Get
Zones Zone - A list of availability zones. Each element contains the following attributes:
- Available
Disk stringCategory - Available
Instance stringType - Available
Resource stringCreation - Type of resources that can be created.
- Available
Slb stringAddress Ip Version - Available
Slb stringAddress Type - Enable
Details bool - Instance
Charge stringType - Multi bool
- Network
Type string - Output
File string - Spot
Strategy string
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- A list of zone IDs.
- zones
List<Get
Zones Zone> - A list of availability zones. Each element contains the following attributes:
- available
Disk StringCategory - available
Instance StringType - available
Resource StringCreation - Type of resources that can be created.
- available
Slb StringAddress Ip Version - available
Slb StringAddress Type - enable
Details Boolean - instance
Charge StringType - multi Boolean
- network
Type String - output
File String - spot
Strategy String
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- A list of zone IDs.
- zones
Get
Zones Zone[] - A list of availability zones. Each element contains the following attributes:
- available
Disk stringCategory - available
Instance stringType - available
Resource stringCreation - Type of resources that can be created.
- available
Slb stringAddress Ip Version - available
Slb stringAddress Type - enable
Details boolean - instance
Charge stringType - multi boolean
- network
Type string - output
File string - spot
Strategy string
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- A list of zone IDs.
- zones
Sequence[Get
Zones Zone] - A list of availability zones. Each element contains the following attributes:
- available_
disk_ strcategory - available_
instance_ strtype - available_
resource_ strcreation - Type of resources that can be created.
- available_
slb_ straddress_ ip_ version - available_
slb_ straddress_ type - enable_
details bool - instance_
charge_ strtype - multi bool
- network_
type str - output_
file str - spot_
strategy str
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- A list of zone IDs.
- zones List<Property Map>
- A list of availability zones. Each element contains the following attributes:
- available
Disk StringCategory - available
Instance StringType - available
Resource StringCreation - Type of resources that can be created.
- available
Slb StringAddress Ip Version - available
Slb StringAddress Type - enable
Details Boolean - instance
Charge StringType - multi Boolean
- network
Type String - output
File String - spot
Strategy String
Supporting Types
GetZonesZone
- Available
Disk List<string>Categories - Set of supported disk categories.
- Available
Instance List<string>Types - Allowed instance types.
- Available
Resource List<string>Creations Filter the results by a specific resource type. Valid values:
Instance
,Disk
,VSwitch
,Rds
,KVStore
,FunctionCompute
,Elasticsearch
,Slb
.NOTE: From version 1.134.0, the
available_resource_creation
value "Rds" has been deprecated. If you want to fetch the available zones for RDS instance, you can use datasource alicloud_db_zones- Id string
- ID of the zone.
- Local
Name string - Name of the zone in the local language.
- Multi
Zone List<string>Ids - A list of zone ids in which the multi zone.
- Slb
Slave List<string>Zone Ids - A list of slb slave zone ids in which the slb master zone.
- Available
Disk []stringCategories - Set of supported disk categories.
- Available
Instance []stringTypes - Allowed instance types.
- Available
Resource []stringCreations Filter the results by a specific resource type. Valid values:
Instance
,Disk
,VSwitch
,Rds
,KVStore
,FunctionCompute
,Elasticsearch
,Slb
.NOTE: From version 1.134.0, the
available_resource_creation
value "Rds" has been deprecated. If you want to fetch the available zones for RDS instance, you can use datasource alicloud_db_zones- Id string
- ID of the zone.
- Local
Name string - Name of the zone in the local language.
- Multi
Zone []stringIds - A list of zone ids in which the multi zone.
- Slb
Slave []stringZone Ids - A list of slb slave zone ids in which the slb master zone.
- available
Disk List<String>Categories - Set of supported disk categories.
- available
Instance List<String>Types - Allowed instance types.
- available
Resource List<String>Creations Filter the results by a specific resource type. Valid values:
Instance
,Disk
,VSwitch
,Rds
,KVStore
,FunctionCompute
,Elasticsearch
,Slb
.NOTE: From version 1.134.0, the
available_resource_creation
value "Rds" has been deprecated. If you want to fetch the available zones for RDS instance, you can use datasource alicloud_db_zones- id String
- ID of the zone.
- local
Name String - Name of the zone in the local language.
- multi
Zone List<String>Ids - A list of zone ids in which the multi zone.
- slb
Slave List<String>Zone Ids - A list of slb slave zone ids in which the slb master zone.
- available
Disk string[]Categories - Set of supported disk categories.
- available
Instance string[]Types - Allowed instance types.
- available
Resource string[]Creations Filter the results by a specific resource type. Valid values:
Instance
,Disk
,VSwitch
,Rds
,KVStore
,FunctionCompute
,Elasticsearch
,Slb
.NOTE: From version 1.134.0, the
available_resource_creation
value "Rds" has been deprecated. If you want to fetch the available zones for RDS instance, you can use datasource alicloud_db_zones- id string
- ID of the zone.
- local
Name string - Name of the zone in the local language.
- multi
Zone string[]Ids - A list of zone ids in which the multi zone.
- slb
Slave string[]Zone Ids - A list of slb slave zone ids in which the slb master zone.
- available_
disk_ Sequence[str]categories - Set of supported disk categories.
- available_
instance_ Sequence[str]types - Allowed instance types.
- available_
resource_ Sequence[str]creations Filter the results by a specific resource type. Valid values:
Instance
,Disk
,VSwitch
,Rds
,KVStore
,FunctionCompute
,Elasticsearch
,Slb
.NOTE: From version 1.134.0, the
available_resource_creation
value "Rds" has been deprecated. If you want to fetch the available zones for RDS instance, you can use datasource alicloud_db_zones- id str
- ID of the zone.
- local_
name str - Name of the zone in the local language.
- multi_
zone_ Sequence[str]ids - A list of zone ids in which the multi zone.
- slb_
slave_ Sequence[str]zone_ ids - A list of slb slave zone ids in which the slb master zone.
- available
Disk List<String>Categories - Set of supported disk categories.
- available
Instance List<String>Types - Allowed instance types.
- available
Resource List<String>Creations Filter the results by a specific resource type. Valid values:
Instance
,Disk
,VSwitch
,Rds
,KVStore
,FunctionCompute
,Elasticsearch
,Slb
.NOTE: From version 1.134.0, the
available_resource_creation
value "Rds" has been deprecated. If you want to fetch the available zones for RDS instance, you can use datasource alicloud_db_zones- id String
- ID of the zone.
- local
Name String - Name of the zone in the local language.
- multi
Zone List<String>Ids - A list of zone ids in which the multi zone.
- slb
Slave List<String>Zone Ids - A list of slb slave zone ids in which the slb master zone.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.