EMRServerless / Client / list_sessions
list_sessions¶
- EMRServerless.Client.list_sessions(**kwargs)¶
Lists sessions for the specified application. You can filter sessions by state and creation time.
See also: AWS API Documentation
Request Syntax
response = client.list_sessions( applicationId='string', nextToken='string', maxResults=123, states=[ 'SUBMITTED'|'STARTING'|'STARTED'|'IDLE'|'BUSY'|'FAILED'|'TERMINATING'|'TERMINATED', ], createdAtAfter=datetime(2015, 1, 1), createdAtBefore=datetime(2015, 1, 1) )
- Parameters:
applicationId (string) –
[REQUIRED]
The ID of the application to list sessions for.
nextToken (string) – The token for the next set of session results.
maxResults (integer) – The maximum number of sessions to return in each page of results.
states (list) –
An optional filter for session states. Note that if this filter contains multiple states, the resulting list will be grouped by the state.
(string) –
createdAtAfter (datetime) – The lower bound of the option to filter by creation date and time.
createdAtBefore (datetime) – The upper bound of the option to filter by creation date and time.
- Return type:
dict
- Returns:
Response Syntax
{ 'sessions': [ { 'applicationId': 'string', 'sessionId': 'string', 'arn': 'string', 'name': 'string', 'state': 'SUBMITTED'|'STARTING'|'STARTED'|'IDLE'|'BUSY'|'FAILED'|'TERMINATING'|'TERMINATED', 'stateDetails': 'string', 'releaseLabel': 'string', 'executionRoleArn': 'string', 'createdBy': 'string', 'createdAt': datetime(2015, 1, 1), 'updatedAt': datetime(2015, 1, 1) }, ], 'nextToken': 'string' }
Response Structure
(dict) –
sessions (list) –
The output lists information about the specified sessions.
(dict) –
The summary of attributes associated with a session.
applicationId (string) –
The ID of the application that the session belongs to.
sessionId (string) –
The ID of the session.
arn (string) –
The Amazon Resource Name (ARN) of the session.
name (string) –
The optional name of the session.
state (string) –
The state of the session.
stateDetails (string) –
Additional details about the current state of the session.
releaseLabel (string) –
The Amazon EMR release label associated with the session.
executionRoleArn (string) –
The Amazon Resource Name (ARN) of the execution role for the session.
createdBy (string) –
The IAM principal that created the session.
createdAt (datetime) –
The date and time that the session was created.
updatedAt (datetime) –
The date and time that the session was last updated.
nextToken (string) –
The output displays the token for the next set of session results. This is required for pagination and is available as a response of the previous request.
Exceptions
EMRServerless.Client.exceptions.ValidationExceptionEMRServerless.Client.exceptions.InternalServerExceptionEMRServerless.Client.exceptions.ResourceNotFoundException