Skip to main content

provisioning_templates

Creates, updates, deletes or gets a provisioning_template resource or lists provisioning_templates in a region

Overview

Nameprovisioning_templates
TypeResource
DescriptionCreates a fleet provisioning template.
Idaws.iot.provisioning_templates

Fields

NameDatatypeDescription
template_arnstring
template_namestring
descriptionstring
enabledboolean
provisioning_role_arnstring
template_bodystring
template_typestring
pre_provisioning_hookobject
tagsarray
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTProvisioningRoleArn, TemplateBody, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all provisioning_templates in a region.

SELECT
region,
template_arn,
template_name,
description,
enabled,
provisioning_role_arn,
template_body,
template_type,
pre_provisioning_hook,
tags
FROM aws.iot.provisioning_templates
WHERE region = 'us-east-1';

Gets all properties from an individual provisioning_template.

SELECT
region,
template_arn,
template_name,
description,
enabled,
provisioning_role_arn,
template_body,
template_type,
pre_provisioning_hook,
tags
FROM aws.iot.provisioning_templates
WHERE region = 'us-east-1' AND data__Identifier = '<TemplateName>';

INSERT example

Use the following StackQL query and manifest file to create a new provisioning_template resource, using stack-deploy.

/*+ create */
INSERT INTO aws.iot.provisioning_templates (
ProvisioningRoleArn,
TemplateBody,
region
)
SELECT
'{{ ProvisioningRoleArn }}',
'{{ TemplateBody }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.iot.provisioning_templates
WHERE data__Identifier = '<TemplateName>'
AND region = 'us-east-1';

Permissions

To operate on the provisioning_templates resource, the following permissions are required:

Create

iam:GetRole,
iam:PassRole,
iot:CreateProvisioningTemplate,
iot:DescribeProvisioningTemplate,
iot:TagResource,
iot:ListTagsForResource

Read

iot:DescribeProvisioningTemplate,
iot:ListTagsForResource

Update

iam:GetRole,
iam:PassRole,
iot:UpdateProvisioningTemplate,
iot:CreateProvisioningTemplateVersion,
iot:ListProvisioningTemplateVersions,
iot:DeleteProvisioningTemplateVersion,
iot:DescribeProvisioningTemplate,
iot:TagResource,
iot:UntagResource,
iot:ListTagsForResource

Delete

iot:DeleteProvisioningTemplate,
iot:DescribeProvisioningTemplate

List

iot:ListProvisioningTemplates