DATASOURCE::ClickHouse::EnterpriseDBClusters

更新时间:
复制 MD 格式

DATASOURCE::ClickHouse::EnterpriseDBClusters类型用于查询集群列表。

语法

{
  "Type": "DATASOURCE::ClickHouse::EnterpriseDBClusters",
  "Properties": {
    "ResourceGroupId": String,
    "RefreshOptions": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

RefreshOptions

String

当资源栈更新时,数据源资源的刷新策略。

取值:

  • Never(默认值):更新堆栈时,从不刷新数据源资源。

  • Always:更新堆栈时,始终刷新数据源资源。

ResourceGroupId

String

资源组ID。

返回值

Fn::GetAtt

  • EnterpriseDBClusters:企业版数据库集群列表。

  • DBInstanceIds:数据库实例ID列表。

属性名称

类型

描述

约束

DBInstanceIds

List

数据库实例ID列表。

EnterpriseDBClusters

List

企业版数据库集群列表。

ResourceGroupId

String

资源组 ID。

DBInstanceId

String

集群 ID。

CreateTime

String

集群的创建时间。

Tags

List

集群 绑定的标签组。

示例

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  ResourceGroupId:
    Type: String
    Description:
      en: The ID of the resource group.
    AssociationProperty: ALIYUN::ECS::ResourceGroup::ResourceGroupId
    Default: Null
    Required: false
  RefreshOptions:
    Type: String
    Description:
      en: |-
        The refresh strategy for the datasource resource when the stack is updated. Valid values:
        - Never: Never refresh the datasource resource when the stack is updated.
        - Always: Always refresh the datasource resource when the stack is updated.
        Default is Never.
    AllowedValues:
      - Always
      - Never
    Default: Never
    Required: false
Resources:
  ExtensionDataSource:
    Type: DATASOURCE::ClickHouse::EnterpriseDBClusters
    Properties:
      ResourceGroupId:
        Ref: ResourceGroupId
      RefreshOptions:
        Ref: RefreshOptions
Outputs:
  EnterpriseDBClusters:
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - EnterpriseDBClusters
    Description: The list of enterprise DB clusters.
  DBInstanceIds:
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - DBInstanceIds
    Description: The list of DB instance IDs.
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "ResourceGroupId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the resource group."
      },
      "AssociationProperty": "ALIYUN::ECS::ResourceGroup::ResourceGroupId",
      "Default": null,
      "Required": false
    },
    "RefreshOptions": {
      "Type": "String",
      "Description": {
        "en": "The refresh strategy for the datasource resource when the stack is updated. Valid values:\n- Never: Never refresh the datasource resource when the stack is updated.\n- Always: Always refresh the datasource resource when the stack is updated.\nDefault is Never."
      },
      "AllowedValues": [
        "Always",
        "Never"
      ],
      "Default": "Never",
      "Required": false
    }
  },
  "Resources": {
    "ExtensionDataSource": {
      "Type": "DATASOURCE::ClickHouse::EnterpriseDBClusters",
      "Properties": {
        "ResourceGroupId": {
          "Ref": "ResourceGroupId"
        },
        "RefreshOptions": {
          "Ref": "RefreshOptions"
        }
      }
    }
  },
  "Outputs": {
    "EnterpriseDBClusters": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "EnterpriseDBClusters"
        ]
      },
      "Description": "The list of enterprise DB clusters."
    },
    "DBInstanceIds": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "DBInstanceIds"
        ]
      },
      "Description": "The list of DB instance IDs."
    }
  }
}