DATASOURCE::POLARDB::GlobalDatabaseNetworks is used to query all global database networks (GDNs) within the current Alibaba Cloud account.
Syntax
{
"Type": "DATASOURCE::POLARDB::GlobalDatabaseNetworks",
"Properties": {
"DbClusterId": String,
"GdnId": String
}
}
Properties
Property | Type | Required | Editable | Description | Constraint |
DbClusterId | String | No | Yes | The ID of the cluster. |
Note You can call the DescribeDBClusters operation to query information about all clusters in a specified region. The information includes cluster IDs. |
GdnId | String | No | Yes | The ID of the GDN. | None. |
Return values
Fn::GetAtt
Property | Type | Description | Constraint |
GdnIds | List | The IDs of the GDNs. | None. |
GlobalDatabaseNetworks | List | Details of the GDNs. | None. |
Status | String | The state of the GDN. | Valid values: creating: The GDN is being created. active: The GDN is running. deleting: The GDN is being deleted. locked: The GDN is locked. If a GDN is locked, you cannot perform operations on a cluster in the GDN. removing_member: The secondary cluster is being removed from the GDN.
|
DbType | String | The type of the database engine. | Only MySQL is supported. |
DbVersion | String | The version of the database engine. | Only version 8.0 is supported. |
DbClusters | List | Details of clusters in the GDN. | Sample value: [ {
"Role" : "primary",
"DBClusterId" : "pc-wz9fb5nn44u1d****",
"RegionId" : "cn-hangzhou"
}, {
"Role" : "standby",
"DBClusterId" : "pc-wz9fb5nn44u1d****",
"RegionId" : "cn-shanghai"
} ]
|
GdnId | String | The ID of the GDN. | None. |
CreateTime | String | The time when the GDN was created. | The time follows the ISO 8601 standard in the YYYY-MM-DDThh:mm:ssZ format. The time is displayed in UTC . |
Examples
YAML
format
ROSTemplateFormatVersion: '2015-09-01'
Parameters: {}
Resources:
ExtensionDataSource:
Type: DATASOURCE::POLARDB::GlobalDatabaseNetworks
Properties:
DbClusterId: pc-**************
GdnId: gdn-****************
Outputs:
GlobalDatabaseNetworks:
Description: The list of global database networks.
Value:
Fn::GetAtt:
- ExtensionDataSource
- GlobalDatabaseNetworks
GdnIds:
Description: The list of gdn IDs.
Value:
Fn::GetAtt:
- ExtensionDataSource
- GdnIds
JSON
format
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
},
"Resources": {
"ExtensionDataSource": {
"Type": "DATASOURCE::POLARDB::GlobalDatabaseNetworks",
"Properties": {
"DbClusterId": "pc-**************",
"GdnId": "gdn-****************"
}
}
},
"Outputs": {
"GlobalDatabaseNetworks": {
"Description": "The list of global database networks.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"GlobalDatabaseNetworks"
]
}
},
"GdnIds": {
"Description": "The list of gdn IDs.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"GdnIds"
]
}
}
}
}