All Products
Search
Document Center

Resource Orchestration Service:DATASOURCE::POLARDB::DBNodeClasses

Last Updated:Dec 06, 2024

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

Syntax

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

Properties

Property

Type

Required

Editable

Description

Constraint

DBVersion

String

No

Yes

The version of the database engine.

Valid values:

  • Valid values when DBType is set to MySQL:

    • 5.6

    • 5.7

    • 8.0

  • Valid value when DBType is set to PostgreSQL: 11

  • Valid value when DBType is set to Oracle: 11

Note

If you specify DBType, you must specify DBVersion.

ZoneId

String

No

Yes

The zone ID.

None.

DBType

String

No

Yes

The type of the database engine.

Valid values:

  • MySQL

  • PostgreSQL

  • Oracle

PayType

String

Yes

Yes

The billing method.

Valid values:

  • Postpaid: pay-as-you-go

  • Prepaid: subscription

DBNodeClass

String

No

Yes

The node type.

For more information about the valid values, see Compute node specifications of PolarDB for MySQL Enterprise Edition.

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)

  • DBNodeClassIds: the node types.

  • DBNodeClasses: details of the node types.

Property

Type

Description

Constraint

DBNodeClassIds

List

The node types.

None.

DBNodeClasses

List

Details of the node types.

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 type.

For more information about the valid values, see Compute node specifications of PolarDB for MySQL Enterprise Edition.

Engine

String

The version of the database engine.

None.

ZoneId

String

The zone ID.

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