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

*************************
activate_message_template
*************************



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

  

  Activates a specific version of the Amazon Q in Connect message template. After the version is activated, the previous active version will be deactivated automatically. You can use the ``$ACTIVE_VERSION`` qualifier later to reference the version that is in active status.

  

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


  **Request Syntax**
  ::

    response = client.activate_message_template(
        knowledgeBaseId='string',
        messageTemplateId='string',
        versionNumber=123
    )
    
  :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.

    

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

    The identifier of the message template. Can be either the ID or the ARN. It cannot contain any qualifier.

    

  
  :type versionNumber: integer
  :param versionNumber: **[REQUIRED]** 

    The version number of the message template version to activate.

    

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

    
    ::

      {
          'messageTemplateArn': 'string',
          'messageTemplateId': 'string',
          'versionNumber': 123
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

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

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

        
      

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

        The identifier of the message template.

        
      

      - **versionNumber** *(integer) --* 

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

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

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

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

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

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

  