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 the- NextTokenresponse element returns- null.
- 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, and- InitationTime.
- Operator (string) – - Operator to use for filtering. - EQ: Equal to the specified value
- NE: Not equal to the specified value
- GT: Greater than the specified value
- LT: Less than the specified value
- GTE: Greater than or equal to the specified value
- LTE: Less than or equal to the specified value
- CONTAINS: Contains the specified value
- NOT_CONTAINS: Does not contain the specified value
- BETWEEN: Between two values, inclusive of the specified values.
 - Note- Supported operators for each filter: - ActionName:- EQ|- NE|- CONTAINS|- NOT_CONTAINS
- SessionStatus:- EQ|- NE
- InitiationTime:- GT|- LT|- GTE|- LTE|- BETWEEN
 
- Value (string) – - Value to use for filtering. For the - BETWEENoperator, specify values in the format- a 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 the- NextTokenresponse element returns- null.
- 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.AccessDeniedException
- MultipartyApproval.Client.exceptions.ValidationException
- MultipartyApproval.Client.exceptions.ResourceNotFoundException
- MultipartyApproval.Client.exceptions.ThrottlingException
- MultipartyApproval.Client.exceptions.InternalServerException