All Products
Search
Document Center

Resource Orchestration Service:DATASOURCE::EMR::Cluster2

Last Updated:Nov 21, 2024

DATASOURCE::EMR::Cluster2 is used to query E-MapReduce (EMR) clusters.

Syntax

{
  "Type": "DATASOURCE::EMR::Cluster2",
  "Properties": {
    "PaymentTypes": List,
    "ResourceGroupId": String,
    "ClusterName": String,
    "ClusterType": List,
    "ClusterIds": List,
    "Tags": List,
    "ClusterStates": List,
    "RefreshOptions": String
  }
}

Properties

Property

Type

Required

Editable

Description

Constraint

PaymentTypes

List

No

Yes

The billing methods.

Valid values:

  • PayAsYouGo

  • Subscription

ResourceGroupId

String

No

Yes

The ID of the resource group.

None.

ClusterName

String

No

Yes

The cluster name.

The name must be 1 to 128 characters in length. It must start with a letter and cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), periods (.), and hyphens (-).

ClusterType

List

No

Yes

The cluster type.

Valid values:

  • DATALAKE

  • OLAP

  • DATAFLOW

  • DATASERVING

ClusterIds

List

No

Yes

The IDs of the clusters.

None.

Tags

List

No

Yes

The custom tags.

You can add up to five custom tags.

For more information, see Tags properties.

ClusterStates

List

No

Yes

The states of the cluster.

Valid values:

  • STARTING: The cluster is being started.

  • START_FAILED: The cluster failed to be started.

  • BOOTSTRAPPING: The bootstrap action is being performed on the cluster.

  • RUNNING: The cluster is running.

  • TERMINATING: The cluster is being terminated.

  • TERMINATED: The cluster is terminated.

  • TERMINATED_WITH_ERRORS: The cluster is terminated due to exceptions.

  • TERMINATE_FAILED: The cluster failed to be terminated.

RefreshOptions

String

No

Yes

The refresh policy for data source resources when the stack is updated.

Valid values:

  • Never (default): does not refresh data source resources when the stack is updated.

  • Always: refreshes data source resources when the stack is updated.

Tags syntax

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

Tags properties

Property

Type

Required

Editable

Description

Constraint

Value

String

No

No

The tag value.

The tag value is optional and can be an empty string. It can be up to 128 characters in length. It cannot start with acs: and cannot contain http:// or https://.

Key

String

Yes

No

The tag key.

The tag key is required and cannot be an empty string. It can be up to 128 characters in length. It cannot start with aliyun or acs: and cannot contain http:// or https://.

Return values

Fn::GetAtt

  • Clusters: details of the clusters.

  • ClusterIds: the IDs of the clusters.

Property

Type

Description

Constraint

ClusterIds

List

The IDs of the clusters.

None.

Clusters

List

Details of the clusters.

None.

DeployMode

String

The deployment mode of applications in the cluster.

None.

FlowProjectName

String

The project name.

None.

VpcId

String

The ID of the virtual private cloud (VPC).

None.

ClusterState

String

The state of the cluster.

None.

EmrDefaultRole

String

The EMR service role.

None.

ReadyTime

String

The time when the cluster is available.

None.

CreateTime

String

The time when the cluster was created.

None.

UserId

String

The user ID.

None.

Status

String

The state of the cluster.

None.

StateChangeReason

String

The reason for the failure.

None.

Description

String

The description of the cluster.

None.

ClusterName

String

The cluster name.

None.

LogCollectStrategy

String

The policy based on which logs are collected.

None.

FlowProjectId

String

The project ID.

None.

GmtModified

String

The time when the cluster was modified.

None.

SecurityMode

String

The Kerberos security mode of the cluster.

None.

PaymentType

String

The billing method.

None.

ReleaseVersion

String

The EMR version.

None.

NodeAttributes

String

The node attributes.

None.

ClusterType

String

The cluster type.

None.

SubscriptionConfig

String

The subscription configurations.

None.

ResourceGroupId

String

The ID of the resource group.

None.

Examples

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