aws.iot.ProvisioningTemplate
Explore with Pulumi AI
Manages an IoT fleet provisioning template. For more info, see the AWS documentation on fleet provisioning.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const iotAssumeRolePolicy = aws.iam.getPolicyDocument({
statements: [{
actions: ["sts:AssumeRole"],
principals: [{
type: "Service",
identifiers: ["iot.amazonaws.com"],
}],
}],
});
const iotFleetProvisioning = new aws.iam.Role("iot_fleet_provisioning", {
name: "IoTProvisioningServiceRole",
path: "/service-role/",
assumeRolePolicy: iotAssumeRolePolicy.then(iotAssumeRolePolicy => iotAssumeRolePolicy.json),
});
const iotFleetProvisioningRegistration = new aws.iam.RolePolicyAttachment("iot_fleet_provisioning_registration", {
role: iotFleetProvisioning.name,
policyArn: "arn:aws:iam::aws:policy/service-role/AWSIoTThingsRegistration",
});
const devicePolicy = aws.iam.getPolicyDocument({
statements: [{
actions: ["iot:Subscribe"],
resources: ["*"],
}],
});
const devicePolicyPolicy = new aws.iot.Policy("device_policy", {
name: "DevicePolicy",
policy: devicePolicy.then(devicePolicy => devicePolicy.json),
});
const fleet = new aws.iot.ProvisioningTemplate("fleet", {
name: "FleetTemplate",
description: "My provisioning template",
provisioningRoleArn: iotFleetProvisioning.arn,
enabled: true,
templateBody: pulumi.jsonStringify({
Parameters: {
SerialNumber: {
Type: "String",
},
},
Resources: {
certificate: {
Properties: {
CertificateId: {
Ref: "AWS::IoT::Certificate::Id",
},
Status: "Active",
},
Type: "AWS::IoT::Certificate",
},
policy: {
Properties: {
PolicyName: devicePolicyPolicy.name,
},
Type: "AWS::IoT::Policy",
},
},
}),
});
import pulumi
import json
import pulumi_aws as aws
iot_assume_role_policy = aws.iam.get_policy_document(statements=[{
"actions": ["sts:AssumeRole"],
"principals": [{
"type": "Service",
"identifiers": ["iot.amazonaws.com"],
}],
}])
iot_fleet_provisioning = aws.iam.Role("iot_fleet_provisioning",
name="IoTProvisioningServiceRole",
path="/service-role/",
assume_role_policy=iot_assume_role_policy.json)
iot_fleet_provisioning_registration = aws.iam.RolePolicyAttachment("iot_fleet_provisioning_registration",
role=iot_fleet_provisioning.name,
policy_arn="arn:aws:iam::aws:policy/service-role/AWSIoTThingsRegistration")
device_policy = aws.iam.get_policy_document(statements=[{
"actions": ["iot:Subscribe"],
"resources": ["*"],
}])
device_policy_policy = aws.iot.Policy("device_policy",
name="DevicePolicy",
policy=device_policy.json)
fleet = aws.iot.ProvisioningTemplate("fleet",
name="FleetTemplate",
description="My provisioning template",
provisioning_role_arn=iot_fleet_provisioning.arn,
enabled=True,
template_body=pulumi.Output.json_dumps({
"Parameters": {
"SerialNumber": {
"Type": "String",
},
},
"Resources": {
"certificate": {
"Properties": {
"CertificateId": {
"Ref": "AWS::IoT::Certificate::Id",
},
"Status": "Active",
},
"Type": "AWS::IoT::Certificate",
},
"policy": {
"Properties": {
"PolicyName": device_policy_policy.name,
},
"Type": "AWS::IoT::Policy",
},
},
}))
package main
import (
"encoding/json"
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam"
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iot"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
iotAssumeRolePolicy, err := iam.GetPolicyDocument(ctx, &iam.GetPolicyDocumentArgs{
Statements: []iam.GetPolicyDocumentStatement{
{
Actions: []string{
"sts:AssumeRole",
},
Principals: []iam.GetPolicyDocumentStatementPrincipal{
{
Type: "Service",
Identifiers: []string{
"iot.amazonaws.com",
},
},
},
},
},
}, nil)
if err != nil {
return err
}
iotFleetProvisioning, err := iam.NewRole(ctx, "iot_fleet_provisioning", &iam.RoleArgs{
Name: pulumi.String("IoTProvisioningServiceRole"),
Path: pulumi.String("/service-role/"),
AssumeRolePolicy: pulumi.String(iotAssumeRolePolicy.Json),
})
if err != nil {
return err
}
_, err = iam.NewRolePolicyAttachment(ctx, "iot_fleet_provisioning_registration", &iam.RolePolicyAttachmentArgs{
Role: iotFleetProvisioning.Name,
PolicyArn: pulumi.String("arn:aws:iam::aws:policy/service-role/AWSIoTThingsRegistration"),
})
if err != nil {
return err
}
devicePolicy, err := iam.GetPolicyDocument(ctx, &iam.GetPolicyDocumentArgs{
Statements: []iam.GetPolicyDocumentStatement{
{
Actions: []string{
"iot:Subscribe",
},
Resources: []string{
"*",
},
},
},
}, nil)
if err != nil {
return err
}
devicePolicyPolicy, err := iot.NewPolicy(ctx, "device_policy", &iot.PolicyArgs{
Name: pulumi.String("DevicePolicy"),
Policy: pulumi.String(devicePolicy.Json),
})
if err != nil {
return err
}
_, err = iot.NewProvisioningTemplate(ctx, "fleet", &iot.ProvisioningTemplateArgs{
Name: pulumi.String("FleetTemplate"),
Description: pulumi.String("My provisioning template"),
ProvisioningRoleArn: iotFleetProvisioning.Arn,
Enabled: pulumi.Bool(true),
TemplateBody: devicePolicyPolicy.Name.ApplyT(func(name string) (pulumi.String, error) {
var _zero pulumi.String
tmpJSON0, err := json.Marshal(map[string]interface{}{
"Parameters": map[string]interface{}{
"SerialNumber": map[string]interface{}{
"Type": "String",
},
},
"Resources": map[string]interface{}{
"certificate": map[string]interface{}{
"Properties": map[string]interface{}{
"CertificateId": map[string]interface{}{
"Ref": "AWS::IoT::Certificate::Id",
},
"Status": "Active",
},
"Type": "AWS::IoT::Certificate",
},
"policy": map[string]interface{}{
"Properties": map[string]interface{}{
"PolicyName": name,
},
"Type": "AWS::IoT::Policy",
},
},
})
if err != nil {
return _zero, err
}
json0 := string(tmpJSON0)
return pulumi.String(json0), nil
}).(pulumi.StringOutput),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var iotAssumeRolePolicy = Aws.Iam.GetPolicyDocument.Invoke(new()
{
Statements = new[]
{
new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs
{
Actions = new[]
{
"sts:AssumeRole",
},
Principals = new[]
{
new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs
{
Type = "Service",
Identifiers = new[]
{
"iot.amazonaws.com",
},
},
},
},
},
});
var iotFleetProvisioning = new Aws.Iam.Role("iot_fleet_provisioning", new()
{
Name = "IoTProvisioningServiceRole",
Path = "/service-role/",
AssumeRolePolicy = iotAssumeRolePolicy.Apply(getPolicyDocumentResult => getPolicyDocumentResult.Json),
});
var iotFleetProvisioningRegistration = new Aws.Iam.RolePolicyAttachment("iot_fleet_provisioning_registration", new()
{
Role = iotFleetProvisioning.Name,
PolicyArn = "arn:aws:iam::aws:policy/service-role/AWSIoTThingsRegistration",
});
var devicePolicy = Aws.Iam.GetPolicyDocument.Invoke(new()
{
Statements = new[]
{
new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs
{
Actions = new[]
{
"iot:Subscribe",
},
Resources = new[]
{
"*",
},
},
},
});
var devicePolicyPolicy = new Aws.Iot.Policy("device_policy", new()
{
Name = "DevicePolicy",
PolicyDocument = devicePolicy.Apply(getPolicyDocumentResult => getPolicyDocumentResult.Json),
});
var fleet = new Aws.Iot.ProvisioningTemplate("fleet", new()
{
Name = "FleetTemplate",
Description = "My provisioning template",
ProvisioningRoleArn = iotFleetProvisioning.Arn,
Enabled = true,
TemplateBody = Output.JsonSerialize(Output.Create(new Dictionary<string, object?>
{
["Parameters"] = new Dictionary<string, object?>
{
["SerialNumber"] = new Dictionary<string, object?>
{
["Type"] = "String",
},
},
["Resources"] = new Dictionary<string, object?>
{
["certificate"] = new Dictionary<string, object?>
{
["Properties"] = new Dictionary<string, object?>
{
["CertificateId"] = new Dictionary<string, object?>
{
["Ref"] = "AWS::IoT::Certificate::Id",
},
["Status"] = "Active",
},
["Type"] = "AWS::IoT::Certificate",
},
["policy"] = new Dictionary<string, object?>
{
["Properties"] = new Dictionary<string, object?>
{
["PolicyName"] = devicePolicyPolicy.Name,
},
["Type"] = "AWS::IoT::Policy",
},
},
})),
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.iam.IamFunctions;
import com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;
import com.pulumi.aws.iam.Role;
import com.pulumi.aws.iam.RoleArgs;
import com.pulumi.aws.iam.RolePolicyAttachment;
import com.pulumi.aws.iam.RolePolicyAttachmentArgs;
import com.pulumi.aws.iot.Policy;
import com.pulumi.aws.iot.PolicyArgs;
import com.pulumi.aws.iot.ProvisioningTemplate;
import com.pulumi.aws.iot.ProvisioningTemplateArgs;
import static com.pulumi.codegen.internal.Serialization.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var iotAssumeRolePolicy = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()
.statements(GetPolicyDocumentStatementArgs.builder()
.actions("sts:AssumeRole")
.principals(GetPolicyDocumentStatementPrincipalArgs.builder()
.type("Service")
.identifiers("iot.amazonaws.com")
.build())
.build())
.build());
var iotFleetProvisioning = new Role("iotFleetProvisioning", RoleArgs.builder()
.name("IoTProvisioningServiceRole")
.path("/service-role/")
.assumeRolePolicy(iotAssumeRolePolicy.applyValue(getPolicyDocumentResult -> getPolicyDocumentResult.json()))
.build());
var iotFleetProvisioningRegistration = new RolePolicyAttachment("iotFleetProvisioningRegistration", RolePolicyAttachmentArgs.builder()
.role(iotFleetProvisioning.name())
.policyArn("arn:aws:iam::aws:policy/service-role/AWSIoTThingsRegistration")
.build());
final var devicePolicy = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()
.statements(GetPolicyDocumentStatementArgs.builder()
.actions("iot:Subscribe")
.resources("*")
.build())
.build());
var devicePolicyPolicy = new Policy("devicePolicyPolicy", PolicyArgs.builder()
.name("DevicePolicy")
.policy(devicePolicy.applyValue(getPolicyDocumentResult -> getPolicyDocumentResult.json()))
.build());
var fleet = new ProvisioningTemplate("fleet", ProvisioningTemplateArgs.builder()
.name("FleetTemplate")
.description("My provisioning template")
.provisioningRoleArn(iotFleetProvisioning.arn())
.enabled(true)
.templateBody(devicePolicyPolicy.name().applyValue(name -> serializeJson(
jsonObject(
jsonProperty("Parameters", jsonObject(
jsonProperty("SerialNumber", jsonObject(
jsonProperty("Type", "String")
))
)),
jsonProperty("Resources", jsonObject(
jsonProperty("certificate", jsonObject(
jsonProperty("Properties", jsonObject(
jsonProperty("CertificateId", jsonObject(
jsonProperty("Ref", "AWS::IoT::Certificate::Id")
)),
jsonProperty("Status", "Active")
)),
jsonProperty("Type", "AWS::IoT::Certificate")
)),
jsonProperty("policy", jsonObject(
jsonProperty("Properties", jsonObject(
jsonProperty("PolicyName", name)
)),
jsonProperty("Type", "AWS::IoT::Policy")
))
))
))))
.build());
}
}
resources:
iotFleetProvisioning:
type: aws:iam:Role
name: iot_fleet_provisioning
properties:
name: IoTProvisioningServiceRole
path: /service-role/
assumeRolePolicy: ${iotAssumeRolePolicy.json}
iotFleetProvisioningRegistration:
type: aws:iam:RolePolicyAttachment
name: iot_fleet_provisioning_registration
properties:
role: ${iotFleetProvisioning.name}
policyArn: arn:aws:iam::aws:policy/service-role/AWSIoTThingsRegistration
devicePolicyPolicy:
type: aws:iot:Policy
name: device_policy
properties:
name: DevicePolicy
policy: ${devicePolicy.json}
fleet:
type: aws:iot:ProvisioningTemplate
properties:
name: FleetTemplate
description: My provisioning template
provisioningRoleArn: ${iotFleetProvisioning.arn}
enabled: true
templateBody:
fn::toJSON:
Parameters:
SerialNumber:
Type: String
Resources:
certificate:
Properties:
CertificateId:
Ref: AWS::IoT::Certificate::Id
Status: Active
Type: AWS::IoT::Certificate
policy:
Properties:
PolicyName: ${devicePolicyPolicy.name}
Type: AWS::IoT::Policy
variables:
iotAssumeRolePolicy:
fn::invoke:
Function: aws:iam:getPolicyDocument
Arguments:
statements:
- actions:
- sts:AssumeRole
principals:
- type: Service
identifiers:
- iot.amazonaws.com
devicePolicy:
fn::invoke:
Function: aws:iam:getPolicyDocument
Arguments:
statements:
- actions:
- iot:Subscribe
resources:
- '*'
Create ProvisioningTemplate Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ProvisioningTemplate(name: string, args: ProvisioningTemplateArgs, opts?: CustomResourceOptions);
@overload
def ProvisioningTemplate(resource_name: str,
args: ProvisioningTemplateArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ProvisioningTemplate(resource_name: str,
opts: Optional[ResourceOptions] = None,
provisioning_role_arn: Optional[str] = None,
template_body: Optional[str] = None,
description: Optional[str] = None,
enabled: Optional[bool] = None,
name: Optional[str] = None,
pre_provisioning_hook: Optional[ProvisioningTemplatePreProvisioningHookArgs] = None,
tags: Optional[Mapping[str, str]] = None,
type: Optional[str] = None)
func NewProvisioningTemplate(ctx *Context, name string, args ProvisioningTemplateArgs, opts ...ResourceOption) (*ProvisioningTemplate, error)
public ProvisioningTemplate(string name, ProvisioningTemplateArgs args, CustomResourceOptions? opts = null)
public ProvisioningTemplate(String name, ProvisioningTemplateArgs args)
public ProvisioningTemplate(String name, ProvisioningTemplateArgs args, CustomResourceOptions options)
type: aws:iot:ProvisioningTemplate
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ProvisioningTemplateArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ProvisioningTemplateArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ProvisioningTemplateArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ProvisioningTemplateArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ProvisioningTemplateArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var provisioningTemplateResource = new Aws.Iot.ProvisioningTemplate("provisioningTemplateResource", new()
{
ProvisioningRoleArn = "string",
TemplateBody = "string",
Description = "string",
Enabled = false,
Name = "string",
PreProvisioningHook = new Aws.Iot.Inputs.ProvisioningTemplatePreProvisioningHookArgs
{
TargetArn = "string",
PayloadVersion = "string",
},
Tags =
{
{ "string", "string" },
},
Type = "string",
});
example, err := iot.NewProvisioningTemplate(ctx, "provisioningTemplateResource", &iot.ProvisioningTemplateArgs{
ProvisioningRoleArn: pulumi.String("string"),
TemplateBody: pulumi.String("string"),
Description: pulumi.String("string"),
Enabled: pulumi.Bool(false),
Name: pulumi.String("string"),
PreProvisioningHook: &iot.ProvisioningTemplatePreProvisioningHookArgs{
TargetArn: pulumi.String("string"),
PayloadVersion: pulumi.String("string"),
},
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
Type: pulumi.String("string"),
})
var provisioningTemplateResource = new ProvisioningTemplate("provisioningTemplateResource", ProvisioningTemplateArgs.builder()
.provisioningRoleArn("string")
.templateBody("string")
.description("string")
.enabled(false)
.name("string")
.preProvisioningHook(ProvisioningTemplatePreProvisioningHookArgs.builder()
.targetArn("string")
.payloadVersion("string")
.build())
.tags(Map.of("string", "string"))
.type("string")
.build());
provisioning_template_resource = aws.iot.ProvisioningTemplate("provisioningTemplateResource",
provisioning_role_arn="string",
template_body="string",
description="string",
enabled=False,
name="string",
pre_provisioning_hook={
"targetArn": "string",
"payloadVersion": "string",
},
tags={
"string": "string",
},
type="string")
const provisioningTemplateResource = new aws.iot.ProvisioningTemplate("provisioningTemplateResource", {
provisioningRoleArn: "string",
templateBody: "string",
description: "string",
enabled: false,
name: "string",
preProvisioningHook: {
targetArn: "string",
payloadVersion: "string",
},
tags: {
string: "string",
},
type: "string",
});
type: aws:iot:ProvisioningTemplate
properties:
description: string
enabled: false
name: string
preProvisioningHook:
payloadVersion: string
targetArn: string
provisioningRoleArn: string
tags:
string: string
templateBody: string
type: string
ProvisioningTemplate Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The ProvisioningTemplate resource accepts the following input properties:
- Provisioning
Role stringArn - The role ARN for the role associated with the fleet provisioning template. This IoT role grants permission to provision a device.
- Template
Body string - The JSON formatted contents of the fleet provisioning template.
- Description string
- The description of the fleet provisioning template.
- Enabled bool
- True to enable the fleet provisioning template, otherwise false.
- Name string
- The name of the fleet provisioning template.
- Pre
Provisioning ProvisioningHook Template Pre Provisioning Hook - Creates a pre-provisioning hook template. Details below.
- Dictionary<string, string>
- A map of tags to assign to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Type string
- The type you define in a provisioning template.
- Provisioning
Role stringArn - The role ARN for the role associated with the fleet provisioning template. This IoT role grants permission to provision a device.
- Template
Body string - The JSON formatted contents of the fleet provisioning template.
- Description string
- The description of the fleet provisioning template.
- Enabled bool
- True to enable the fleet provisioning template, otherwise false.
- Name string
- The name of the fleet provisioning template.
- Pre
Provisioning ProvisioningHook Template Pre Provisioning Hook Args - Creates a pre-provisioning hook template. Details below.
- map[string]string
- A map of tags to assign to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Type string
- The type you define in a provisioning template.
- provisioning
Role StringArn - The role ARN for the role associated with the fleet provisioning template. This IoT role grants permission to provision a device.
- template
Body String - The JSON formatted contents of the fleet provisioning template.
- description String
- The description of the fleet provisioning template.
- enabled Boolean
- True to enable the fleet provisioning template, otherwise false.
- name String
- The name of the fleet provisioning template.
- pre
Provisioning ProvisioningHook Template Pre Provisioning Hook - Creates a pre-provisioning hook template. Details below.
- Map<String,String>
- A map of tags to assign to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - type String
- The type you define in a provisioning template.
- provisioning
Role stringArn - The role ARN for the role associated with the fleet provisioning template. This IoT role grants permission to provision a device.
- template
Body string - The JSON formatted contents of the fleet provisioning template.
- description string
- The description of the fleet provisioning template.
- enabled boolean
- True to enable the fleet provisioning template, otherwise false.
- name string
- The name of the fleet provisioning template.
- pre
Provisioning ProvisioningHook Template Pre Provisioning Hook - Creates a pre-provisioning hook template. Details below.
- {[key: string]: string}
- A map of tags to assign to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - type string
- The type you define in a provisioning template.
- provisioning_
role_ strarn - The role ARN for the role associated with the fleet provisioning template. This IoT role grants permission to provision a device.
- template_
body str - The JSON formatted contents of the fleet provisioning template.
- description str
- The description of the fleet provisioning template.
- enabled bool
- True to enable the fleet provisioning template, otherwise false.
- name str
- The name of the fleet provisioning template.
- pre_
provisioning_ Provisioninghook Template Pre Provisioning Hook Args - Creates a pre-provisioning hook template. Details below.
- Mapping[str, str]
- A map of tags to assign to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - type str
- The type you define in a provisioning template.
- provisioning
Role StringArn - The role ARN for the role associated with the fleet provisioning template. This IoT role grants permission to provision a device.
- template
Body String - The JSON formatted contents of the fleet provisioning template.
- description String
- The description of the fleet provisioning template.
- enabled Boolean
- True to enable the fleet provisioning template, otherwise false.
- name String
- The name of the fleet provisioning template.
- pre
Provisioning Property MapHook - Creates a pre-provisioning hook template. Details below.
- Map<String>
- A map of tags to assign to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - type String
- The type you define in a provisioning template.
Outputs
All input properties are implicitly available as output properties. Additionally, the ProvisioningTemplate resource produces the following output properties:
- Arn string
- The ARN that identifies the provisioning template.
- Default
Version intId - The default version of the fleet provisioning template.
- Id string
- The provider-assigned unique ID for this managed resource.
- Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- Arn string
- The ARN that identifies the provisioning template.
- Default
Version intId - The default version of the fleet provisioning template.
- Id string
- The provider-assigned unique ID for this managed resource.
- map[string]string
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn String
- The ARN that identifies the provisioning template.
- default
Version IntegerId - The default version of the fleet provisioning template.
- id String
- The provider-assigned unique ID for this managed resource.
- Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn string
- The ARN that identifies the provisioning template.
- default
Version numberId - The default version of the fleet provisioning template.
- id string
- The provider-assigned unique ID for this managed resource.
- {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn str
- The ARN that identifies the provisioning template.
- default_
version_ intid - The default version of the fleet provisioning template.
- id str
- The provider-assigned unique ID for this managed resource.
- Mapping[str, str]
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn String
- The ARN that identifies the provisioning template.
- default
Version NumberId - The default version of the fleet provisioning template.
- id String
- The provider-assigned unique ID for this managed resource.
- Map<String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
Look up Existing ProvisioningTemplate Resource
Get an existing ProvisioningTemplate resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ProvisioningTemplateState, opts?: CustomResourceOptions): ProvisioningTemplate
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
arn: Optional[str] = None,
default_version_id: Optional[int] = None,
description: Optional[str] = None,
enabled: Optional[bool] = None,
name: Optional[str] = None,
pre_provisioning_hook: Optional[ProvisioningTemplatePreProvisioningHookArgs] = None,
provisioning_role_arn: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
tags_all: Optional[Mapping[str, str]] = None,
template_body: Optional[str] = None,
type: Optional[str] = None) -> ProvisioningTemplate
func GetProvisioningTemplate(ctx *Context, name string, id IDInput, state *ProvisioningTemplateState, opts ...ResourceOption) (*ProvisioningTemplate, error)
public static ProvisioningTemplate Get(string name, Input<string> id, ProvisioningTemplateState? state, CustomResourceOptions? opts = null)
public static ProvisioningTemplate get(String name, Output<String> id, ProvisioningTemplateState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Arn string
- The ARN that identifies the provisioning template.
- Default
Version intId - The default version of the fleet provisioning template.
- Description string
- The description of the fleet provisioning template.
- Enabled bool
- True to enable the fleet provisioning template, otherwise false.
- Name string
- The name of the fleet provisioning template.
- Pre
Provisioning ProvisioningHook Template Pre Provisioning Hook - Creates a pre-provisioning hook template. Details below.
- Provisioning
Role stringArn - The role ARN for the role associated with the fleet provisioning template. This IoT role grants permission to provision a device.
- Dictionary<string, string>
- A map of tags to assign to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - Template
Body string - The JSON formatted contents of the fleet provisioning template.
- Type string
- The type you define in a provisioning template.
- Arn string
- The ARN that identifies the provisioning template.
- Default
Version intId - The default version of the fleet provisioning template.
- Description string
- The description of the fleet provisioning template.
- Enabled bool
- True to enable the fleet provisioning template, otherwise false.
- Name string
- The name of the fleet provisioning template.
- Pre
Provisioning ProvisioningHook Template Pre Provisioning Hook Args - Creates a pre-provisioning hook template. Details below.
- Provisioning
Role stringArn - The role ARN for the role associated with the fleet provisioning template. This IoT role grants permission to provision a device.
- map[string]string
- A map of tags to assign to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - map[string]string
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - Template
Body string - The JSON formatted contents of the fleet provisioning template.
- Type string
- The type you define in a provisioning template.
- arn String
- The ARN that identifies the provisioning template.
- default
Version IntegerId - The default version of the fleet provisioning template.
- description String
- The description of the fleet provisioning template.
- enabled Boolean
- True to enable the fleet provisioning template, otherwise false.
- name String
- The name of the fleet provisioning template.
- pre
Provisioning ProvisioningHook Template Pre Provisioning Hook - Creates a pre-provisioning hook template. Details below.
- provisioning
Role StringArn - The role ARN for the role associated with the fleet provisioning template. This IoT role grants permission to provision a device.
- Map<String,String>
- A map of tags to assign to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - template
Body String - The JSON formatted contents of the fleet provisioning template.
- type String
- The type you define in a provisioning template.
- arn string
- The ARN that identifies the provisioning template.
- default
Version numberId - The default version of the fleet provisioning template.
- description string
- The description of the fleet provisioning template.
- enabled boolean
- True to enable the fleet provisioning template, otherwise false.
- name string
- The name of the fleet provisioning template.
- pre
Provisioning ProvisioningHook Template Pre Provisioning Hook - Creates a pre-provisioning hook template. Details below.
- provisioning
Role stringArn - The role ARN for the role associated with the fleet provisioning template. This IoT role grants permission to provision a device.
- {[key: string]: string}
- A map of tags to assign to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - template
Body string - The JSON formatted contents of the fleet provisioning template.
- type string
- The type you define in a provisioning template.
- arn str
- The ARN that identifies the provisioning template.
- default_
version_ intid - The default version of the fleet provisioning template.
- description str
- The description of the fleet provisioning template.
- enabled bool
- True to enable the fleet provisioning template, otherwise false.
- name str
- The name of the fleet provisioning template.
- pre_
provisioning_ Provisioninghook Template Pre Provisioning Hook Args - Creates a pre-provisioning hook template. Details below.
- provisioning_
role_ strarn - The role ARN for the role associated with the fleet provisioning template. This IoT role grants permission to provision a device.
- Mapping[str, str]
- A map of tags to assign to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Mapping[str, str]
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - template_
body str - The JSON formatted contents of the fleet provisioning template.
- type str
- The type you define in a provisioning template.
- arn String
- The ARN that identifies the provisioning template.
- default
Version NumberId - The default version of the fleet provisioning template.
- description String
- The description of the fleet provisioning template.
- enabled Boolean
- True to enable the fleet provisioning template, otherwise false.
- name String
- The name of the fleet provisioning template.
- pre
Provisioning Property MapHook - Creates a pre-provisioning hook template. Details below.
- provisioning
Role StringArn - The role ARN for the role associated with the fleet provisioning template. This IoT role grants permission to provision a device.
- Map<String>
- A map of tags to assign to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Map<String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - template
Body String - The JSON formatted contents of the fleet provisioning template.
- type String
- The type you define in a provisioning template.
Supporting Types
ProvisioningTemplatePreProvisioningHook, ProvisioningTemplatePreProvisioningHookArgs
- Target
Arn string - The ARN of the target function.
- Payload
Version string - The version of the payload that was sent to the target function. The only valid (and the default) payload version is
"2020-04-01"
.
- Target
Arn string - The ARN of the target function.
- Payload
Version string - The version of the payload that was sent to the target function. The only valid (and the default) payload version is
"2020-04-01"
.
- target
Arn String - The ARN of the target function.
- payload
Version String - The version of the payload that was sent to the target function. The only valid (and the default) payload version is
"2020-04-01"
.
- target
Arn string - The ARN of the target function.
- payload
Version string - The version of the payload that was sent to the target function. The only valid (and the default) payload version is
"2020-04-01"
.
- target_
arn str - The ARN of the target function.
- payload_
version str - The version of the payload that was sent to the target function. The only valid (and the default) payload version is
"2020-04-01"
.
- target
Arn String - The ARN of the target function.
- payload
Version String - The version of the payload that was sent to the target function. The only valid (and the default) payload version is
"2020-04-01"
.
Import
Using pulumi import
, import IoT fleet provisioning templates using the name
. For example:
$ pulumi import aws:iot/provisioningTemplate:ProvisioningTemplate fleet FleetProvisioningTemplate
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.