MultipartyApproval / Client / list_sessions
list_sessions¶
- MultipartyApproval.Client.list_sessions(**kwargs)¶
Returns a list of approval sessions. For more information, see Session in the Multi-party approval User Guide.
See also: AWS API Documentation
Request Syntax
response = client.list_sessions( ApprovalTeamArn='string', MaxResults=123, NextToken='string', Filters=[ { 'FieldName': 'ActionName'|'ApprovalTeamName'|'VotingTime'|'Vote'|'SessionStatus'|'InitiationTime', 'Operator': 'EQ'|'NE'|'GT'|'LT'|'GTE'|'LTE'|'CONTAINS'|'NOT_CONTAINS'|'BETWEEN', 'Value': 'string' }, ] )
- Parameters:
ApprovalTeamArn (string) –
[REQUIRED]
Amazon Resource Name (ARN) for the approval team.
MaxResults (integer) – The maximum number of items to return in the response. If more results exist than the specified
MaxResultsvalue, a token is included in the response so that you can retrieve the remaining results.NextToken (string) – If present, indicates that more output is available than is included in the current response. Use this value in the
NextTokenrequest parameter in a next call to the operation to get more output. You can repeat this until theNextTokenresponse element returnsnull.Filters (list) –
An array of
Filterobjects. Contains the filter to apply when listing sessions.(dict) –
Contains the filter to apply to requests. You can specify up to 10 filters for a request.
FieldName (string) –
Name of the filter to use.
Note
Supported filters
The supported filters for ListSessions are:
ActionName,SessionStatus, andInitationTime.Operator (string) –
Operator to use for filtering.
EQ: Equal to the specified valueNE: Not equal to the specified valueGT: Greater than the specified valueLT: Less than the specified valueGTE: Greater than or equal to the specified valueLTE: Less than or equal to the specified valueCONTAINS: Contains the specified valueNOT_CONTAINS: Does not contain the specified valueBETWEEN: Between two values, inclusive of the specified values.
Note
Supported operators for each filter:
ActionName:EQ|NE|CONTAINS|NOT_CONTAINSSessionStatus:EQ|NEInitiationTime:GT|LT|GTE|LTE|BETWEEN
Value (string) –
Value to use for filtering. For the
BETWEENoperator, specify values in the formata AND b(ANDis case-insensitive).
- Return type:
dict
- Returns:
Response Syntax
{ 'NextToken': 'string', 'Sessions': [ { 'SessionArn': 'string', 'ApprovalTeamName': 'string', 'ApprovalTeamArn': 'string', 'InitiationTime': datetime(2015, 1, 1), 'ExpirationTime': datetime(2015, 1, 1), 'CompletionTime': datetime(2015, 1, 1), 'Description': 'string', 'ActionName': 'string', 'ProtectedResourceArn': 'string', 'RequesterServicePrincipal': 'string', 'RequesterPrincipalArn': 'string', 'RequesterRegion': 'string', 'RequesterAccountId': 'string', 'Status': 'PENDING'|'CANCELLED'|'APPROVED'|'FAILED'|'CREATING', 'StatusCode': 'REJECTED'|'EXPIRED'|'CONFIGURATION_CHANGED', 'StatusMessage': 'string', 'ActionCompletionStrategy': 'AUTO_COMPLETION_UPON_APPROVAL' }, ] }
Response Structure
(dict) –
NextToken (string) –
If present, indicates that more output is available than is included in the current response. Use this value in the
NextTokenrequest parameter in a next call to the operation to get more output. You can repeat this until theNextTokenresponse element returnsnull.Sessions (list) –
An array of
ListSessionsResponseSessionobjects. Contains details for the sessions.(dict) –
Contains details for an approval session. For more information, see Session in the Multi-party approval User Guide
SessionArn (string) –
Amazon Resource Name (ARN) for the session.
ApprovalTeamName (string) –
Name of the approval team.
ApprovalTeamArn (string) –
Amazon Resource Name (ARN) for the approval team.
InitiationTime (datetime) –
Timestamp when the session was initiated.
ExpirationTime (datetime) –
Timestamp when the session was expire.
CompletionTime (datetime) –
Timestamp when the session was completed.
Description (string) –
Description for the team.
ActionName (string) –
Name of the protected operation.
ProtectedResourceArn (string) –
Amazon Resource Name (ARN) for the protected operation.
RequesterServicePrincipal (string) –
Service principal for the service associated with the protected operation.
RequesterPrincipalArn (string) –
IAM principal that made the operation request.
RequesterRegion (string) –
Amazon Web Services Region where the operation request originated.
RequesterAccountId (string) –
ID for the account that made the operation request.
Status (string) –
Status for the protected operation. For example, if the operation is
PENDING.StatusCode (string) –
Status code of the session.
StatusMessage (string) –
Message describing the status for session.
ActionCompletionStrategy (string) –
Strategy for executing the protected operation.
AUTO_COMPLETION_UPON_APPROVALmeans the operation is executed automatically using the requester’s permissions, if approved.
Exceptions
MultipartyApproval.Client.exceptions.AccessDeniedExceptionMultipartyApproval.Client.exceptions.ValidationExceptionMultipartyApproval.Client.exceptions.ResourceNotFoundExceptionMultipartyApproval.Client.exceptions.ThrottlingExceptionMultipartyApproval.Client.exceptions.InternalServerException