:doc:`EMRContainers <../../emr-containers>` / Client / get_managed_endpoint_session_credentials

****************************************
get_managed_endpoint_session_credentials
****************************************



.. py:method:: EMRContainers.Client.get_managed_endpoint_session_credentials(**kwargs)

  

  Generate a session token to connect to a managed endpoint.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/emr-containers-2020-10-01/GetManagedEndpointSessionCredentials>`_  


  **Request Syntax**
  ::

    response = client.get_managed_endpoint_session_credentials(
        endpointIdentifier='string',
        virtualClusterIdentifier='string',
        executionRoleArn='string',
        credentialType='string',
        durationInSeconds=123,
        logContext='string',
        clientToken='string'
    )
    
  :type endpointIdentifier: string
  :param endpointIdentifier: **[REQUIRED]** 

    The ARN of the managed endpoint for which the request is submitted.

    

  
  :type virtualClusterIdentifier: string
  :param virtualClusterIdentifier: **[REQUIRED]** 

    The ARN of the Virtual Cluster which the Managed Endpoint belongs to.

    

  
  :type executionRoleArn: string
  :param executionRoleArn: **[REQUIRED]** 

    The IAM Execution Role ARN that will be used by the job run.

    

  
  :type credentialType: string
  :param credentialType: **[REQUIRED]** 

    Type of the token requested. Currently supported and default value of this field is “TOKEN.”

    

  
  :type durationInSeconds: integer
  :param durationInSeconds: 

    Duration in seconds for which the session token is valid. The default duration is 15 minutes and the maximum is 12 hours.

    

  
  :type logContext: string
  :param logContext: 

    String identifier used to separate sections of the execution logs uploaded to S3.

    

  
  :type clientToken: string
  :param clientToken: 

    The client idempotency token of the job run request.

    This field is autopopulated if not provided.

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

    
    ::

      {
          'id': 'string',
          'credentials': {
              'token': 'string'
          },
          'expiresAt': datetime(2015, 1, 1)
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **id** *(string) --* 

        The identifier of the session token returned.

        
      

      - **credentials** *(dict) --* 

        The structure containing the session credentials.

        .. note::    This is a Tagged Union structure. Only one of the     following top level keys will be set: ``token``.     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'}


      
        

        - **token** *(string) --* 

          The actual session token being returned.

          
    
      

      - **expiresAt** *(datetime) --* 

        The date and time when the session token will expire.

        
  
  **Exceptions**
  
  *   :py:class:`EMRContainers.Client.exceptions.ValidationException`

  
  *   :py:class:`EMRContainers.Client.exceptions.RequestThrottledException`

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

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

  