AWS Classic

Pulumi Official
Package maintained by Pulumi
v5.10.0 published on Monday, Jul 11, 2022 by Pulumi

ProvisioningTemplate

Manages an IoT fleet provisioning template. For more info, see the AWS documentation on fleet provisioning.

Example Usage

using System.Collections.Generic;
using System.Text.Json;
using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var iotAssumeRolePolicy = Output.Create(Aws.Iam.GetPolicyDocument.InvokeAsync(new Aws.Iam.GetPolicyDocumentArgs
        {
            Statements = 
            {
                new Aws.Iam.Inputs.GetPolicyDocumentStatementArgs
                {
                    Actions = 
                    {
                        "sts:AssumeRole",
                    },
                    Principals = 
                    {
                        new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalArgs
                        {
                            Type = "Service",
                            Identifiers = 
                            {
                                "iot.amazonaws.com",
                            },
                        },
                    },
                },
            },
        }));
        var iotFleetProvisioning = new Aws.Iam.Role("iotFleetProvisioning", new Aws.Iam.RoleArgs
        {
            Path = "/service-role/",
            AssumeRolePolicy = iotAssumeRolePolicy.Apply(iotAssumeRolePolicy => iotAssumeRolePolicy.Json),
        });
        var iotFleetProvisioningRegistration = new Aws.Iam.RolePolicyAttachment("iotFleetProvisioningRegistration", new Aws.Iam.RolePolicyAttachmentArgs
        {
            Role = iotFleetProvisioning.Name,
            PolicyArn = "arn:aws:iam::aws:policy/service-role/AWSIoTThingsRegistration",
        });
        var devicePolicyPolicyDocument = Output.Create(Aws.Iam.GetPolicyDocument.InvokeAsync(new Aws.Iam.GetPolicyDocumentArgs
        {
            Statements = 
            {
                new Aws.Iam.Inputs.GetPolicyDocumentStatementArgs
                {
                    Actions = 
                    {
                        "iot:Subscribe",
                    },
                    Resources = 
                    {
                        "*",
                    },
                },
            },
        }));
        var devicePolicyPolicy = new Aws.Iot.Policy("devicePolicyPolicy", new Aws.Iot.PolicyArgs
        {
            Policy = devicePolicyPolicyDocument.Apply(devicePolicyPolicyDocument => devicePolicyPolicyDocument.Json),
        });
        var fleet = new Aws.Iot.ProvisioningTemplate("fleet", new Aws.Iot.ProvisioningTemplateArgs
        {
            Description = "My provisioning template",
            ProvisioningRoleArn = iotFleetProvisioning.Arn,
            TemplateBody = devicePolicyPolicy.Name.Apply(name => JsonSerializer.Serialize(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", name },
                        } },
                        { "Type", "AWS::IoT::Policy" },
                    } },
                } },
            })),
        });
    }

}
package main

import (
	"encoding/json"

	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/iam"
	"github.com/pulumi/pulumi-aws/sdk/v5/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{
				iam.GetPolicyDocumentStatement{
					Actions: []string{
						"sts:AssumeRole",
					},
					Principals: []iam.GetPolicyDocumentStatementPrincipal{
						iam.GetPolicyDocumentStatementPrincipal{
							Type: "Service",
							Identifiers: []string{
								"iot.amazonaws.com",
							},
						},
					},
				},
			},
		}, nil)
		if err != nil {
			return err
		}
		iotFleetProvisioning, err := iam.NewRole(ctx, "iotFleetProvisioning", &iam.RoleArgs{
			Path:             pulumi.String("/service-role/"),
			AssumeRolePolicy: pulumi.String(iotAssumeRolePolicy.Json),
		})
		if err != nil {
			return err
		}
		_, err = iam.NewRolePolicyAttachment(ctx, "iotFleetProvisioningRegistration", &iam.RolePolicyAttachmentArgs{
			Role:      iotFleetProvisioning.Name,
			PolicyArn: pulumi.String("arn:aws:iam::aws:policy/service-role/AWSIoTThingsRegistration"),
		})
		if err != nil {
			return err
		}
		devicePolicyPolicyDocument, err := iam.GetPolicyDocument(ctx, &iam.GetPolicyDocumentArgs{
			Statements: []iam.GetPolicyDocumentStatement{
				iam.GetPolicyDocumentStatement{
					Actions: []string{
						"iot:Subscribe",
					},
					Resources: []string{
						"*",
					},
				},
			},
		}, nil)
		if err != nil {
			return err
		}
		devicePolicyPolicy, err := iot.NewPolicy(ctx, "devicePolicyPolicy", &iot.PolicyArgs{
			Policy: pulumi.String(devicePolicyPolicyDocument.Json),
		})
		if err != nil {
			return err
		}
		_, err = iot.NewProvisioningTemplate(ctx, "fleet", &iot.ProvisioningTemplateArgs{
			Description:         pulumi.String("My provisioning template"),
			ProvisioningRoleArn: iotFleetProvisioning.Arn,
			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 json0, nil
			}).(pulumi.StringOutput),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;
