Skip to main content

provisioning_template_versions

Creates, updates, deletes, gets or lists a provisioning_template_versions resource.

Overview

Nameprovisioning_template_versions
TypeResource
Idaws.iot.provisioning_template_versions

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
creation_datestring (date-time)The date when the provisioning template version was created.
is_default_versionbooleanTrue if the provisioning template version is the default version.
template_bodystringThe JSON formatted contents of the provisioning template version. (pattern: <code>[\s\S]*</code>)
version_idintegerThe provisioning template version ID.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_provisioning_template_versionselecttemplate_name, version_id, regionReturns information about a provisioning template version. Requires permission to access the DescribeProvisioningTemplateVersion action.
list_provisioning_template_versionsselecttemplate_name, regionmaxResults, nextTokenA list of provisioning template versions. Requires permission to access the ListProvisioningTemplateVersions action.
create_provisioning_template_versioninserttemplate_name, region, templateBodysetAsDefaultCreates a new version of a provisioning template. Requires permission to access the CreateProvisioningTemplateVersion action.
delete_provisioning_template_versiondeletetemplate_name, version_id, regionDeletes a provisioning template version. Requires permission to access the DeleteProvisioningTemplateVersion action.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)
template_namestringThe name of the provisioning template version to delete.
version_idintegerThe provisioning template version ID to delete.
maxResultsintegerThe maximum number of results to return at one time.
nextTokenstringA token to retrieve the next set of results.
setAsDefaultbooleanSets a fleet provision template version as the default version.

SELECT examples

Returns information about a provisioning template version. Requires permission to access the DescribeProvisioningTemplateVersion action.

SELECT
creation_date,
is_default_version,
template_body,
version_id
FROM aws.iot.provisioning_template_versions
WHERE template_name = '{{ template_name }}' -- required
AND version_id = '{{ version_id }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates a new version of a provisioning template. Requires permission to access the CreateProvisioningTemplateVersion action.

INSERT INTO aws.iot.provisioning_template_versions (
templateBody,
template_name,
region,
setAsDefault
)
SELECT
'{{ templateBody }}' /* required */,
'{{ template_name }}',
'{{ region }}',
'{{ setAsDefault }}'
RETURNING
is_default_version,
template_arn,
template_name,
version_id
;

DELETE examples

Deletes a provisioning template version. Requires permission to access the DeleteProvisioningTemplateVersion action.

DELETE FROM aws.iot.provisioning_template_versions
WHERE template_name = '{{ template_name }}' --required
AND version_id = '{{ version_id }}' --required
AND region = '{{ region }}' --required
;