v1

latestOpenAPI 3.0.0Apache 2.0 License2026-07-1465378349.0 KB

Creates and starts a new Spark Connect session on the specified cluster. The cluster must be in the <code>RUNNING</code> or <code>WAITING</code> state and have sessions enabled. This operation is supported in Amazon EMR Spark 8.0.0 and later.

post/#X-Amz-Target=ElasticMapReduce.StartSession

Headers

X-Amz-Target'ElasticMapReduce.StartSession' required

Request body

Namestring

An optional name for the session.

ClusterIdstring required

The ID of the cluster on which to start the session.

ExecutionRoleArnstring

The execution role ARN for the session. Amazon EMR uses this role to access Amazon Web Services resources on your behalf during session execution.

SessionIdleTimeoutInMinutesinteger

The idle timeout, in minutes. If the session is idle for this duration, Amazon EMR EC2 automatically terminates it.

ClientRequestTokenstring

A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you retry a request that completed successfully using the same client request token, the service returns the original response without performing the operation again.

Response

Success

Idstring required

The output contains the ID of the session.

ClusterIdstring

The ID of the cluster that the session was started on.

Arnstring

The output contains the ARN of the session.

AccountIdstring

The Amazon Web Services account ID that owns the session.

State'SUBMITTED' | 'STARTING' | 'STARTED' | 'IDLE' | 'BUSY' | 'TERMINATING' | 'TERMINATED' | 'FAILED'

The state of the session at the time the request returned. When a session is first created, it enters the <code>SUBMITTED</code> state.