All Products
Search
Document Center

E-MapReduce:ListClusters

Last Updated:Sep 24, 2024

Queries E-MapReduce (EMR) clusters.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
emr:ListClusterslist
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID.

Valid values:

  • cn-qingdao
  • cn-beijing
  • cn-zhangjiakou
  • cn-huhehaote
  • cn-hangzhou
  • cn-shanghai
  • cn-shenzhen
  • cn-chengdu
  • cn-hongkong
  • cn-wulanchabu
  • cn-heyuan-acdr-1
  • cn-qingdao-acdr-ut-1
  • ap-northeast-1
  • ap-southeast-1
  • ap-southeast-2
  • ap-southeast-3
  • ap-southeast-5
  • ap-south-1
  • us-east-1
  • us-west-1
  • me-east-1
  • me-central-1
  • eu-central-1
  • eu-west-1
  • cn-north-2-gov-1
cn-hangzhou
NextTokenstringNo

The starting point of the current query. If you do not configure this parameter, the query starts from the beginning.

eyJlY21OZXh0VG9rZW4iOiIxIiwidGFpaGFvTmV4dFRva2VuIjoiNTYiLCJ0YWloYW9OZXh0VG9rZW5JbnQiOjU2LCJlY21OZXh0VG9rZW5JbnQiOjF9
MaxResultsintegerNo

The number of entries to return on each page. Valid values: 1 to 100.

20
ClusterNamestringNo

The name of the cluster.

emrtest
ResourceGroupIdstringNo

The ID of the resource group.

rg-acfmzabjyop****
ClusterIdsarrayNo

The IDs of the clusters. You can specify a maximum of 100 items.

StringstringNo

The ID of the cluster.

c-b933c5aac8fe****
ClusterTypesarrayNo

The types of the clusters. You can specify a maximum of 100 items.

StringstringNo

The type of a cluster. Valid values:

  • DATALAKE: DataLake cluster in the new data lake scenario
  • OLAP: online analytical processing cluster
  • DATAFLOW: Dataflow cluster
  • DATASERVING: DataServing cluster
  • CUSTOM: custom hybrid cluster
  • HADOOP: Hadoop cluster in the old data lake scenario
DATALAKE
ClusterStatesarrayNo

The states of clusters. You can specify a maximum of 100 items.

StringstringNo

The state of a cluster. Valid values:

  • STARTING: The cluster is being started.
  • START_FAILED: The cluster fails 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 an exception.
  • TERMINATE_FAILED: The cluster fails to be terminated.
RUNNING
PaymentTypesarrayNo

The billing methods. You can specify a maximum of 2 items.

PaymentTypestringNo

A billing method. Valid values:

  • PayAsYouGo: pay-as-you-go
  • Subscription: subscription
PayAsYouGo
TagsarrayNo

The tags. Number of elements in the array: 1 to 20.

TagTagNo

The tag.

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

Clustersarray

The clusters.

ClusterClusterSummary

The cluster.

RequestIdstring

The ID of the request.

9E3A7161-EB7B-172B-8D18-FFB06BA3896A
NextTokenstring

The page number of the next page returned.

eyJlY21OZXh0VG9rZW4iOiIxIiwidGFpaGFvTmV4dFRva2VuIjoiNTYiLCJ0YWloYW9OZXh0VG9rZW5JbnQiOjU2LCJlY21OZXh0VG9rZW5JbnQiOjF9
MaxResultsinteger

The number of entries returned per page.

20
TotalCountinteger

The total number of pages.

1000

Examples

Sample success responses

JSONformat

{
  "Clusters": [
    {
      "ClusterId": "c-b933c5aac8fe****",
      "ClusterName": "emrtest",
      "ClusterType": "DATALAKE",
      "ClusterState": "RUNNING",
      "PaymentType": "PayAsYouGo",
      "CreateTime": 1592837465788,
      "ReadyTime": 1592837465788,
      "ExpireTime": 1592837475788,
      "EndTime": 1592837485788,
      "ReleaseVersion": "EMR-5.8.0",
      "ResourceGroupId": "rg-acfmzabjyop****",
      "StateChangeReason": {
        "Code": "OutOfStock",
        "Message": "The requested resource is sold out in the specified zone, try other types of resources or other regions and zones."
      },
      "Tags": [
        {
          "Key": "department",
          "Value": "IT"
        }
      ],
      "EmrDefaultRole": "",
      "Description": ""
    }
  ],
  "RequestId": "9E3A7161-EB7B-172B-8D18-FFB06BA3896A",
  "NextToken": "eyJlY21OZXh0VG9rZW4iOiIxIiwidGFpaGFvTmV4dFRva2VuIjoiNTYiLCJ0YWloYW9OZXh0VG9rZW5JbnQiOjU2LCJlY21OZXh0VG9rZW5JbnQiOjF9",
  "MaxResults": 20,
  "TotalCount": 1000
}

Error codes

HTTP status codeError codeError message
400ConflictParametersParameters that must not be used together. %s
400IncompleteSignatureThe request signature is invalid.
400InvalidActionThe action %s requested is invalid.
400InvalidParameterThe specified parameter %s is not valid.
400InvalidParameterValueThe input parameter %s is invalid or out of range.
400MissingActionThe action %s requested is missing.
400MissingParameterThe input parameter %s that is mandatory for processing this request is not supplied.
400NotAuthorizedYou do not have permission to perform this action. %s
400ThrottlingExceptionThe request was denied due to request throttling. %s
404ResourceNotFoundThe resource not found by %s.
500InternalErrorThe request processing has failed due to some unknown error, exception or failure.
503ServiceFailureThe request has failed due to a temporary failure of %s service.
503ServiceUnavailableThe request has failed due to a temporary failure of the server.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-12-12The internal configuration of the API is changed, but the call is not affectedView Change Details
2023-12-07The internal configuration of the API is changed, but the call is not affectedView Change Details
2023-10-23The internal configuration of the API is changed, but the call is not affectedView Change Details
2023-08-09The internal configuration of the API is changed, but the call is not affectedView Change Details
2023-08-04The internal configuration of the API is changed, but the call is not affectedView Change Details