IoT / Client / create_provisioning_template
create_provisioning_template#
- IoT.Client.create_provisioning_template(**kwargs)#
- Creates a provisioning template. - Requires permission to access the CreateProvisioningTemplate action. - See also: AWS API Documentation - Request Syntax- response = client.create_provisioning_template( templateName='string', description='string', templateBody='string', enabled=True|False, provisioningRoleArn='string', preProvisioningHook={ 'payloadVersion': 'string', 'targetArn': 'string' }, tags=[ { 'Key': 'string', 'Value': 'string' }, ], type='FLEET_PROVISIONING'|'JITP' ) - Parameters:
- templateName (string) – - [REQUIRED] - The name of the provisioning template. 
- description (string) – The description of the provisioning template. 
- templateBody (string) – - [REQUIRED] - The JSON formatted contents of the provisioning template. 
- enabled (boolean) – True to enable the provisioning template, otherwise false. 
- provisioningRoleArn (string) – - [REQUIRED] - The role ARN for the role associated with the provisioning template. This IoT role grants permission to provision a device. 
- preProvisioningHook (dict) – - Creates a pre-provisioning hook template. Only supports template of type - FLEET_PROVISIONING. For more information about provisioning template types, see 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. 
 
- tags (list) – - Metadata which can be used to manage the provisioning template. - Note- For URI Request parameters use format: …key1=value1&key2=value2… - For the CLI command-line parameter use format: &&tags “key1=value1&key2=value2…” - For the cli-input-json file use format: “tags”: “key1=value1&key2=value2…” - (dict) – - A set of key/value pairs that are used to manage the resource. - Key (string) – [REQUIRED] - The tag’s key. 
- Value (string) – - The tag’s value. 
 
 
- type (string) – The type you define in a provisioning template. You can create a template with only one type. You can’t change the template type after its creation. The default value is - FLEET_PROVISIONING. For more information about provisioning template, see: Provisioning template.
 
- Return type:
- dict 
- Returns:
- Response Syntax- { 'templateArn': 'string', 'templateName': 'string', 'defaultVersionId': 123 } - Response Structure- (dict) – - templateArn (string) – - The ARN that identifies the provisioning template. 
- templateName (string) – - The name of the provisioning template. 
- defaultVersionId (integer) – - The default version of the provisioning template. 
 
 
 - Exceptions- IoT.Client.exceptions.InternalFailureException
- IoT.Client.exceptions.InvalidRequestException
- IoT.Client.exceptions.LimitExceededException
- IoT.Client.exceptions.ThrottlingException
- IoT.Client.exceptions.UnauthorizedException
- IoT.Client.exceptions.ResourceAlreadyExistsException