:doc:`ConnectCases <../../connectcases>` / Client / update_template

***************
update_template
***************



.. py:method:: ConnectCases.Client.update_template(**kwargs)

  

  Updates the attributes of an existing template. The template attributes that can be modified include ``name``, ``description``, ``layoutConfiguration``, ``requiredFields``, and ``status``. At least one of these attributes must not be null. If a null value is provided for a given attribute, that attribute is ignored and its current value is preserved.

   

  Other template APIs are:

   

  
  * `CreateTemplate <https://docs.aws.amazon.com/connect/latest/APIReference/API_connect-cases_CreateTemplate.html>`__
   
  * `DeleteTemplate <https://docs.aws.amazon.com/connect/latest/APIReference/API_connect-cases_DeleteTemplate.html>`__
   
  * `GetTemplate <https://docs.aws.amazon.com/connect/latest/APIReference/API_connect-cases_GetTemplate.html>`__
   
  * `ListTemplates <https://docs.aws.amazon.com/connect/latest/APIReference/API_connect-cases_ListTemplates.html>`__
  

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/connectcases-2022-10-03/UpdateTemplate>`_  


  **Request Syntax**
  ::

    response = client.update_template(
        domainId='string',
        templateId='string',
        name='string',
        description='string',
        layoutConfiguration={
            'defaultLayout': 'string'
        },
        requiredFields=[
            {
                'fieldId': 'string'
            },
        ],
        status='Active'|'Inactive',
        rules=[
            {
                'caseRuleId': 'string',
                'fieldId': 'string'
            },
        ],
        tagPropagationConfigurations=[
            {
                'resourceType': 'Cases',
                'tagMap': {
                    'string': 'string'
                }
            },
        ]
    )
    
  :type domainId: string
  :param domainId: **[REQUIRED]** 

    The unique identifier of the Cases domain.

    

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

    A unique identifier for the template.

    

  
  :type name: string
  :param name: 

    The name of the template. It must be unique per domain.

    

  
  :type description: string
  :param description: 

    A brief description of the template.

    

  
  :type layoutConfiguration: dict
  :param layoutConfiguration: 

    Configuration of layouts associated to the template.

    

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

      Unique identifier of a layout.

      

    
  
  :type requiredFields: list
  :param requiredFields: 

    A list of fields that must contain a value for a case to be successfully created with this template.

    

  
    - *(dict) --* 

      List of fields that must have a value provided to create a case.

      

    
      - **fieldId** *(string) --* **[REQUIRED]** 

        Unique identifier of a field.

        

      
    

  :type status: string
  :param status: 

    The status of the template.

    

  
  :type rules: list
  :param rules: 

    A list of case rules (also known as `case field conditions <https://docs.aws.amazon.com/connect/latest/adminguide/case-field-conditions.html>`__) on a template.

    

  
    - *(dict) --* 

      An association representing a case rule acting upon a field. In the Amazon Connect admin website, case rules are known as *case field conditions*. For more information about case field conditions, see `Add case field conditions to a case template <https://docs.aws.amazon.com/connect/latest/adminguide/case-field-conditions.html>`__.

      

    
      - **caseRuleId** *(string) --* **[REQUIRED]** 

        Unique identifier of a case rule.

        

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

        Unique identifier of a field.

        

      
    

  :type tagPropagationConfigurations: list
  :param tagPropagationConfigurations: 

    Defines tag propagation configuration for resources created within a domain. Tags specified here will be automatically applied to resources being created for the specified resource type.

    

  
    - *(dict) --* 

      Defines tag propagation configuration for resources created within a domain. Tags specified here will be automatically applied to resources being created for the specified resource type.

      

    
      - **resourceType** *(string) --* **[REQUIRED]** 

        Supported resource types for tag propagation. Determines which resources will receive automatically propagated tags.

        

      
      - **tagMap** *(dict) --* **[REQUIRED]** 

        The tags that will be applied to the created resource.

        

      
        - *(string) --* 

        
          - *(string) --* 

          
    
  
    

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

    
    ::

      {}
      
    **Response Structure**

    

    - *(dict) --* 
  
  **Exceptions**
  
  *   :py:class:`ConnectCases.Client.exceptions.InternalServerException`

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

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

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

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

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

  
  *   :py:class:`ConnectCases.Client.exceptions.ServiceQuotaExceededException`

  