import static com.pulumi.codegen.internal.Serialization.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var iotAssumeRolePolicy = Output.of(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()        
            .path("/service-role/")
            .assumeRolePolicy(iotAssumeRolePolicy.apply(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 devicePolicyPolicyDocument = Output.of(IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()
            .statements(GetPolicyDocumentStatementArgs.builder()
                .actions("iot:Subscribe")
                .resources("*")
                .build())
            .build()));

        var devicePolicyPolicy = new Policy("devicePolicyPolicy", PolicyArgs.builder()        
            .policy(devicePolicyPolicyDocument.apply(getPolicyDocumentResult -> getPolicyDocumentResult.json()))
            .build());

        var fleet = new ProvisioningTemplate("fleet", ProvisioningTemplateArgs.builder()        
            .description("My provisioning template")
            .provisioningRoleArn(iotFleetProvisioning.arn())
            .templateBody(devicePolicyPolicy.name().apply(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());

    }
}
import pulumi
import json
import pulumi_aws as aws

iot_assume_role_policy = aws.iam.get_policy_document(statements=[aws.iam.GetPolicyDocumentStatementArgs(
    actions=["sts:AssumeRole"],
    principals=[aws.iam.GetPolicyDocumentStatementPrincipalArgs(
        type="Service",
        identifiers=["iot.amazonaws.com"],
    )],
)])
iot_fleet_provisioning = aws.iam.Role("iotFleetProvisioning",
    path="/service-role/",
    assume_role_policy=iot_assume_role_policy.json)
iot_fleet_provisioning_registration = aws.iam.RolePolicyAttachment("iotFleetProvisioningRegistration",
    role=iot_fleet_provisioning.name,
    policy_arn="arn:aws:iam::aws:policy/service-role/AWSIoTThingsRegistration")
device_policy_policy_document = aws.iam.get_policy_document(statements=[aws.iam.GetPolicyDocumentStatementArgs(
    actions=["iot:Subscribe"],
    resources=["*"],
)])
device_policy_policy = aws.iot.Policy("devicePolicyPolicy", policy=device_policy_policy_document.json)
fleet = aws.iot.ProvisioningTemplate("fleet",
    description="My provisioning template",
    provisioning_role_arn=iot_fleet_provisioning.arn,
    template_body=device_policy_policy.name.apply(lambda name: json.dumps({
        "Parameters": {
            "SerialNumber": {
                "Type": "String",
            },
        },
        "Resources": {
            "certificate": {
                "Properties": {
                    "CertificateId": {
                        "Ref": "AWS::IoT::Certificate::Id",
                    },
                    "Status": "Active",
                },
                "Type": "AWS::IoT::Certificate",
            },
            "policy": {
                "Properties": {
                    "PolicyName": name,
                },
                "Type": "AWS::IoT::Policy",
            },
        },
    })))
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("iotFleetProvisioning", {
    path: "/service-role/",
    assumeRolePolicy: iotAssumeRolePolicy.then(iotAssumeRolePolicy => iotAssumeRolePolicy.json),
});
const iotFleetProvisioningRegistration = new aws.iam.RolePolicyAttachment("iotFleetProvisioningRegistration", {
    role: iotFleetProvisioning.name,
    policyArn: "arn:aws:iam::aws:policy/service-role/AWSIoTThingsRegistration",
});
const devicePolicyPolicyDocument = aws.iam.getPolicyDocument({
    statements: [{
        actions: ["iot:Subscribe"],
        resources: ["*"],
    }],
});
const devicePolicyPolicy = new aws.iot.Policy("devicePolicyPolicy", {policy: devicePolicyPolicyDocument.then(devicePolicyPolicyDocument => devicePolicyPolicyDocument.json)});
const fleet = new aws.iot.ProvisioningTemplate("fleet", {
    description: "My provisioning template",
    provisioningRoleArn: iotFleetProvisioning.arn,
    templateBody: devicePolicyPolicy.name.apply(name => JSON.stringify({
        Parameters: {
            SerialNumber: {
                Type: "String",
            },
        },
        Resources: {
            certificate: {
                Properties: {
                    CertificateId: {
                        Ref: "AWS::IoT::Certificate::Id",
                    },
                    Status: "Active",
                },
                Type: "AWS::IoT::Certificate",
            },
            policy: {
                Properties: {
                    PolicyName: name,
                },
                Type: "AWS::IoT::Policy",
            },
        },
    })),
});
resources:
  iotFleetProvisioning:
    type: aws:iam:Role
    properties:
      path: /service-role/
      assumeRolePolicy: ${iotAssumeRolePolicy.json}
  iotFleetProvisioningRegistration:
    type: aws:iam:RolePolicyAttachment
    properties:
      role: ${iotFleetProvisioning.name}
      policyArn: arn:aws:iam::aws:policy/service-role/AWSIoTThingsRegistration
  devicePolicyPolicy:
    type: aws:iot:Policy
    properties:
      policy: ${devicePolicyPolicyDocument.json}
  fleet:
    type: aws:iot:ProvisioningTemplate
    properties:
      description: My provisioning template
      provisioningRoleArn: ${iotFleetProvisioning.arn}
      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
  devicePolicyPolicyDocument:
    Fn::Invoke:
      Function: aws:iam:getPolicyDocument
      Arguments:
        statements:
          - actions:
              - iot:Subscribe
            resources:
              - '*'

Create a ProvisioningTemplate Resource

new ProvisioningTemplate(name: string, args: ProvisioningTemplateArgs, opts?: CustomResourceOptions);
@overload
def ProvisioningTemplate(resource_name: str,
                         opts: Optional[ResourceOptions] = 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,
                         template_body: Optional[str] = None)
@overload
def ProvisioningTemplate(resource_name: str,
                         args: ProvisioningTemplateArgs,
                         opts: Optional[ResourceOptions] = 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.

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.

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:

ProvisioningRoleArn string

The role ARN for the role associated with the fleet provisioning template. This IoT role grants permission to provision a device.

TemplateBody 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.

PreProvisioningHook ProvisioningTemplatePreProvisioningHookArgs

Creates a pre-provisioning hook template. Details below.

Tags 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.

ProvisioningRoleArn string

The role ARN for the role associated with the fleet provisioning template. This IoT role grants permission to provision a device.

TemplateBody 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.

PreProvisioningHook ProvisioningTemplatePreProvisioningHookArgs

Creates a pre-provisioning hook template. Details below.

Tags 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.

provisioningRoleArn String

The role ARN for the role associated with the fleet provisioning template. This IoT role grants permission to provision a device.

templateBody 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.

preProvisioningHook ProvisioningTemplatePreProvisioningHookArgs

Creates a pre-provisioning hook template. Details below.

tags 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.

provisioningRoleArn string

The role ARN for the role associated with the fleet provisioning template. This IoT role grants permission to provision a device.

templateBody 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.

preProvisioningHook ProvisioningTemplatePreProvisioningHookArgs

Creates a pre-provisioning hook template. Details below.

tags {[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.

provisioning_role_arn str

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_hook ProvisioningTemplatePreProvisioningHookArgs

Creates a pre-provisioning hook template. Details below.

tags 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.

provisioningRoleArn String

The role ARN for the role associated with the fleet provisioning template. This IoT role grants permission to provision a device.

templateBody 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.

preProvisioningHook Property Map

Creates a pre-provisioning hook template. Details below.

tags 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.

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.

DefaultVersionId int

The default version of the fleet provisioning template.

Id string

The provider-assigned unique ID for this managed resource.

TagsAll 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.

DefaultVersionId int

The default version of the fleet provisioning template.

Id string

The provider-assigned unique ID for this managed resource.

TagsAll 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.

defaultVersionId Integer

The default version of the fleet provisioning template.

id String

The provider-assigned unique ID for this managed resource.

tagsAll 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.

defaultVersionId number

The default version of the fleet provisioning template.

id string

The provider-assigned unique ID for this managed resource.

tagsAll {[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_id int

The default version of the fleet provisioning template.

id str

The provider-assigned unique ID for this managed resource.

tags_all 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.

defaultVersionId Number

The default version of the fleet provisioning template.

id String

The provider-assigned unique ID for this managed resource.

tagsAll Map<String>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Look up an 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) -> 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.
The following state arguments are supported:
Arn string

The ARN that identifies the provisioning template.

DefaultVersionId int

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.

PreProvisioningHook ProvisioningTemplatePreProvisioningHookArgs

Creates a pre-provisioning hook template. Details below.

ProvisioningRoleArn string

The role ARN for the role associated with the fleet provisioning template. This IoT role grants permission to provision a device.

Tags 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.

TagsAll Dictionary<string, string>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

TemplateBody string

The JSON formatted contents of the fleet provisioning template.

Arn string

The ARN that identifies the provisioning template.

DefaultVersionId int

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.

PreProvisioningHook ProvisioningTemplatePreProvisioningHookArgs

Creates a pre-provisioning hook template. Details below.

ProvisioningRoleArn string

The role ARN for the role associated with the fleet provisioning template. This IoT role grants permission to provision a device.

Tags 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.

TagsAll map[string]string

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

TemplateBody string

The JSON formatted contents of the fleet provisioning template.

arn String

The ARN that identifies the provisioning template.

defaultVersionId Integer

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.

preProvisioningHook ProvisioningTemplatePreProvisioningHookArgs

Creates a pre-provisioning hook template. Details below.

provisioningRoleArn String

The role ARN for the role associated with the fleet provisioning template. This IoT role grants permission to provision a device.

tags 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.

tagsAll Map<String,String>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

templateBody String

The JSON formatted contents of the fleet provisioning template.

arn string

The ARN that identifies the provisioning template.

defaultVersionId number

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.

preProvisioningHook ProvisioningTemplatePreProvisioningHookArgs

Creates a pre-provisioning hook template. Details below.

provisioningRoleArn string

The role ARN for the role associated with the fleet provisioning template. This IoT role grants permission to provision a device.

tags {[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.

tagsAll {[key: string]: string}

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

templateBody string

The JSON formatted contents of the fleet provisioning template.

arn str

The ARN that identifies the provisioning template.

default_version_id int

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_hook ProvisioningTemplatePreProvisioningHookArgs

Creates a pre-provisioning hook template. Details below.

provisioning_role_arn str

The role ARN for the role associated with the fleet provisioning template. This IoT role grants permission to provision a device.

tags 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.

tags_all 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.

arn String

The ARN that identifies the provisioning template.

defaultVersionId Number

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.

preProvisioningHook Property Map

Creates a pre-provisioning hook template. Details below.

provisioningRoleArn String

The role ARN for the role associated with the fleet provisioning template. This IoT role grants permission to provision a device.

tags 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.

tagsAll Map<String>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

templateBody String

The JSON formatted contents of the fleet provisioning template.

Supporting Types

ProvisioningTemplatePreProvisioningHook

TargetArn string
PayloadVersion 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".

TargetArn string
PayloadVersion 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".

targetArn String
payloadVersion 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".

targetArn string
payloadVersion 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
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".

targetArn String
payloadVersion 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

IoT fleet provisioning templates can be imported using the name, e.g.

 $ pulumi import aws:iot/provisioningTemplate:ProvisioningTemplate fleet FleetProvisioningTemplate

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes

This Pulumi package is based on the aws Terraform Provider.