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:
|
|
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:
|
|
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 |
Whether the cluster is locked against deletion. |
Valid values:
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:
|
|
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 |
Whether the cluster has expired. |
Valid values:
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. |
|
|
PaymentType |
String |
The billing method. |
Valid values:
|
|
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"
]
}
}
}
}