:doc:`IoT <../../iot>` / Client / update_provisioning_template

****************************
update_provisioning_template
****************************



.. py:method:: IoT.Client.update_provisioning_template(**kwargs)

  

  Updates a provisioning template.

   

  Requires permission to access the `UpdateProvisioningTemplate <https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions>`__ action.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iot-2015-05-28/UpdateProvisioningTemplate>`_  


  **Request Syntax**
  ::

    response = client.update_provisioning_template(
        templateName='string',
        description='string',
        enabled=True|False,
        defaultVersionId=123,
        provisioningRoleArn='string',
        preProvisioningHook={
            'payloadVersion': 'string',
            'targetArn': 'string'
        },
        removePreProvisioningHook=True|False
    )
    
  :type templateName: string
  :param templateName: **[REQUIRED]** 

    The name of the provisioning template.

    

  
  :type description: string
  :param description: 

    The description of the provisioning template.

    

  
  :type enabled: boolean
  :param enabled: 

    True to enable the provisioning template, otherwise false.

    

  
  :type defaultVersionId: integer
  :param defaultVersionId: 

    The ID of the default provisioning template version.

    

  
  :type provisioningRoleArn: string
  :param provisioningRoleArn: 

    The ARN of the role associated with the provisioning template. This IoT role grants permission to provision a device.

    

  
  :type preProvisioningHook: dict
  :param preProvisioningHook: 

    Updates the pre-provisioning hook template. Only supports template of type ``FLEET_PROVISIONING``. For more information about provisioning template types, see `type <https://docs.aws.amazon.com/iot/latest/apireference/API_CreateProvisioningTemplate.html#iot-CreateProvisioningTemplate-request-type>`__.

    

  
    - **payloadVersion** *(string) --* 

      The payload that was sent to the target function.

       

      *Note:* Only Lambda functions are currently supported.

      

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

      The ARN of the target function.

       

      *Note:* Only Lambda functions are currently supported.

      

    
  
  :type removePreProvisioningHook: boolean
  :param removePreProvisioningHook: 

    Removes pre-provisioning hook template.

    

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

    
    ::

      {}
      
    **Response Structure**

    

    - *(dict) --* 
  
  **Exceptions**
  
  *   :py:class:`IoT.Client.exceptions.InternalFailureException`

  
  *   :py:class:`IoT.Client.exceptions.InvalidRequestException`

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

  
  *   :py:class:`IoT.Client.exceptions.UnauthorizedException`

  
  *   :py:class:`IoT.Client.exceptions.ConflictingResourceUpdateException`

  