DATASOURCE::EMR::Cluster2类型用于查询EMR集群。
语法
{
  "Type": "DATASOURCE::EMR::Cluster2",
  "Properties": {
    "PaymentTypes": List,
    "ResourceGroupId": String,
    "ClusterName": String,
    "ClusterType": List,
    "ClusterIds": List,
    "Tags": List,
    "ClusterStates": List,
    "RefreshOptions": String
  }
}属性
| 属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 | 
| PaymentTypes | List | 否 | 是 | 付费类型。 | 取值: 
 | 
| ResourceGroupId | String | 否 | 是 | 资源组ID。 | 无 | 
| ClusterName | String | 否 | 是 | 集群名 /称。 | 长度为1~128个字符,必须以大小写字母或中文开头,不能以 | 
| ClusterType | List | 否 | 是 | 集群类型。 | 取值: 
 | 
| ClusterIds | List | 否 | 是 | 集群ID列表。 | 无 | 
| Tags | List | 否 | 是 | 标签。 | 最多添加5个自定义标签。 更多信息,请参见Tags属性。 | 
| ClusterStates | List | 否 | 是 | 集群状态列表。 | 取值范围: 
 | 
| RefreshOptions | String | 否 | 是 | 当资源栈更新时,数据源资源的刷新策略。 | 有效值: 
 | 
Tags语法
"Tags": [
  {
    "Value": String,
    "Key": String
  }
]Tags属性
| 属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 | 
| Value | String | 否 | 否 | 标签值。 | 非必填,可以为空字符串。最多支持128个字符,不能以 | 
| Key | String | 是 | 否 | 标签键。 | 必填参数,不允许为空字符串。最多支持128个字符,不能以 | 
返回值
Fn::GetAtt
- Clusters:集群列表。 
- ClusterIds:集群ID列表。 
| 属性名称 | 类型 | 描述 | 约束 | 
| ClusterIds | List | 集群ID列表。 | 无 | 
| Clusters | List | 集群列表。 | 无 | 
| DeployMode | String | 集群中的应用部署模式。 | 无 | 
| FlowProjectName | String | 项目名称。 | 无 | 
| VpcId | String | VPC ID。 | 无 | 
| ClusterState | String | 集群状态。 | 无 | 
| EmrDefaultRole | String | EMR服务角色。 | 无 | 
| ReadyTime | String | 可用时间。 | 无 | 
| CreateTime | String | 创建时间。 | 无 | 
| UserId | String | 用户ID。 | 无 | 
| Status | String | 集群状态。 | 无 | 
| StateChangeReason | String | 失败原因。 | 无 | 
| Description | String | 集群描述。 | 无 | 
| ClusterName | String | 集群名称。 | 无 | 
| LogCollectStrategy | String | 日志收集策略。 | 无 | 
| FlowProjectId | String | 项目ID。 | 无 | 
| GmtModified | String | 修改时间。 | 无 | 
| SecurityMode | String | 集群Kerberos安全模式。 | 无 | 
| PaymentType | String | 付费类型。 | 无 | 
| ReleaseVersion | String | EMR发行版。 | 无 | 
| NodeAttributes | String | 节点属性。 | 无 | 
| ClusterType | String | 集群类型。 | 无 | 
| SubscriptionConfig | String | 预付费配置。 | 无 | 
| ResourceGroupId | String | 资源组ID。 | 无 | 
示例
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  ClusterName:
    Type: String
    Description:
      en: The name of cluster.
Resources:
  ExtensionDataSource:
    Type: DATASOURCE::EMR::Cluster2
    Properties:
      ClusterName:
        Ref: ClusterName
Outputs:
  Clusters:
    Description: The detail of the cluster.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - Clusters
  ClusterIds:
    Description: The list of the cluster id.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - ClusterIds
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "ClusterName": {
      "Type": "String",
      "Description": {
        "en": "The name of cluster."
      }
    }
  },
  "Resources": {
    "ExtensionDataSource": {
      "Type": "DATASOURCE::EMR::Cluster2",
      "Properties": {
        "ClusterName": {
          "Ref": "ClusterName"
        }
      }
    }
  },
  "Outputs": {
    "Clusters": {
      "Description": "The detail of the cluster.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Clusters"
        ]
      }
    },
    "ClusterIds": {
      "Description": "The list of the cluster id.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "ClusterIds"
        ]
      }
    }
  }
}