All Products
Search
Document Center

Resource Orchestration Service:DATASOURCE::RDS::Zones

最終更新日:Dec 06, 2024

DATASOURCE::RDS::Zones is used to query the zones of an ApsaraDB RDS instance.

Syntax

{
  "Type": "DATASOURCE::RDS::Zones",
  "Properties": {
    "DispenseMode": String,
    "Category": String,
    "EngineVersion": String,
    "ZoneId": String,
    "CommodityCode": String,
    "Engine": String,
    "RefreshOptions": 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 in which the single-zone deployment method is supported.

  • 0: does not return the zones in which the single-zone deployment method is supported.

Note

The single-zone deployment method allows you to deploy an instance that runs RDS Enterprise Edition in a single zone.

Category

String

No

Yes

The edition of the instance.

Valid values:

  • Basic: RDS Basic Edition

  • HighAvailability: RDS High-availability Edition

  • AlwaysOn: RDS Cluster Edition

  • Finance: RDS Enterprise Edition

EngineVersion

String

No

Yes

The version of the database engine.

  • Valid values when Engine is set to MySQL: 5.5, 5.6, 5.7, and 8.0.

  • Valid values when Engine is set 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 Engine is set to PostgreSQL: 9.4, 10.0, 11.0, 12.0, 13.0, and 14.0.

  • Valid value when Engine is set to MariaDB: 10.3.

ZoneId

String

No

Yes

The zone ID.

If the instance resides in more than one zone, the value of this property contains an MAZ part, such as cn-hangzhou-MAZ6(b,f) and cn-hangzhou-MAZ5(b,e,f). You can call the DescribeRegions operation to query the zone ID.

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 type of the database engine.

Valid values:

  • MySQL

  • SQLServer

  • PostgreSQL

  • MariaDB

RefreshOptions

String

No

Yes

The refresh policy for data source resources when the stack is updated.

Valid values:

  • Never (default): does not refresh data source resources when the stack is updated.

  • Always: refreshes data source resources when the stack is updated.

Return values (Fn::GetAtt)

  • ZoneIds: the IDs of the zones.

  • Zones: details of the zones.

Property

Type

Description

Constraint

ZoneIds

List

The IDs of the zones.

None.

Zones

List

Details of the zones.

None.

ZoneId

String

The zone ID.

None.

RegionId

String

The region ID.

None.

SupportedEngines

List

The database engine versions that are available for purchase.

Example:

[ {  "SupportedEngineVersions" : [ {    "Version" : "8.0",    "SupportedCategorys" : [ {      "Category" : "HighAvailability",      "SupportedStorageTypes" : [ {        "StorageType" : "local_ssd"      }, {        "StorageType" : "cloud_ssd"      } ]    }, {      "Category" : "Basic",      "SupportedStorageTypes" : [ {        "StorageType" : "cloud_ssd"      } ]    } ]  } ],  "Engine" : "MySQL"} ]

Examples

{
  "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"
        ]
      }
    }
  }
}
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