DATASOURCE::POLARDB::DBNodeClasses is used to query the available resources of a PolarDB cluster.

Syntax

{
  "Type": "DATASOURCE::POLARDB::DBNodeClasses",
  "Properties": {
    "DBVersion": String,
    "ZoneId": String,
    "DBType": String,
    "PayType": String,
    "DBNodeClass": String
  }
}

Properties

Property Type Required Editable Description Constraint
DBVersion String No Yes The version of the database engine. Valid values:
  • Valid values for the MySQL database engine:
    • 5.6
    • 5.7
    • 8.0
  • Valid value for the PostgreSQL database engine: 11
  • Valid value for the Oracle database engine: 11
Note If you specify the DBType property, you must specify the DBVersion property.
ZoneId String No Yes The ID of the zone. None.
DBType String No Yes The type of the database engine. Valid values:
  • MySQL
  • PostgreSQL
  • Oracle
PayType String Yes Yes The type of the billing method. Valid values:
  • Postpaid: pay-as-you-go
  • Prepaid: subscription
DBNodeClass String No Yes The node specifications. For more information about the supported node specifications, see Specifications of compute nodes.

Return values (Fn::GetAtt)

  • DBNodeClassIds: the list of node specifications.
  • DBNodeClasses: details of the node specifications.
Property Type Description Constraint
DBNodeClassIds List The list of the node specifications. None.
DBNodeClasses List Details of the node specifications. None.
Category String The edition of the cluster. Valid values:
  • Normal: Cluster Edition
  • Basic: Single Node Edition
  • Archive: Archive Database Edition
DBNodeClass String The node specifications. For more information about the supported node specifications, see Specifications of compute nodes.
Engine String The version of the database engine. None.
ZoneId String The ID of the zone. None.

Examples

JSON format

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Resources": {
    "POLARDB": {
      "Type": "DATASOURCE::POLARDB::DBNodeClasses",
      "Properties": {
        "PayType": "Postpaid",
        "DBNodeClass": "polar.mysql.x4.large"
      }
    }
  },
  "Outputs": {
    "DBNodeClassIds": {
      "Value": {
        "Fn::GetAtt": [
          "POLARDB",
          "DBNodeClassIds"
        ]
      }
    },
    "DBNodeClasses": {
      "Value": {
        "Fn::GetAtt": [
          "POLARDB",
          "DBNodeClasses"
        ]
      }
    }
  }
}