:doc:`QConnect <../../qconnect>` / Client / list_message_templates

**********************
list_message_templates
**********************



.. py:method:: QConnect.Client.list_message_templates(**kwargs)

  

  Lists all the available Amazon Q in Connect message templates for the specified knowledge base.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/qconnect-2020-10-19/ListMessageTemplates>`_  


  **Request Syntax**
  ::

    response = client.list_message_templates(
        nextToken='string',
        maxResults=123,
        knowledgeBaseId='string'
    )
    
  :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.

    

  
  :type maxResults: integer
  :param maxResults: 

    The maximum number of results to return per page.

    

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

    The identifier of the knowledge base. Can be either the ID or the ARN. URLs cannot contain the ARN.

    

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

    
    ::

      {
          'messageTemplateSummaries': [
              {
                  'messageTemplateArn': 'string',
                  'messageTemplateId': 'string',
                  'knowledgeBaseArn': 'string',
                  'knowledgeBaseId': 'string',
                  'name': 'string',
                  'channel': 'string',
                  'channelSubtype': 'EMAIL'|'SMS'|'WHATSAPP'|'PUSH',
                  'createdTime': datetime(2015, 1, 1),
                  'lastModifiedTime': datetime(2015, 1, 1),
                  'lastModifiedBy': 'string',
                  'sourceConfiguration': {
                      'whatsApp': {
                          'businessAccountId': 'string',
                          'templateId': 'string',
                          'components': [
                              'string',
                          ]
                      }
                  },
                  'activeVersionNumber': 123,
                  'description': 'string',
                  'tags': {
                      'string': 'string'
                  }
              },
          ],
          'nextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **messageTemplateSummaries** *(list) --* 

        Summary information about the message template.

        
        

        - *(dict) --* 

          The summary of the message template.

          
          

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

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

            
          

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

            The identifier of the message template.

            
          

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

            The Amazon Resource Name (ARN) of the knowledge base.

            
          

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

            The identifier of the knowledge base.

            
          

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

            The name of the message template.

            
          

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

            The channel this message template applies to.

            
          

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

            The channel subtype this message template applies to.

            
          

          - **createdTime** *(datetime) --* 

            The timestamp when the message template was created.

            
          

          - **lastModifiedTime** *(datetime) --* 

            The timestamp when the message template data was last modified.

            
          

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

            The Amazon Resource Name (ARN) of the user who last updated the message template data.

            
          

          - **sourceConfiguration** *(dict) --* 

            The container of message template source configuration.

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


          
            

            - **whatsApp** *(dict) --* 

              The sourceConfiguration of the message template that applies to the WHATSAPP channel subtype.

              
              

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

                The ID of the End User Messaging WhatsApp Business Account to associate with this template.

                
              

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

                The WhatsApp template ID.

                
              

              - **components** *(list) --* 

                The list of component mapping from WhatsApp template parameters to Message Template attributes.

                
                

                - *(string) --* 

                  The component mapping from WhatsApp template parameters to Message Template attributes.

                  
            
          
        
          

          - **activeVersionNumber** *(integer) --* 

            The version number of the message template version that is activated.

            
          

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

            The description of the message template.

            
          

          - **tags** *(dict) --* 

            The tags used to organize, track, or control access for this resource.

            
            

            - *(string) --* 
              

              - *(string) --* 
        
      
      
    
      

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

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

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

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

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

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

  