SignInService / Paginator / ListSessions
ListSessions¶
- class SignInService.Paginator.ListSessions¶
paginator = client.get_paginator('list_sessions')
- paginate(**kwargs)¶
Creates an iterator that will paginate through responses from
SignInService.Client.list_sessions().See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate( principalArn='string', status='ACTIVE'|'REVOKED', clientId='string', issuedAfter=123, issuedBefore=123, PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } )
- Parameters:
principalArn (string) – The identity whose sessions to list. Omit to list the caller’s own sessions. Specify arn:aws:iam::{account-id}:* to list all sessions in the account.
status (string) – Returns only sessions with this status
clientId (string) – Returns only sessions created by this OAuth client
issuedAfter (integer) – Returns only sessions created at or after this time, in Unix epoch seconds
issuedBefore (integer) – Returns only sessions created before this time, in Unix epoch seconds
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
NextTokenwill 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
NextTokenfrom a previous response.
- Return type:
dict
- Returns:
Response Syntax
{ 'items': [ { 'sessionArn': 'string', 'principalArn': 'string', 'role': 'string', 'status': 'ACTIVE'|'REVOKED', 'issuedAt': 123, 'expiresAt': 123, 'clientId': 'string', 'clientType': 'CLI'|'MCP', 'resource': 'string' }, ], 'NextToken': 'string' }
Response Structure
(dict) –
Output for ListSessions operation
items (list) –
List of session summaries
(dict) –
Summary of a sign-in session
sessionArn (string) –
The session ARN
principalArn (string) –
The IAM identity that owns the session
role (string) –
The IAM role for the session, when the owner is a role
status (string) –
The session status
issuedAt (integer) –
The time the session was created, in Unix epoch seconds
expiresAt (integer) –
The time the session expires, in Unix epoch seconds
clientId (string) –
The OAuth client that created the session
clientType (string) –
The type of OAuth client that created the session
resource (string) –
The resource that the session’s tokens are bound to
NextToken (string) –
A token to resume pagination.