All Products
Search
Document Center

E-MapReduce:ListClusters

Last Updated:Apr 19, 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

There is currently no authorization information disclosed in the API.

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.

stringNo

The ID of the cluster.

c-b933c5aac8fe****
ClusterTypesarrayNo

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

stringNo

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.

stringNo

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.

stringNo

A billing method. Valid values:

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

The tags. You can specify a maximum of 20 items.

TagNo

A tag.

Response parameters

ParameterTypeDescriptionExample
object

The returned data.

Clustersarray

The list of clusters.

ClusterSummary

The information about the clusters.

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": ""
    }
  ],
  "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 affectedsee changesets
Change itemChange content
The internal configuration of the API is changed, but the call is not affected.
2023-12-07The internal configuration of the API is changed, but the call is not affectedsee changesets
Change itemChange content
The internal configuration of the API is changed, but the call is not affected.
2023-10-23The internal configuration of the API is changed, but the call is not affectedsee changesets
Change itemChange content
The internal configuration of the API is changed, but the call is not affected.
2023-08-09The internal configuration of the API is changed, but the call is not affectedsee changesets
Change itemChange content
The internal configuration of the API is changed, but the call is not affected.
2023-08-04The internal configuration of the API is changed, but the call is not affectedsee changesets
Change itemChange content
The internal configuration of the API is changed, but the call is not affected.