全部产品
Search
文档中心

资源编排:DATASOURCE::EMR::Cluster2

更新时间:Jan 21, 2025

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

否

是

付费类型。

取值:

  • PayAsYouGo:后付费。

  • Subscription:预付费。

ResourceGroupId

String

否

是

资源组ID。

无

ClusterName

String

否

是

集群名 /称。

长度为1~128个字符,必须以大小写字母或中文开头,不能以http://和https://开头。可以包含中文、英文、数字、半角冒号(:)、下划线(_)、半角句号(.)或者短划线(-)。

ClusterType

List

否

是

集群类型。

取值:

  • DATALAKE:新版数据湖。

  • OLAP:数据分析。

  • DATAFLOW:实时数据流。

  • DATASERVING:数据服务。

ClusterIds

List

否

是

集群ID列表。

无

Tags

List

否

是

标签。

最多添加5个自定义标签。

更多信息,请参见Tags属性。

ClusterStates

List

否

是

集群状态列表。

取值范围:

  • STARTING:启动中。

  • START_FAILED:启动失败。

  • BOOTSTRAPPING:引导操作初始化。

  • RUNNING:运行中。

  • TERMINATING:终止中。

  • TERMINATED:已终止。

  • TERMINATED_WITH_ERRORS:发生异常导致终止

  • TERMINATE_FAILED:终止失败。

RefreshOptions

String

否

是

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

有效值:

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

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

Tags语法

"Tags": [
  {
    "Value": String,
    "Key": String
  }
]

Tags属性

属性名称

类型

必须

允许更新

描述

约束

Value

String

否

否

标签值。

非必填,可以为空字符串。最多支持128个字符,不能以acs:开头,不能包含http://或者https://。

Key

String

是

否

标签键。

必填参数,不允许为空字符串。最多支持128个字符,不能以aliyun和acs:开头,不能包含http://或https://。

返回值

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"
        ]
      }
    }
  }
}