DATASOURCE::POLARDB::DBClusters is used to query the information about 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:
|
ResourceGroupId | String | No | Yes | The ID of the resource group. | None. |
DbClusterId | String | No | Yes | The cluster ID. | None. |
Expired | String | No | Yes | Specifies whether the cluster has expired. | Valid values:
|
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:
|
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:
|
LockMode | String | The lock mode of the cluster. | Valid values:
|
DeletionLock | String | Indicates whether the cluster is locked and cannot be deleted. | Valid values:
Note If you set this property to 1, the cluster cannot be deleted. |
DbClusterId | String | The cluster ID. | None. |
VpcId | String | The ID of the virtual private cloud (VPC). | None. |
Description | String | The description of the cluster. | None. |
Tags | List | The tags. | Example:
|
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 | String | The node type. | None. |
Expired | String | Indicates whether the cluster has expired. | Valid values:
Note This property is returned if 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 used storage of the cluster. | Unit: bytes. |
Engine | String | The database engine of the cluster. | None. |
StorageSpace | String | The storage space that uses the subscription billing method. | 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. |
|
PaymentType | String | The billing method. | Valid values:
|
CreateTime | String | The creation time. | 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"
]
}
}
}
}