:doc:`VerifiedPermissions <../../verifiedpermissions>` / Client / update_policy_template

**********************
update_policy_template
**********************



.. py:method:: VerifiedPermissions.Client.update_policy_template(**kwargs)

  

  Updates the specified policy template. You can update only the description and the some elements of the `policyBody <https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_UpdatePolicyTemplate.html#amazonverifiedpermissions-UpdatePolicyTemplate-request-policyBody>`__.

   

  .. warning::

     

    Changes you make to the policy template content are immediately (within the constraints of eventual consistency) reflected in authorization decisions that involve all template-linked policies instantiated from this template.

     

   

  .. note::

    

    Verified Permissions is `eventually consistent <https://wikipedia.org/wiki/Eventual_consistency>`__ . It can take a few seconds for a new or changed element to propagate through the service and be visible in the results of other Verified Permissions operations.

    

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/verifiedpermissions-2021-12-01/UpdatePolicyTemplate>`_  


  **Request Syntax**
  ::

    response = client.update_policy_template(
        policyStoreId='string',
        policyTemplateId='string',
        description='string',
        statement='string'
    )
    
  :type policyStoreId: string
  :param policyStoreId: **[REQUIRED]** 

    Specifies the ID of the policy store that contains the policy template that you want to update.

    

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

    Specifies the ID of the policy template that you want to update.

    

  
  :type description: string
  :param description: 

    Specifies a new description to apply to the policy template.

    

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

    Specifies new statement content written in Cedar policy language to replace the current body of the policy template.

     

    You can change only the following elements of the policy body:

     

    
    * The ``action`` referenced by the policy template.
     
    * Any conditional clauses, such as ``when`` or ``unless`` clauses.
    

     

    You **can't** change the following elements:

     

    
    * The effect ( ``permit`` or ``forbid``) of the policy template.
     
    * The ``principal`` referenced by the policy template.
     
    * The ``resource`` referenced by the policy template.
    

    

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

    
    ::

      {
          'policyStoreId': 'string',
          'policyTemplateId': 'string',
          'createdDate': datetime(2015, 1, 1),
          'lastUpdatedDate': datetime(2015, 1, 1)
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

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

        The ID of the policy store that contains the updated policy template.

        
      

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

        The ID of the updated policy template.

        
      

      - **createdDate** *(datetime) --* 

        The date and time that the policy template was originally created.

        
      

      - **lastUpdatedDate** *(datetime) --* 

        The date and time that the policy template was most recently updated.

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

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

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

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

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

  
  *   :py:class:`VerifiedPermissions.Client.exceptions.InternalServerException`

  