Amazon EMR Emr Session API
The Emr Session API from Amazon EMR — 3 operation(s) for emr session.
The Emr Session API from Amazon EMR — 3 operation(s) for emr session.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/amazon-emr:amazon-emr-session-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Amazon EMR Session API
version: '2009-03-31'
description: Generated from AWS's published Smithy model for Amazon EMR. 3 operation(s).
contact:
name: Amazon Web Services
url: https://aws.amazon.com/contact-us/
license:
name: Apache 2.0
identifier: Apache-2.0
url: https://github.com/aws/api-models-aws/blob/main/LICENSE
servers:
- url: https://elasticmapreduce.{region}.amazonaws.com
variables:
region:
default: us-east-1
security:
- sigv4: []
tags:
- name: Session
paths:
/#GetSession:
post:
operationId: GetSession
summary: Get Session
description: Returns detailed information about a session.
responses:
'200':
description: Success
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/GetSessionOutput'
'500':
description: InternalServerException
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/InternalServerException'
'400':
description: InvalidRequestException
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/InvalidRequestException'
parameters:
- name: X-Amz-Target
in: header
required: true
schema:
type: string
enum:
- ElasticMapReduce.GetSession
requestBody:
required: true
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/GetSessionInput'
tags:
- Session
/#ListSessions:
post:
operationId: ListSessions
summary: List Sessions
description: Lists the sessions on a cluster. You can filter the results by session state. Newer sessions are returned first.
responses:
'200':
description: Success
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/ListSessionsOutput'
'500':
description: InternalServerException
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/InternalServerException'
'400':
description: InvalidRequestException
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/InvalidRequestException'
parameters:
- name: X-Amz-Target
in: header
required: true
schema:
type: string
enum:
- ElasticMapReduce.ListSessions
requestBody:
required: true
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/ListSessionsInput'
tags:
- Session
/#StartSession:
post:
operationId: StartSession
summary: Start Session
description: Creates and starts a new Spark Connect session on the specified cluster. The cluster must be in the RUNNING or WAITING state and have sessions enabled. This operation is supported in Amazon EMR Spark 8.0.0 and later.
responses:
'200':
description: Success
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/StartSessionOutput'
'500':
description: InternalServerException
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/InternalServerException'
'400':
description: InvalidRequestException
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/InvalidRequestException'
parameters:
- name: X-Amz-Target
in: header
required: true
schema:
type: string
enum:
- ElasticMapReduce.StartSession
requestBody:
required: true
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/StartSessionInput'
tags:
- Session
components:
schemas:
SessionCloudWatchLoggingConfiguration:
type: object
properties:
Enabled:
type: boolean
description: Whether CloudWatch Logs is enabled for the session.
LogGroup:
type: string
description: The name of the log group where session logs are published.
LogStreamNamePrefix:
type: string
description: The prefix applied to the log stream name where session logs are published.
EncryptionKeyArn:
type: string
description: The Amazon Resource Name (ARN) of the KMS key used to encrypt the logs published to CloudWatch Logs.
LogTypes:
type: object
additionalProperties:
type: array
items:
type: string
description: A map of log component names (for example, SPARK_DRIVER, SPARK_EXECUTOR) to the list of log types to publish for that component (for example, stdout, stderr).
StartSessionInput:
type: object
properties:
Name:
type: string
description: An optional name for the session.
ClusterId:
type: string
description: The ID of the cluster on which to start the session.
ExecutionRoleArn:
type: string
description: The execution role ARN for the session. Amazon EMR uses this role to access Amazon Web Services resources on your behalf during session execution.
EngineConfigurations:
type: array
items:
$ref: '#/components/schemas/Configuration'
description: The configuration overrides for the session. Only runtime configuration overrides are supported.
MonitoringConfiguration:
$ref: '#/components/schemas/SessionMonitoringConfiguration'
SessionIdleTimeoutInMinutes:
type: integer
description: The idle timeout, in minutes. If the session is idle for this duration, Amazon EMR EC2 automatically terminates it.
ClientRequestToken:
type: string
description: 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.
Tags:
type: array
items:
$ref: '#/components/schemas/Tag'
description: The tags to assign to the session.
required:
- ClusterId
StartSessionOutput:
type: object
properties:
Id:
type: string
description: The output contains the ID of the session.
ClusterId:
type: string
description: The ID of the cluster that the session was started on.
Arn:
type: string
description: The output contains the ARN of the session.
AccountId:
type: string
description: The Amazon Web Services account ID that owns the session.
State:
type: string
enum:
- SUBMITTED
- STARTING
- STARTED
- IDLE
- BUSY
- TERMINATING
- TERMINATED
- FAILED
description: The state of the session at the time the request returned. When a session is first created, it enters the SUBMITTED state.
required:
- Id
SessionMonitoringConfiguration:
type: object
properties:
CloudWatchLoggingConfiguration:
$ref: '#/components/schemas/SessionCloudWatchLoggingConfiguration'
ManagedLoggingConfiguration:
$ref: '#/components/schemas/SessionManagedLoggingConfiguration'
S3LoggingConfiguration:
$ref: '#/components/schemas/SessionS3LoggingConfiguration'
GetSessionOutput:
type: object
properties:
Session:
$ref: '#/components/schemas/Session'
required:
- Session
GetSessionInput:
type: object
properties:
ClusterId:
type: string
description: The ID of the cluster that the session belongs to.
SessionId:
type: string
description: The ID of the session.
required:
- ClusterId
- SessionId
Session:
type: object
properties:
Id:
type: string
description: The ID of the session.
ClusterId:
type: string
description: The ID of the cluster that the session belongs to.
Name:
type: string
description: The name of the session, if one was provided at creation time.
Arn:
type: string
description: The Amazon Resource Name (ARN) of the session.
State:
type: string
enum:
- SUBMITTED
- STARTING
- STARTED
- IDLE
- BUSY
- TERMINATING
- TERMINATED
- FAILED
description: The current state of the session. Valid values are SUBMITTED, STARTING, STARTED, IDLE, BUSY, TERMINATING, TERMINATED, and FAILED.
StateChangeReason:
type: string
description: A human-readable message describing the most recent state change.
ReleaseLabel:
type: string
description: The Amazon EMR release label of the cluster that the session is running on.
ExecutionRoleArn:
type: string
description: The execution role ARN for the session. Amazon EMR uses this role to access Amazon Web Services resources on your behalf during session execution.
AccountId:
type: string
description: The Amazon Web Services account ID that owns the session.
CreatedAt:
type: string
format: date-time
description: The date and time that the session was created.
UpdatedAt:
type: string
format: date-time
description: The date and time that the session was last updated.
StartedAt:
type: string
format: date-time
description: The date and time that the session entered the STARTED state.
EndedAt:
type: string
format: date-time
description: The date and time that the session was terminated or failed.
IdleSince:
type: string
format: date-time
description: The date and time that the session last entered the IDLE state.
EngineConfigurations:
type: array
items:
$ref: '#/components/schemas/Configuration'
description: The configuration overrides for the session. Only runtime configuration overrides are supported.
MonitoringConfiguration:
$ref: '#/components/schemas/SessionMonitoringConfiguration'
SessionIdleTimeoutInMinutes:
type: integer
description: The idle timeout, in minutes. If the session is idle for this duration, Amazon EMR automatically terminates it.
ServerUrl:
type: string
description: The Spark Connect server URL for the session. Use this URL with the Credentials returned by GetSessionEndpoint to connect directly to the session over VPC peering.
Tags:
type: array
items:
$ref: '#/components/schemas/Tag'
description: The tags associated with the session.
required:
- Id
- ClusterId
- Arn
- State
InternalServerException:
type: object
properties:
Message:
type: string
description: The message associated with the exception.
Configuration:
type: object
properties:
Classification:
type: string
description: The classification within a configuration.
Configurations:
type: array
items:
$ref: '#/components/schemas/Configuration'
description: A list of additional configurations to apply within a configuration object.
Properties:
type: object
additionalProperties:
type: string
description: A set of properties specified within a configuration classification.
SessionS3LoggingConfiguration:
type: object
properties:
Enabled:
type: boolean
description: Whether Amazon S3 logging is enabled for the session.
LogUri:
type: string
description: The Amazon S3 destination URI where session logs are published.
EncryptionKeyArn:
type: string
description: The Amazon Resource Name (ARN) of the KMS key used to encrypt logs published to Amazon S3.
LogTypes:
type: object
additionalProperties:
type: array
items:
type: string
description: A map of log component names (for example, SPARK_DRIVER, SPARK_EXECUTOR) to the list of log types to publish for that component (for example, stdout, stderr).
Tag:
type: object
properties:
Key:
type: string
description: A user-defined key, which is the minimum required information for a valid tag. For more information, see Tag.
Value:
type: string
description: A user-defined value, which is optional in a tag. For more information, see Tag Clusters.
SessionManagedLoggingConfiguration:
type: object
properties:
Enabled:
type: boolean
description: Whether Amazon EMR-managed logging is enabled for the session.
EncryptionKeyArn:
type: string
description: The Amazon Resource Name (ARN) of the KMS key used to encrypt the managed logs.
InvalidRequestException:
type: object
properties:
ErrorCode:
type: string
description: The error code associated with the exception.
Message:
type: string
description: The message associated with the exception.
ListSessionsOutput:
type: object
properties:
Sessions:
type: array
items:
$ref: '#/components/schemas/Session'
description: The sessions that match the request.
NextToken:
type: string
description: The pagination token to use in a subsequent ListSessions call to retrieve the next page of results. This field is absent when there are no more results.
ListSessionsInput:
type: object
properties:
ClusterId:
type: string
description: The ID of the cluster to list sessions for.
SessionStates:
type: array
items:
type: string
enum:
- SUBMITTED
- STARTING
- STARTED
- IDLE
- BUSY
- TERMINATING
- TERMINATED
- FAILED
description: An optional filter that limits the results to sessions in the specified states.
NextToken:
type: string
description: The pagination token returned by a previous ListSessions call. Use it to retrieve the next page of results.
MaxResults:
type: integer
description: The maximum number of sessions to return in each page of results.
required:
- ClusterId
securitySchemes:
sigv4:
type: apiKey
in: header
name: Authorization
description: AWS Signature Version 4. The Authorization header carries an AWS4-HMAC-SHA256 signature over the canonical request, with X-Amz-Date (and X-Amz-Security-Token for temporary credentials). Not a bearer token.
x-aws-sigv4:
signingName: elasticmapreduce
x-provenance:
method: harvested
publisher: Amazon Web Services
source: https://raw.githubusercontent.com/aws/api-models-aws/582e55931c45b944739742a2c1620b6026dd2d13/models/emr/service/2009-03-31/emr-2009-03-31.json
note: converted by smithy-to-openapi.py from AWS's Smithy model (roadmap#1001)