All Products
Search
Document Center

Resource Orchestration Service:DATASOURCE::POLARDB::GlobalDatabaseNetwork

更新時間:Oct 14, 2024

DATASOURCE::POLARDB::GlobalDatabaseNetwork is used to query the details of a Global Database Network (GDN) within the current Alibaba Cloud account.

Syntax

{
  "Type": "DATASOURCE::POLARDB::GlobalDatabaseNetwork",
  "Properties": {
    "GdnId": String,
    "RefreshOptions": String
  }
}

Properties

Property

Type

Required

Editable

Description

Constraint

GdnId

String

Yes

Yes

The ID of the GDN.

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

  • Connections: the information about the connection to the cluster.

  • DbClusters: the clusters included in the GDN.

  • DbVersion: the version of the database engine.

  • CreateTime: the time when the GDN was created.

  • GdnId: the ID of the GDN.

  • DbType: the type of the database engine.

  • GdnDescription: the description of the GDN.

Examples

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  GdnId:
    Type: String
    Description:
      en: The ID of the GDN.
    Required: true
Resources:
  ExtensionDataSource:
    Type: DATASOURCE::POLARDB::GlobalDatabaseNetwork
    Properties:
      GdnId:
        Ref: GdnId
Outputs:
  Connections:
    Description: The information about the connection to the cluster.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - Connections
  DbClusters:
    Description: The clusters that are included in the GDN.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - DbClusters
  DbVersion:
    Description: The version of the database engine. Only version 8.0 is supported.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - DbVersion
  CreateTime:
    Description: The time at which the GDN was created.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - CreateTime
  GdnId:
    Description: The ID of the GDN.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - GdnId
  DbType:
    Description: The type of the database engine. Only MySQL is supported.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - DbType
  GdnDescription:
    Description: |-
      The description of the GDN. The description must meet the following requirements:
      It cannot start with http:// or https://.
      It must start with a letter.
      It can contain letters, digits, underscores (_), and hyphens (-).
      It must be 2 to 126 characters in length.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - GdnDescription
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "GdnId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the GDN."
      },
      "Required": true
    }
  },
  "Resources": {
    "ExtensionDataSource": {
      "Type": "DATASOURCE::POLARDB::GlobalDatabaseNetwork",
      "Properties": {
        "GdnId": {
          "Ref": "GdnId"
        }
      }
    }
  },
  "Outputs": {
    "Connections": {
      "Description": "The information about the connection to the cluster.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Connections"
        ]
      }
    },
    "DbClusters": {
      "Description": "The clusters that are included in the GDN.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "DbClusters"
        ]
      }
    },
    "DbVersion": {
      "Description": "The version of the database engine. Only version 8.0 is supported.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "DbVersion"
        ]
      }
    },
    "CreateTime": {
      "Description": "The time at which the GDN was created.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "CreateTime"
        ]
      }
    },
    "GdnId": {
      "Description": "The ID of the GDN.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "GdnId"
        ]
      }
    },
    "DbType": {
      "Description": "The type of the database engine. Only MySQL is supported.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "DbType"
        ]
      }
    },
    "GdnDescription": {
      "Description": "The description of the GDN. The description must meet the following requirements:\nIt cannot start with http:// or https://.\nIt must start with a letter.\nIt can contain letters, digits, underscores (_), and hyphens (-).\nIt must be 2 to 126 characters in length.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "GdnDescription"
        ]
      }
    }
  }
}