:doc:`Connect <../../connect>` / Client / list_task_templates

*******************
list_task_templates
*******************



.. py:method:: Connect.Client.list_task_templates(**kwargs)

  

  Lists task templates for the specified Amazon Connect instance.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/connect-2017-08-08/ListTaskTemplates>`_  


  **Request Syntax**
  ::

    response = client.list_task_templates(
        InstanceId='string',
        NextToken='string',
        MaxResults=123,
        Status='ACTIVE'|'INACTIVE',
        Name='string'
    )
    
  :type InstanceId: string
  :param InstanceId: **[REQUIRED]** 

    The identifier of the Amazon Connect instance. You can `find the instance ID <https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html>`__ in the Amazon Resource Name (ARN) of the instance.

    

  
  :type NextToken: string
  :param NextToken: 

    The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

     

    .. warning::

       

      It is not expected that you set this because the value returned in the previous response is always null.

      

    

  
  :type MaxResults: integer
  :param MaxResults: 

    The maximum number of results to return per page.

     

    .. warning::

       

      It is not expected that you set this.

      

    

  
  :type Status: string
  :param Status: 

    Marks a template as ``ACTIVE`` or ``INACTIVE`` for a task to refer to it. Tasks can only be created from ``ACTIVE`` templates. If a template is marked as ``INACTIVE``, then a task that refers to this template cannot be created.

    

  
  :type Name: string
  :param Name: 

    The name of the task template.

    

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

    
    ::

      {
          'TaskTemplates': [
              {
                  'Id': 'string',
                  'Arn': 'string',
                  'Name': 'string',
                  'Description': 'string',
                  'Status': 'ACTIVE'|'INACTIVE',
                  'LastModifiedTime': datetime(2015, 1, 1),
                  'CreatedTime': datetime(2015, 1, 1)
              },
          ],
          'NextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **TaskTemplates** *(list) --* 

        Provides details about a list of task templates belonging to an instance.

        
        

        - *(dict) --* 

          Contains summary information about the task template.

          
          

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

            A unique identifier for the task template.

            
          

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

            The Amazon Resource Name (ARN) of the task template.

            
          

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

            The name of the task template.

            
          

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

            The description of the task template.

            
          

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

            Marks a template as ``ACTIVE`` or ``INACTIVE`` for a task to refer to it. Tasks can only be created from ``ACTIVE`` templates. If a template is marked as ``INACTIVE``, then a task that refers to this template cannot be created.

            
          

          - **LastModifiedTime** *(datetime) --* 

            The timestamp when the task template was last modified.

            
          

          - **CreatedTime** *(datetime) --* 

            The timestamp when the task template was created.

            
      
    
      

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

        If there are additional results, this is the token for the next set of results.

         

        .. warning::

           

          This is always returned as a null in the response.

          

        
  
  **Exceptions**
  
  *   :py:class:`Connect.Client.exceptions.InvalidRequestException`

  
  *   :py:class:`Connect.Client.exceptions.InvalidParameterException`

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

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

  
  *   :py:class:`Connect.Client.exceptions.InternalServiceException`

  