UpdateProvisioningTemplate
Updates a provisioning template.
Requires permission to access the UpdateProvisioningTemplate action.
Request Syntax
PATCH /provisioning-templates/templateName HTTP/1.1
Content-type: application/json
{
   "defaultVersionId": number,
   "description": "string",
   "enabled": boolean,
   "preProvisioningHook": { 
      "payloadVersion": "string",
      "targetArn": "string"
   },
   "provisioningRoleArn": "string",
   "removePreProvisioningHook": boolean
}
    
      URI Request Parameters
The request uses the following URI parameters.
- templateName
 - 
               
The name of the provisioning template.
Length Constraints: Minimum length of 1. Maximum length of 36.
Pattern:
^[0-9A-Za-z_-]+$Required: Yes
 
Request Body
The request accepts the following data in JSON format.
- defaultVersionId
 - 
               
The ID of the default provisioning template version.
Type: Integer
Required: No
 - description
 - 
               
The description of the provisioning template.
Type: String
Length Constraints: Minimum length of 0. Maximum length of 500.
Pattern:
[^\p{C}]*Required: No
 - enabled
 - 
               
True to enable the provisioning template, otherwise false.
Type: Boolean
Required: No
 - preProvisioningHook
 - 
               
Updates the pre-provisioning hook template. Only supports template of type
FLEET_PROVISIONING. For more information about provisioning template types, see type.Type: ProvisioningHook object
Required: No
 - provisioningRoleArn
 - 
               
The ARN of the role associated with the provisioning template. This IoT role grants permission to provision a device.
Type: String
Length Constraints: Minimum length of 20. Maximum length of 2048.
Required: No
 - removePreProvisioningHook
 - 
               
Removes pre-provisioning hook template.
Type: Boolean
Required: No
 
Response Syntax
HTTP/1.1 200
    
      Response Elements
If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.
Errors
- ConflictingResourceUpdateException
 - 
               
A conflicting resource update exception. This exception is thrown when two pending updates cause a conflict.
- message
 - 
                        
The message for the exception.
 
HTTP Status Code: 409
 - InternalFailureException
 - 
               
An unexpected error has occurred.
- message
 - 
                        
The message for the exception.
 
HTTP Status Code: 500
 - InvalidRequestException
 - 
               
The request is not valid.
- message
 - 
                        
The message for the exception.
 
HTTP Status Code: 400
 - ResourceNotFoundException
 - 
               
The specified resource does not exist.
- message
 - 
                        
The message for the exception.
 
HTTP Status Code: 404
 - UnauthorizedException
 - 
               
You are not authorized to perform this operation.
- message
 - 
                        
The message for the exception.
 
HTTP Status Code: 401
 
See Also
For more information about using this API in one of the language-specific Amazon SDKs, see the following: