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 | 否 | 是 | 当资源栈更新时,数据源资源的刷新策略。 | 取值: 
 | 
返回值
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
        - DedicatedHostClusterIdsJSON格式
{
  "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"
        ]
      }
    }
  }
}该文章对您有帮助吗?