ListInstances - Amazon EMR

ListInstances

Provides information for all active Amazon EC2 instances and Amazon EC2 instances terminated in the last 30 days, up to a maximum of 2,000. Amazon EC2 instances in any of the following states are considered active: AWAITING_FULFILLMENT, PROVISIONING, BOOTSTRAPPING, RUNNING.

Request Syntax

{ "ClusterId": "string", "InstanceFleetId": "string", "InstanceFleetType": "string", "InstanceGroupId": "string", "InstanceGroupTypes": [ "string" ], "InstanceStates": [ "string" ], "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.

ClusterId

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

Type: String

Required: Yes

InstanceFleetId

The unique identifier of the instance fleet.

Type: String

Required: No

InstanceFleetType

The node type of the instance fleet. For example MASTER, CORE, or TASK.

Type: String

Valid Values: MASTER | CORE | TASK

Required: No

InstanceGroupId

The identifier of the instance group for which to list the instances.

Type: String

Required: No

InstanceGroupTypes

The type of instance group for which to list the instances.

Type: Array of strings

Valid Values: MASTER | CORE | TASK

Required: No

InstanceStates

A list of instance states that will filter the instances returned with this request.

Type: Array of strings

Valid Values: AWAITING_FULFILLMENT | PROVISIONING | BOOTSTRAPPING | RUNNING | TERMINATED

Required: No

Marker

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

Type: String

Required: No

Response Syntax

{ "Instances": [ { "EbsVolumes": [ { "Device": "string", "VolumeId": "string" } ], "Ec2InstanceId": "string", "Id": "string", "InstanceFleetId": "string", "InstanceGroupId": "string", "InstanceType": "string", "Market": "string", "PrivateDnsName": "string", "PrivateIpAddress": "string", "PublicDnsName": "string", "PublicIpAddress": "string", "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.

Instances

The list of instances for the cluster and given filters.

Type: Array of Instance 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 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 AWS SDKs, see the following: