DATASOURCE::RDS::Zones is used to query the zones that are available to an ApsaraDB RDS instance.

Syntax

{
  "Type": "DATASOURCE::RDS::Zones",
  "Properties": {
    "DispenseMode": String,
    "Category": String,
    "EngineVersion": String,
    "ZoneId": String,
    "CommodityCode": String,
    "Engine": String
  }
}

Properties

Property Type Required Editable Description Constraint
DispenseMode String No Yes Specifies whether to return the zones in which the single-zone deployment method is supported. Valid values:
  • 1: returns the zones.
  • 0: does not return the zones.
Note The single-zone deployment method allows you to deploy an Enterprise Edition instance in a single zone.
Category String No Yes The edition of the instance. Valid values:
  • Basic: Basic Edition
  • HighAvailability: High-availability Edition
  • AlwaysOn: Cluster Edition
  • Finance: Enterprise Edition
EngineVersion String No Yes The version of the database engine that is run by the instance. Valid values:
  • Valid values when you set the Engine parameter to MySQL: 5.5, 5.6, 5.7, and 8.0
  • Valid values when you set the Engine parameter to SQLServer: 2008r2, 08r2_ent_ha, 2012, 2012_ent_ha, 2012_std_ha, 2012_web, 2014_std_ha, 2016_ent_ha, 2016_std_ha, 2016_web, 2017_std_ha, 2017_ent, 2019_std_ha, and 2019_ent
  • Valid values when you set the Engine parameter to PostgreSQL: 9.4, 10.0, 11.0, 12.0, 13.0, and 14.0
  • Valid values when you set the Engine parameter to MariaDB: 10.3
ZoneId String No Yes The ID of the zone in which the instance is deployed. If the instance is deployed in multiple zones, the value of this property contains an MAZ part, such as cn-hangzhou-MAZ6(b,f) or cn-hangzhou-MAZ5(b,e,f). You can query the zone ID when you call the DescribeRegions operation. For more information, see Query regions.
CommodityCode String No Yes The commodity code of the instance. Valid values:
  • bards_intl: The instance is a pay-as-you-go primary instance.
  • rds_intl: The instance is a subscription primary instance.
  • rords_intl: The instance is a pay-as-you-go read-only instance.
  • rds_rordspre_public_intl: The instance is a subscription read-only instance.
Engine String Yes Yes The database engine that is run by the instance. Valid values:
  • MySQL
  • SQLServer
  • PostgreSQL
  • MariaDB

Response parameters (Fn::GetAtt)

  • ZoneIds: the zone IDs of the instance.
  • Zones: details of the zones of the instance.
Parameter Type Description Constraint
ZoneIds List The zone IDs of the instance. None.
Zones List Details of the zones of the instance. None.
ZoneId String The zone ID of the instance. None.
RegionId String The region ID of the instance. None.
SupportedEngines List The database engine versions that are available in the zones. Example:
[ {  "SupportedEngineVersions" : [ {    "Version" : "8.0",    "SupportedCategorys" : [ {      "Category" : "HighAvailability",      "SupportedStorageTypes" : [ {        "StorageType" : "local_ssd"      }, {        "StorageType" : "cloud_ssd"      } ]    }, {      "Category" : "Basic",      "SupportedStorageTypes" : [ {        "StorageType" : "cloud_ssd"      } ]    } ]  } ],  "Engine" : "MySQL"} ]

Examples

  • JSON format

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "Engine": {
          "Type": "String",
          "Description": "The database engine that is run by the instance.",
          "AllowedValues": [
            "MySQL",
            "SQLServer",
            "PostgreSQL",
            "MariaDB"
          ]
        }
      },
      "Resources": {
        "ExtensionDataSource": {
          "Type": "DATASOURCE::RDS::Zones",
          "Properties": {
            "Engine": {
              "Ref": "Engine"
            }
          }
        }
      },
      "Outputs": {
        "ZoneIds": {
          "Description": "The list of zone IDs.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "ZoneIds"
            ]
          }
        },
        "Zones": {
          "Description": "The list of The Zones.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "Zones"
            ]
          }
        }
      }
    }
  • YAML format

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      Engine:
        Type: String
        Description: The database engine that is run by the instance.
        AllowedValues:
          - MySQL
          - SQLServer
          - PostgreSQL
          - MariaDB
    Resources:
      ExtensionDataSource:
        Type: DATASOURCE::RDS::Zones
        Properties:
          Engine:
            Ref: Engine
    Outputs:
      ZoneIds:
        Description: The list of zone IDs.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - ZoneIds
      Zones:
        Description: The list of The Zones.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - Zones