All Products
Search
Document Center

Resource Orchestration Service:DATASOURCE::POLARDB::DBClusters

Last Updated:Jun 18, 2026

Queries details of PolarDB clusters.

Syntax

{
  "Type": "DATASOURCE::POLARDB::DBClusters",
  "Properties": {
    "Description": String,
    "DbVersion": String,
    "ResourceGroupId": String,
    "DbClusterId": String,
    "Expired": String,
    "DbType": String,
    "RefreshOptions": String
  }
}

Properties

Property

Type

Required

Editable

Description

Constraint

Description

String

No

Yes

The description of the cluster.

None.

DbVersion

String

No

Yes

The version of the database engine.

Valid values:

  • 5.6

  • 5.7

  • 8.0

  • 11

  • 14

ResourceGroupId

String

No

Yes

The ID of the resource group.

None.

DbClusterId

String

No

Yes

The cluster ID.

None.

Expired

String

No

Yes

Whether the cluster has expired.

Valid values:

  • true

  • false

DbType

String

No

Yes

The type of the database engine.

None.

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

  • DbClusterIds: the IDs of the clusters.

  • DBClusters: details of the clusters.

Property

Type

Description

Constraint

DbClusterIds

List

The IDs of the clusters.

None.

DBClusters

List

Details of the clusters.

None.

Category

String

The edition of the cluster.

Valid values:

  • Normal: Cluster Edition

  • Basic: Single Node Edition

  • Archive: X-Engine Edition

  • NormalMultimaster: Multi-master Cluster (Database/Table) Edition

LockMode

String

The lock mode of the cluster.

Valid values:

  • Unlock: The cluster is not locked.

  • ManualLock: The cluster is manually locked.

  • LockByExpiration: The cluster is automatically locked after the cluster expires.

DeletionLock

String

Whether the cluster is locked against deletion.

Valid values:

  • 0: The cluster is not locked and can be deleted.

  • 1: The cluster is locked and cannot be deleted.

Note

A value of 1 prevents the cluster from being deleted.

DbClusterId

String

The cluster ID.

None.

VpcId

String

The VPC ID.

None.

Description

String

The description of the cluster.

None.

Tags

List

The tags.

Example:

[ {
      "Key" : "MySQL",
      "Value" : "5.6"
    } ]

ClusterNetworkType

String

The network type of the cluster.

None.

RegionId

String

The region ID.

None.

ResourceGroupId

String

The ID of the resource group.

None.

DbNodes

List

Details of the nodes.

Example:

[ {
      "DBNodeClass" : "polar.mysql.x4.large",
      "ZoneId" : "cn-hangzhou-i",
      "DBNodeRole" : "Reader",
      "DBNodeId" : "pi-****************",
      "RegionId" : "cn-hangzhou"
    } ]

DbNodeClass

String

The node type.

None.

Expired

String

Whether the cluster has expired.

Valid values:

  • true

  • false

Note

Returned only when PaymentType is set to Prepaid.

Status

String

The status of the cluster.

None.

DbVersion

String

The version of the database engine.

None.

ZoneId

String

The zone ID.

None.

StorageUsed

String

The storage used by the cluster.

Unit: bytes.

Engine

String

The database engine of the cluster.

None.

StorageSpace

String

The subscription storage capacity.

Unit: bytes.

DbType

String

The type of the database engine.

None.

DbNodeNumber

Integer

The number of nodes.

None.

ExpireTime

String

The expiration time of the cluster.

  • A specific value is returned if PaymentType is set to Prepaid.

  • An empty string is returned if PaymentType is set to Postpaid.

PaymentType

String

The billing method.

Valid values:

  • Postpaid: pay-as-you-go

  • Prepaid: subscription

CreateTime

String

The time when the cluster was created.

None.

Examples

ROSTemplateFormatVersion: '2015-09-01'
Parameters: {}
Resources:
  ExtensionDataSource:
    Type: DATASOURCE::POLARDB::DBClusters
    Properties:
      DbVersion: '5.7'
Outputs:
  DbClusterIds:
    Description: The ID of the cluster.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - DbClusterIds
  DBClusters:
    Description: The list of db clusters.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - DBClusters
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
  },
  "Resources": {
    "ExtensionDataSource": {
      "Type": "DATASOURCE::POLARDB::DBClusters",
      "Properties": {
        "DbVersion": "5.7"
      }
    }
  },
  "Outputs": {
    "DbClusterIds": {
      "Description": "The ID of the cluster.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "DbClusterIds"
        ]
      }
    },
    "DBClusters": {
      "Description": "The list of db clusters.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "DBClusters"
        ]
      }
    }
  }
}