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

********
get_task
********



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

  

  Gets a task.

  

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


  **Request Syntax**
  ::

    response = client.get_task(
        farmId='string',
        queueId='string',
        jobId='string',
        stepId='string',
        taskId='string'
    )
    
  :type farmId: string
  :param farmId: **[REQUIRED]** 

    The farm ID of the farm connected to the task.

    

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

    The queue ID for the queue connected to the task.

    

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

    The job ID of the job connected to the task.

    

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

    The step ID for the step connected to the task.

    

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

    The task ID.

    

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

    
    ::

      {
          'taskId': 'string',
          'createdAt': datetime(2015, 1, 1),
          'createdBy': 'string',
          'runStatus': 'PENDING'|'READY'|'ASSIGNED'|'STARTING'|'SCHEDULED'|'INTERRUPTING'|'RUNNING'|'SUSPENDED'|'CANCELED'|'FAILED'|'SUCCEEDED'|'NOT_COMPATIBLE',
          'targetRunStatus': 'READY'|'FAILED'|'SUCCEEDED'|'CANCELED'|'SUSPENDED'|'PENDING',
          'failureRetryCount': 123,
          'parameters': {
              'string': {
                  'int': 'string',
                  'float': 'string',
                  'string': 'string',
                  'path': 'string',
                  'chunkInt': 'string'
              }
          },
          'startedAt': datetime(2015, 1, 1),
          'endedAt': datetime(2015, 1, 1),
          'updatedAt': datetime(2015, 1, 1),
          'updatedBy': 'string',
          'latestSessionActionId': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **taskId** *(string) --* 

        The task ID.

        
      

      - **createdAt** *(datetime) --* 

        The date and time the resource was created.

        
      

      - **createdBy** *(string) --* 

        The user or system that created this resource.

        
      

      - **runStatus** *(string) --* 

        The run status for the task.

        
      

      - **targetRunStatus** *(string) --* 

        The run status with which to start the task.

        
      

      - **failureRetryCount** *(integer) --* 

        The number of times that the task failed and was retried.

        
      

      - **parameters** *(dict) --* 

        The parameters for the task.

        
        

        - *(string) --* 
          

          - *(dict) --* 

            The data types for the task parameters.

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


          
            

            - **int** *(string) --* 

              A signed integer represented as a string.

              
            

            - **float** *(string) --* 

              A double precision IEEE-754 floating point number represented as a string.

              
            

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

              A UTF-8 string.

              
            

            - **path** *(string) --* 

              A file system path represented as a string.

              
            

            - **chunkInt** *(string) --* 

              A range (for example 1-10) or selection of specific (for example 1,3,7,8,10) integers represented as a string.

              
        
    
  
      

      - **startedAt** *(datetime) --* 

        The date and time the resource started running.

        
      

      - **endedAt** *(datetime) --* 

        The date and time the resource ended running.

        
      

      - **updatedAt** *(datetime) --* 

        The date and time the resource was updated.

        
      

      - **updatedBy** *(string) --* 

        The user or system that updated this resource.

        
      

      - **latestSessionActionId** *(string) --* 

        The latest session action ID for the task.

        
  
  **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.ValidationException`

  