Menu
Amazon Elastic MapReduce
API Reference (API Version 2009-03-31)

ListClusters

Provides the status of all clusters visible to this AWS account. Allows you to filter the list of clusters based on certain criteria; for example, filtering by cluster creation date and time or by status. This call returns a maximum of 50 clusters per call, but returns a marker to track the paging of the cluster list across multiple ListClusters calls.

Request Syntax

{ "ClusterStates": [ "string" ], "CreatedAfter": number, "CreatedBefore": number, "Marker": "string" }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

ClusterStates

The cluster state filters to apply when listing clusters.

Type: Array of strings

Valid Values: STARTING | BOOTSTRAPPING | RUNNING | WAITING | TERMINATING | TERMINATED | TERMINATED_WITH_ERRORS

Required: No

CreatedAfter

The creation date and time beginning value filter for listing clusters.

Type: Timestamp

Required: No

CreatedBefore

The creation date and time end value filter for listing clusters.

Type: Timestamp

Required: No

Marker

The pagination token that indicates the next set of results to retrieve.

Type: String

Required: No

Response Syntax

{ "Clusters": [ { "Id": "string", "Name": "string", "NormalizedInstanceHours": number, "Status": { "State": "string", "StateChangeReason": { "Code": "string", "Message": "string" }, "Timeline": { "CreationDateTime": number, "EndDateTime": number, "ReadyDateTime": number } } } ], "Marker": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

Clusters

The list of clusters for the account based on the given filters.

Type: Array of ClusterSummary objects

Marker

The pagination token that indicates the next set of results to retrieve.

Type: String

Errors

For information about the errors that are common to all actions, see Common Errors.

InternalServerException

This exception occurs when there is an internal failure in the EMR service.

HTTP Status Code: 500

InvalidRequestException

This exception occurs when there is something wrong with user input.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: