provisioning_templates
Creates, updates, deletes or gets a provisioning_template
resource or lists provisioning_templates
in a region
Overview
Name | provisioning_templates |
Type | Resource |
Description | Creates a fleet provisioning template. |
Id | aws.iot.provisioning_templates |
Fields
Name | Datatype | Description |
---|---|---|
template_arn | string | |
template_name | string | |
description | string | |
enabled | boolean | |
provisioning_role_arn | string | |
template_body | string | |
template_type | string | |
pre_provisioning_hook | object | |
tags | array | |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | ProvisioningRoleArn, TemplateBody, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.iot.provisioning_templates (
ProvisioningRoleArn,
TemplateBody,
region
)
SELECT
'{{ ProvisioningRoleArn }}',
'{{ TemplateBody }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.iot.provisioning_templates (
TemplateName,
Description,
Enabled,
ProvisioningRoleArn,
TemplateBody,
TemplateType,
PreProvisioningHook,
Tags,
region
)
SELECT
'{{ TemplateName }}',
'{{ Description }}',
'{{ Enabled }}',
'{{ ProvisioningRoleArn }}',
'{{ TemplateBody }}',
'{{ TemplateType }}',
'{{ PreProvisioningHook }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: provisioning_template
props:
- name: TemplateName
value: '{{ TemplateName }}'
- name: Description
value: '{{ Description }}'
- name: Enabled
value: '{{ Enabled }}'
- name: ProvisioningRoleArn
value: '{{ ProvisioningRoleArn }}'
- name: TemplateBody
value: '{{ TemplateBody }}'
- name: TemplateType
value: '{{ TemplateType }}'
- name: PreProvisioningHook
value:
TargetArn: '{{ TargetArn }}'
PayloadVersion: '{{ PayloadVersion }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
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