:doc:`DeadlineCloud <../../deadline>` / Client / assume_fleet_role_for_worker

****************************
assume_fleet_role_for_worker
****************************



.. py:method:: DeadlineCloud.Client.assume_fleet_role_for_worker(**kwargs)

  

  Get credentials from the fleet role for a worker.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/deadline-2023-10-12/AssumeFleetRoleForWorker>`_  


  **Request Syntax**
  ::

    response = client.assume_fleet_role_for_worker(
        farmId='string',
        fleetId='string',
        workerId='string'
    )
    
  :type farmId: string
  :param farmId: **[REQUIRED]** 

    The farm ID for the fleet's farm.

    

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

    The fleet ID that contains the worker.

    

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

    The ID of the worker assuming the fleet role.

    

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

    
    ::

      {
          'credentials': {
              'accessKeyId': 'string',
              'secretAccessKey': 'string',
              'sessionToken': 'string',
              'expiration': datetime(2015, 1, 1)
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

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

        The credentials for the worker.

        
        

        - **accessKeyId** *(string) --* 

          The IAM access key ID.

          
        

        - **secretAccessKey** *(string) --* 

          The IAM secret access key.

          
        

        - **sessionToken** *(string) --* 

          The IAM session token

          
        

        - **expiration** *(datetime) --* 

          The expiration date and time of the IAM credentials.

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

  
  *   :py:class:`DeadlineCloud.Client.exceptions.InternalServerErrorException`

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

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

  
  *   :py:class:`DeadlineCloud.Client.exceptions.ConflictException`

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

  