ListSteps - Amazon EMR
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China.

ListSteps

Provides a list of steps for the cluster in reverse order unless you specify stepIds with the request or filter by StepStates. You can specify a maximum of 10 stepIDs. The Amazon CLI automatically paginates results to return a list greater than 50 steps. To return more than 50 steps using the Amazon CLI, specify a Marker, which is a pagination token that indicates the next set of steps to retrieve.

Request Syntax

{ "ClusterId": "string", "Marker": "string", "StepIds": [ "string" ], "StepStates": [ "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.

ClusterId

The identifier of the cluster for which to list the steps.

Type: String

Required: Yes

Marker

The maximum number of steps that a single ListSteps action returns is 50. To return a longer list of steps, use multiple ListSteps actions along with the Marker parameter, which is a pagination token that indicates the next set of results to retrieve.

Type: String

Required: No

StepIds

The filter to limit the step list based on the identifier of the steps. You can specify a maximum of ten Step IDs. The character constraint applies to the overall length of the array.

Type: Array of strings

Length Constraints: Minimum length of 0. Maximum length of 10280.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No

StepStates

The filter to limit the step list based on certain states.

Type: Array of strings

Valid Values: PENDING | CANCEL_PENDING | RUNNING | COMPLETED | CANCELLED | FAILED | INTERRUPTED

Required: No

Response Syntax

{ "Marker": "string", "Steps": [ { "ActionOnFailure": "string", "Config": { "Args": [ "string" ], "Jar": "string", "MainClass": "string", "Properties": { "string" : "string" } }, "Id": "string", "Name": "string", "Status": { "FailureDetails": { "LogFile": "string", "Message": "string", "Reason": "string" }, "State": "string", "StateChangeReason": { "Code": "string", "Message": "string" }, "Timeline": { "CreationDateTime": number, "EndDateTime": number, "StartDateTime": number } } } ] }

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.

Marker

The maximum number of steps that a single ListSteps action returns is 50. To return a longer list of steps, use multiple ListSteps actions along with the Marker parameter, which is a pagination token that indicates the next set of results to retrieve.

Type: String

Steps

The filtered list of steps for the cluster.

Type: Array of StepSummary objects

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 Amazon 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 Amazon SDKs, see the following: