EMRServerless / Paginator / ListSessions

ListSessions

class EMRServerless.Paginator.ListSessions
paginator = client.get_paginator('list_sessions')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EMRServerless.Client.list_sessions().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    applicationId='string',
    states=[
        'SUBMITTED'|'STARTING'|'STARTED'|'IDLE'|'BUSY'|'FAILED'|'TERMINATING'|'TERMINATED',
    ],
    createdAtAfter=datetime(2015, 1, 1),
    createdAtBefore=datetime(2015, 1, 1),
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters:
  • applicationId (string) –

    [REQUIRED]

    The ID of the application to list sessions for.

  • 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.

  • PaginationConfig (dict) –

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) –

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) –

      The size of each page.

    • StartingToken (string) –

      A token to specify where to start paginating. This is the NextToken from a previous response.

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) –

      A token to resume pagination.