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

************************************
create_provisioning_template_version
************************************



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

  

  Creates a new version of a provisioning template.

   

  Requires permission to access the `CreateProvisioningTemplateVersion <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/CreateProvisioningTemplateVersion>`_  


  **Request Syntax**
  ::

    response = client.create_provisioning_template_version(
        templateName='string',
        templateBody='string',
        setAsDefault=True|False
    )
    
  :type templateName: string
  :param templateName: **[REQUIRED]** 

    The name of the provisioning template.

    

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

    The JSON formatted contents of the provisioning template.

    

  
  :type setAsDefault: boolean
  :param setAsDefault: 

    Sets a fleet provision template version as the default version.

    

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

    
    ::

      {
          'templateArn': 'string',
          'templateName': 'string',
          'versionId': 123,
          'isDefaultVersion': True|False
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **templateArn** *(string) --* 

        The ARN that identifies the provisioning template.

        
      

      - **templateName** *(string) --* 

        The name of the provisioning template.

        
      

      - **versionId** *(integer) --* 

        The version of the provisioning template.

        
      

      - **isDefaultVersion** *(boolean) --* 

        True if the provisioning template version is the default version, otherwise false.

        
  
  **Exceptions**
  
  *   :py:class:`IoT.Client.exceptions.VersionsLimitExceededException`

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

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

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

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

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

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

  