:doc:`SSM <../../ssm>` / Client / get_access_token

****************
get_access_token
****************



.. py:method:: SSM.Client.get_access_token(**kwargs)

  

  Returns a credentials set to be used with just-in-time node access.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetAccessToken>`_  


  **Request Syntax**
  ::

    response = client.get_access_token(
        AccessRequestId='string'
    )
    
  :type AccessRequestId: string
  :param AccessRequestId: **[REQUIRED]** 

    The ID of a just-in-time node access request.

    

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

    
    ::

      {
          'Credentials': {
              'AccessKeyId': 'string',
              'SecretAccessKey': 'string',
              'SessionToken': 'string',
              'ExpirationTime': datetime(2015, 1, 1)
          },
          'AccessRequestStatus': 'Approved'|'Rejected'|'Revoked'|'Expired'|'Pending'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **Credentials** *(dict) --* 

        The temporary security credentials which can be used to start just-in-time node access sessions.

        
        

        - **AccessKeyId** *(string) --* 

          The access key ID that identifies the temporary security credentials.

          
        

        - **SecretAccessKey** *(string) --* 

          The secret access key that can be used to sign requests.

          
        

        - **SessionToken** *(string) --* 

          The token that users must pass to the service API to use the temporary credentials.

          
        

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

          The datetime on which the current credentials expire.

          
    
      

      - **AccessRequestStatus** *(string) --* 

        The status of the access request.

        
  
  **Exceptions**
  
  *   :py:class:`SSM.Client.exceptions.InternalServerError`

  
  *   :py:class:`SSM.Client.exceptions.AccessDeniedException`

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

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

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

  