All Products
Search
Document Center

Resource Orchestration Service:DATASOURCE::POLARDB::GlobalDatabaseNetworks

Last Updated:Dec 06, 2024

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,
    "RefreshOptions": String
  }
}

Properties

Property

Type

Required

Editable

Description

Constraint

DbClusterId

String

No

Yes

The cluster ID.

Note

You can call the DescribeDBClusters operation to query the information about all PolarDB clusters in the specified region, such as the cluster IDs.

GdnId

String

No

Yes

The GDN ID.

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

  • GlobalDatabaseNetworks: details of the GDNs.

  • GdnIds: the IDs of the GDNs.

Property

Type

Description

Constraint

GdnIds

List

The IDs of the GDNs.

None.

GlobalDatabaseNetworks

List

Details of the GDNs.

None.

Status

String

The status 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 each cluster in the GDN.

Example:

[ {
      "Role" : "primary",
      "DBClusterId" : "pc-wz9fb5nn44u1d****",
      "RegionId" : "cn-hangzhou"
    }, {
      "Role" : "standby",
      "DBClusterId" : "pc-wz9fb5nn44u1d****",
      "RegionId" : "cn-shanghai"
    } ]

GdnId

String

The GDN ID.

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

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