:doc:`MultipartyApproval <../../mpa>` / Client / get_session

***********
get_session
***********



.. py:method:: MultipartyApproval.Client.get_session(**kwargs)

  

  Returns details for an approval session. For more information, see `Session <https://docs.aws.amazon.com/mpa/latest/userguide/mpa-concepts.html>`__ in the *Multi-party approval User Guide*.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/mpa-2022-07-26/GetSession>`_  


  **Request Syntax**
  ::

    response = client.get_session(
        SessionArn='string'
    )
    
  :type SessionArn: string
  :param SessionArn: **[REQUIRED]** 

    Amazon Resource Name (ARN) for the session.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'SessionArn': 'string',
          'ApprovalTeamArn': 'string',
          'ApprovalTeamName': 'string',
          'ProtectedResourceArn': 'string',
          'ApprovalStrategy': {
              'MofN': {
                  'MinApprovalsRequired': 123
              }
          },
          'NumberOfApprovers': 123,
          'InitiationTime': datetime(2015, 1, 1),
          'ExpirationTime': datetime(2015, 1, 1),
          'CompletionTime': datetime(2015, 1, 1),
          'Description': 'string',
          'Metadata': {
              'string': 'string'
          },
          'Status': 'PENDING'|'CANCELLED'|'APPROVED'|'FAILED'|'CREATING',
          'StatusCode': 'REJECTED'|'EXPIRED'|'CONFIGURATION_CHANGED',
          'StatusMessage': 'string',
          'ExecutionStatus': 'EXECUTED'|'FAILED'|'PENDING',
          'ActionName': 'string',
          'RequesterServicePrincipal': 'string',
          'RequesterPrincipalArn': 'string',
          'RequesterAccountId': 'string',
          'RequesterRegion': 'string',
          'RequesterComment': 'string',
          'ActionCompletionStrategy': 'AUTO_COMPLETION_UPON_APPROVAL',
          'ApproverResponses': [
              {
                  'ApproverId': 'string',
                  'IdentitySourceArn': 'string',
                  'IdentityId': 'string',
                  'Response': 'APPROVED'|'REJECTED'|'NO_RESPONSE',
                  'ResponseTime': datetime(2015, 1, 1)
              },
          ],
          'AdditionalSecurityRequirements': [
              'APPROVER_VERIFICATION_REQUIRED',
          ]
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **SessionArn** *(string) --* 

        Amazon Resource Name (ARN) for the session.

        
      

      - **ApprovalTeamArn** *(string) --* 

        Amazon Resource Name (ARN) for the approval team.

        
      

      - **ApprovalTeamName** *(string) --* 

        Name of the approval team.

        
      

      - **ProtectedResourceArn** *(string) --* 

        Amazon Resource Name (ARN) for the protected operation.

        
      

      - **ApprovalStrategy** *(dict) --* 

        An ``ApprovalStrategyResponse`` object. Contains details for how the team grants approval

        .. note::    This is a Tagged Union structure. Only one of the     following top level keys will be set: ``MofN``.     If a client receives an unknown member it will     set ``SDK_UNKNOWN_MEMBER`` as the top level key,     which maps to the name or tag of the unknown     member. The structure of ``SDK_UNKNOWN_MEMBER`` is     as follows::

                'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}


      
        

        - **MofN** *(dict) --* 

          Minimum number of approvals (M) required for a total number of approvers (N).

          
          

          - **MinApprovalsRequired** *(integer) --* 

            Minimum number of approvals (M) required for a total number of approvers (N).

            
      
    
      

      - **NumberOfApprovers** *(integer) --* 

        Total number of approvers in the session.

        
      

      - **InitiationTime** *(datetime) --* 

        Timestamp when the session was initiated.

        
      

      - **ExpirationTime** *(datetime) --* 

        Timestamp when the session will expire.

        
      

      - **CompletionTime** *(datetime) --* 

        Timestamp when the session completed.

        
      

      - **Description** *(string) --* 

        Description for the session.

        
      

      - **Metadata** *(dict) --* 

        Metadata for the session.

        
        

        - *(string) --* 
          

          - *(string) --* 
    
  
      

      - **Status** *(string) --* 

        Status for the session. For example, if the team has approved the requested operation.

        
      

      - **StatusCode** *(string) --* 

        Status code of the session.

        
      

      - **StatusMessage** *(string) --* 

        Message describing the status for session.

        
      

      - **ExecutionStatus** *(string) --* 

        Status for the protected operation. For example, if the operation is ``PENDING``.

        
      

      - **ActionName** *(string) --* 

        Name of the protected operation.

        
      

      - **RequesterServicePrincipal** *(string) --* 

        `Service principal <https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html#principal-services>`__ for the service associated with the protected operation.

        
      

      - **RequesterPrincipalArn** *(string) --* 

        `IAM principal <https://docs.aws.amazon.com/IAM/latest/UserGuide/intro-structure.html#intro-structure-request>`__ that made the operation request.

        
      

      - **RequesterAccountId** *(string) --* 

        ID for the account that made the operation request.

        
      

      - **RequesterRegion** *(string) --* 

        Amazon Web Services Region where the operation request originated.

        
      

      - **RequesterComment** *(string) --* 

        Message from the account that made the operation request

        
      

      - **ActionCompletionStrategy** *(string) --* 

        Strategy for executing the protected operation. ``AUTO_COMPLETION_UPON_APPROVAL`` means the operation is automatically executed using the requester's permissions, if approved.

        
      

      - **ApproverResponses** *(list) --* 

        An array of ``GetSessionResponseApproverResponse`` objects. Contains details for approver responses in the session.

        
        

        - *(dict) --* 

          Contains details for an approver response in an approval session.

          
          

          - **ApproverId** *(string) --* 

            ID for the approver.

            
          

          - **IdentitySourceArn** *(string) --* 

            Amazon Resource Name (ARN) for the identity source. The identity source manages the user authentication for approvers.

            
          

          - **IdentityId** *(string) --* 

            ID for the identity source. The identity source manages the user authentication for approvers.

            
          

          - **Response** *(string) --* 

            Response to the operation request.

            
          

          - **ResponseTime** *(datetime) --* 

            Timestamp when a approver responded to the operation request.

            
      
    
      

      - **AdditionalSecurityRequirements** *(list) --* 

        A list of ``AdditionalSecurityRequirement`` applied to the session.

        
        

        - *(string) --* 

          Additional security requirements applied to a session or invitation

           

          
          * ``APPROVER_VERIFICATION_REQUIRED``: Approvers will be required to perform an MFA challenge to vote
          

          
    
  
  **Exceptions**
  
  *   :py:class:`MultipartyApproval.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`MultipartyApproval.Client.exceptions.ValidationException`

  
  *   :py:class:`MultipartyApproval.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`MultipartyApproval.Client.exceptions.ThrottlingException`

  
  *   :py:class:`MultipartyApproval.Client.exceptions.InternalServerException`

  