全部产品
Search
文档中心

资源编排:DATASOURCE::ECS::DedicatedHostClusters

更新时间:Oct 09, 2024

DATASOURCE::ECS::DedicatedHostClusters类型用于查询专有宿主机集群的列表信息。

语法

{
  "Type": "DATASOURCE::ECS::DedicatedHostClusters",
  "Properties": {
    "DedicatedHostClusterName": String,
    "ResourceGroupId": String,
    "ZoneId": String,
    "RefreshOptions": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

DedicatedHostClusterName

String

专有宿主机集群名称。

ResourceGroupId

String

专有宿主机集群的资源组ID。

ZoneId

String

专有宿主机集群所在的可用区ID。

RefreshOptions

String

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

取值:

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

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

返回值

Fn::GetAtt

  • DedicatedHostClusters:专有宿主机集群的详情列表

  • DedicatedHostClusterIds:专有宿主机集群的ID列表

属性名称

类型

描述

约束

DedicatedHostClusterIds

List

专有宿主机集群的ID列表

DedicatedHostClusters

List

专有宿主机集群的详情列表

Description

String

专有宿主机集群描述。

Tags

String

专有宿主机集群的标签。

ZoneId

String

专有宿主机集群所在的可用区ID。

DedicatedHostClusterName

String

专有宿主机集群名称。

ResourceGroupId

String

专有宿主机集群的资源组ID。

DedicatedHostClusterId

String

专有宿主机集群ID。

示例

YAML格式

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  ZoneId:
    Type: String
    AssociationProperty: ALIYUN::ECS::Instance::ZoneId
    Description: |-
      The zone ID of the dedicated host cluster. 
      You can call the DescribeZones operation to query the most recent zone list.
Resources:
  ExtensionDataSource:
    Type: DATASOURCE::ECS::DedicatedHostClusters
    Properties:
      ZoneId:
        Ref: ZoneId
Outputs:
  DedicatedHostClusters:
    Description: The list of dedicated host clusters.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - DedicatedHostClusters
  DedicatedHostClusterIds:
    Description: The list of dedicated host cluster IDs.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - DedicatedHostClusterIds

JSON格式

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "ZoneId": {
      "Type": "String",
      "AssociationProperty": "ALIYUN::ECS::Instance::ZoneId",
      "Description": "The zone ID of the dedicated host cluster. \nYou can call the DescribeZones operation to query the most recent zone list."
    }
  },
  "Resources": {
    "ExtensionDataSource": {
      "Type": "DATASOURCE::ECS::DedicatedHostClusters",
      "Properties": {
        "ZoneId": {
          "Ref": "ZoneId"
        }
      }
    }
  },
  "Outputs": {
    "DedicatedHostClusters": {
      "Description": "The list of dedicated host clusters.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "DedicatedHostClusters"
        ]
      }
    },
    "DedicatedHostClusterIds": {
      "Description": "The list of dedicated host cluster IDs.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "DedicatedHostClusterIds"
        ]
      }
    }
  }
}