1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. getZones
Alibaba Cloud v3.49.0 published on Sunday, Feb 4, 2024 by Pulumi

alicloud.getZones

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.49.0 published on Sunday, Feb 4, 2024 by Pulumi

    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

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var zonesDs = AliCloud.GetZones.Invoke(new()
        {
            AvailableDiskCategory = "cloud_ssd",
            AvailableInstanceType = "ecs.n4.large",
        });
    
    });
    
    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 {
    		_, err := alicloud.GetZones(ctx, &alicloud.GetZonesArgs{
    			AvailableDiskCategory: pulumi.StringRef("cloud_ssd"),
    			AvailableInstanceType: pulumi.StringRef("ecs.n4.large"),
    		}, 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.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) {
            final var zonesDs = AlicloudFunctions.getZones(GetZonesArgs.builder()
                .availableDiskCategory("cloud_ssd")
                .availableInstanceType("ecs.n4.large")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    zones_ds = alicloud.get_zones(available_disk_category="cloud_ssd",
        available_instance_type="ecs.n4.large")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const zonesDs = alicloud.getZones({
        availableDiskCategory: "cloud_ssd",
        availableInstanceType: "ecs.n4.large",
    });
    
    variables:
      zonesDs:
        fn::invoke:
          Function: alicloud:getZones
          Arguments:
            availableDiskCategory: cloud_ssd
            availableInstanceType: ecs.n4.large
    

    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:

    AvailableDiskCategory string
    Filter the results by a specific disk category. Can be either cloud, cloud_efficiency, cloud_ssd, ephemeral_ssd.
    AvailableInstanceType string
    Filter the results by a specific instance type.
    AvailableResourceCreation string

    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

    AvailableSlbAddressIpVersion string

    Filter the results by a slb instance address version. Can be either ipv4, or ipv6.

    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 use cloud_efficiency or cloud_ssd.

    AvailableSlbAddressType string
    Filter the results by a slb instance address type. Can be either Vpc, classic_internet or classic_intranet
    EnableDetails bool
    Default to false and only output id in the zones block. Set it to true can output more details.
    InstanceChargeType string
    Filter the results by a specific ECS instance charge type. Valid values: PrePaid and PostPaid. Default to PostPaid.
    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.
    NetworkType string
    Filter the results by a specific network type. Valid values: Classic and Vpc.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    SpotStrategy string
    • (Optional) Filter the results by a specific ECS spot type. Valid values: NoSpot, SpotWithPriceLimit and SpotAsPriceGo. Default to NoSpot.
    AvailableDiskCategory string
    Filter the results by a specific disk category. Can be either cloud, cloud_efficiency, cloud_ssd, ephemeral_ssd.
    AvailableInstanceType string
    Filter the results by a specific instance type.
    AvailableResourceCreation string

    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

    AvailableSlbAddressIpVersion string

    Filter the results by a slb instance address version. Can be either ipv4, or ipv6.

    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 use cloud_efficiency or cloud_ssd.

    AvailableSlbAddressType string
    Filter the results by a slb instance address type. Can be either Vpc, classic_internet or classic_intranet
    EnableDetails bool
    Default to false and only output id in the zones block. Set it to true can output more details.
    InstanceChargeType string
    Filter the results by a specific ECS instance charge type. Valid values: PrePaid and PostPaid. Default to PostPaid.
    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.
    NetworkType string
    Filter the results by a specific network type. Valid values: Classic and Vpc.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    SpotStrategy string
    • (Optional) Filter the results by a specific ECS spot type. Valid values: NoSpot, SpotWithPriceLimit and SpotAsPriceGo. Default to NoSpot.
    availableDiskCategory String
    Filter the results by a specific disk category. Can be either cloud, cloud_efficiency, cloud_ssd, ephemeral_ssd.
    availableInstanceType String
    Filter the results by a specific instance type.
    availableResourceCreation String

    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

    availableSlbAddressIpVersion String

    Filter the results by a slb instance address version. Can be either ipv4, or ipv6.

    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 use cloud_efficiency or cloud_ssd.

    availableSlbAddressType String
    Filter the results by a slb instance address type. Can be either Vpc, classic_internet or classic_intranet
    enableDetails Boolean
    Default to false and only output id in the zones block. Set it to true can output more details.
    instanceChargeType String
    Filter the results by a specific ECS instance charge type. Valid values: PrePaid and PostPaid. Default to PostPaid.
    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.
    networkType String
    Filter the results by a specific network type. Valid values: Classic and Vpc.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    spotStrategy String
    • (Optional) Filter the results by a specific ECS spot type. Valid values: NoSpot, SpotWithPriceLimit and SpotAsPriceGo. Default to NoSpot.
    availableDiskCategory string
    Filter the results by a specific disk category. Can be either cloud, cloud_efficiency, cloud_ssd, ephemeral_ssd.
    availableInstanceType string
    Filter the results by a specific instance type.
    availableResourceCreation string

    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

    availableSlbAddressIpVersion string

    Filter the results by a slb instance address version. Can be either ipv4, or ipv6.

    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 use cloud_efficiency or cloud_ssd.

    availableSlbAddressType string
    Filter the results by a slb instance address type. Can be either Vpc, classic_internet or classic_intranet
    enableDetails boolean
    Default to false and only output id in the zones block. Set it to true can output more details.
    instanceChargeType string
    Filter the results by a specific ECS instance charge type. Valid values: PrePaid and PostPaid. Default to PostPaid.
    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.
    networkType string
    Filter the results by a specific network type. Valid values: Classic and Vpc.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    spotStrategy string
    • (Optional) Filter the results by a specific ECS spot type. Valid values: NoSpot, SpotWithPriceLimit and SpotAsPriceGo. Default to NoSpot.
    available_disk_category str
    Filter the results by a specific disk category. Can be either cloud, cloud_efficiency, cloud_ssd, ephemeral_ssd.
    available_instance_type str
    Filter the results by a specific instance type.
    available_resource_creation str

    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_address_ip_version str

    Filter the results by a slb instance address version. Can be either ipv4, or ipv6.

    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 use cloud_efficiency or cloud_ssd.

    available_slb_address_type str
    Filter the results by a slb instance address type. Can be either Vpc, classic_internet or classic_intranet
    enable_details bool
    Default to false and only output id in the zones block. Set it to true can output more details.
    instance_charge_type str
    Filter the results by a specific ECS instance charge type. Valid values: PrePaid and PostPaid. Default to PostPaid.
    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 and Vpc.
    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 and SpotAsPriceGo. Default to NoSpot.
    availableDiskCategory String
    Filter the results by a specific disk category. Can be either cloud, cloud_efficiency, cloud_ssd, ephemeral_ssd.
    availableInstanceType String
    Filter the results by a specific instance type.
    availableResourceCreation String

    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

    availableSlbAddressIpVersion String

    Filter the results by a slb instance address version. Can be either ipv4, or ipv6.

    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 use cloud_efficiency or cloud_ssd.

    availableSlbAddressType String
    Filter the results by a slb instance address type. Can be either Vpc, classic_internet or classic_intranet
    enableDetails Boolean
    Default to false and only output id in the zones block. Set it to true can output more details.
    instanceChargeType String
    Filter the results by a specific ECS instance charge type. Valid values: PrePaid and PostPaid. Default to PostPaid.
    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.
    networkType String
    Filter the results by a specific network type. Valid values: Classic and Vpc.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    spotStrategy String
    • (Optional) Filter the results by a specific ECS spot type. Valid values: NoSpot, SpotWithPriceLimit and SpotAsPriceGo. Default to NoSpot.

    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.AliCloud.Outputs.GetZonesZone>
    A list of availability zones. Each element contains the following attributes:
    AvailableDiskCategory string
    AvailableInstanceType string
    AvailableResourceCreation string
    Type of resources that can be created.
    AvailableSlbAddressIpVersion string
    AvailableSlbAddressType string
    EnableDetails bool
    InstanceChargeType string
    Multi bool
    NetworkType string
    OutputFile string
    SpotStrategy string
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    A list of zone IDs.
    Zones []GetZonesZone
    A list of availability zones. Each element contains the following attributes:
    AvailableDiskCategory string
    AvailableInstanceType string
    AvailableResourceCreation string
    Type of resources that can be created.
    AvailableSlbAddressIpVersion string
    AvailableSlbAddressType string
    EnableDetails bool
    InstanceChargeType string
    Multi bool
    NetworkType string
    OutputFile string
    SpotStrategy string
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    A list of zone IDs.
    zones List<GetZonesZone>
    A list of availability zones. Each element contains the following attributes:
    availableDiskCategory String
    availableInstanceType String
    availableResourceCreation String
    Type of resources that can be created.
    availableSlbAddressIpVersion String
    availableSlbAddressType String
    enableDetails Boolean
    instanceChargeType String
    multi Boolean
    networkType String
    outputFile String
    spotStrategy String
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    A list of zone IDs.
    zones GetZonesZone[]
    A list of availability zones. Each element contains the following attributes:
    availableDiskCategory string
    availableInstanceType string
    availableResourceCreation string
    Type of resources that can be created.
    availableSlbAddressIpVersion string
    availableSlbAddressType string
    enableDetails boolean
    instanceChargeType string
    multi boolean
    networkType string
    outputFile string
    spotStrategy string
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    A list of zone IDs.
    zones Sequence[GetZonesZone]
    A list of availability zones. Each element contains the following attributes:
    available_disk_category str
    available_instance_type str
    available_resource_creation str
    Type of resources that can be created.
    available_slb_address_ip_version str
    available_slb_address_type str
    enable_details bool
    instance_charge_type str
    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:
    availableDiskCategory String
    availableInstanceType String
    availableResourceCreation String
    Type of resources that can be created.
    availableSlbAddressIpVersion String
    availableSlbAddressType String
    enableDetails Boolean
    instanceChargeType String
    multi Boolean
    networkType String
    outputFile String
    spotStrategy String

    Supporting Types

    GetZonesZone

    AvailableDiskCategories List<string>
    Set of supported disk categories.
    AvailableInstanceTypes List<string>
    Allowed instance types.
    AvailableResourceCreations List<string>

    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.
    LocalName string
    Name of the zone in the local language.
    MultiZoneIds List<string>
    A list of zone ids in which the multi zone.
    SlbSlaveZoneIds List<string>
    A list of slb slave zone ids in which the slb master zone.
    AvailableDiskCategories []string
    Set of supported disk categories.
    AvailableInstanceTypes []string
    Allowed instance types.
    AvailableResourceCreations []string

    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.
    LocalName string
    Name of the zone in the local language.
    MultiZoneIds []string
    A list of zone ids in which the multi zone.
    SlbSlaveZoneIds []string
    A list of slb slave zone ids in which the slb master zone.
    availableDiskCategories List<String>
    Set of supported disk categories.
    availableInstanceTypes List<String>
    Allowed instance types.
    availableResourceCreations List<String>

    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.
    localName String
    Name of the zone in the local language.
    multiZoneIds List<String>
    A list of zone ids in which the multi zone.
    slbSlaveZoneIds List<String>
    A list of slb slave zone ids in which the slb master zone.
    availableDiskCategories string[]
    Set of supported disk categories.
    availableInstanceTypes string[]
    Allowed instance types.
    availableResourceCreations string[]

    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.
    localName string
    Name of the zone in the local language.
    multiZoneIds string[]
    A list of zone ids in which the multi zone.
    slbSlaveZoneIds string[]
    A list of slb slave zone ids in which the slb master zone.
    available_disk_categories Sequence[str]
    Set of supported disk categories.
    available_instance_types Sequence[str]
    Allowed instance types.
    available_resource_creations Sequence[str]

    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_ids Sequence[str]
    A list of zone ids in which the multi zone.
    slb_slave_zone_ids Sequence[str]
    A list of slb slave zone ids in which the slb master zone.
    availableDiskCategories List<String>
    Set of supported disk categories.
    availableInstanceTypes List<String>
    Allowed instance types.
    availableResourceCreations List<String>

    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.
    localName String
    Name of the zone in the local language.
    multiZoneIds List<String>
    A list of zone ids in which the multi zone.
    slbSlaveZoneIds List<String>
    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.
    alicloud logo
    Alibaba Cloud v3.49.0 published on Sunday, Feb 4, 2024 by Pulumi