Thing

Creates and manages an AWS IoT Thing.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var example = new Aws.Iot.Thing("example", new Aws.Iot.ThingArgs
        {
            Attributes = 
            {
                { "First", "examplevalue" },
            },
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v4/go/aws/iot"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := iot.NewThing(ctx, "example", &iot.ThingArgs{
			Attributes: pulumi.StringMap{
				"First": pulumi.String("examplevalue"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_aws as aws

example = aws.iot.Thing("example", attributes={
    "First": "examplevalue",
})
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.iot.Thing("example", {
    attributes: {
        First: "examplevalue",
    },
});

Create a Thing Resource

new Thing(name: string, args?: ThingArgs, opts?: CustomResourceOptions);
@overload
def Thing(resource_name: str,
          opts: Optional[ResourceOptions] = None,
          attributes: Optional[Mapping[str, str]] = None,
          name: Optional[str] = None,
          thing_type_name: Optional[str] = None)
@overload
def Thing(resource_name: str,
          args: Optional[ThingArgs] = None,
          opts: Optional[ResourceOptions] = None)
func NewThing(ctx *Context, name string, args *ThingArgs, opts ...ResourceOption) (*Thing, error)
public Thing(string name, ThingArgs? args = null, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args ThingArgs
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 ThingArgs
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 ThingArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ThingArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

Thing Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The Thing resource accepts the following input properties:

Attributes Dictionary<string, string>
Map of attributes of the thing.
Name string
The name of the thing.
ThingTypeName string
The thing type name.
Attributes map[string]string
Map of attributes of the thing.
Name string
The name of the thing.
ThingTypeName string
The thing type name.
attributes {[key: string]: string}
Map of attributes of the thing.
name string
The name of the thing.
thingTypeName string
The thing type name.
attributes Mapping[str, str]
Map of attributes of the thing.
name str
The name of the thing.
thing_type_name str
The thing type name.

Outputs

All input properties are implicitly available as output properties. Additionally, the Thing resource produces the following output properties:

Arn string
The ARN of the thing.
DefaultClientId string
The default client ID.
Id string
The provider-assigned unique ID for this managed resource.
Version int
The current version of the thing record in the registry.
Arn string
The ARN of the thing.
DefaultClientId string
The default client ID.
Id string
The provider-assigned unique ID for this managed resource.
Version int
The current version of the thing record in the registry.
arn string
The ARN of the thing.
defaultClientId string
The default client ID.
id string
The provider-assigned unique ID for this managed resource.
version number
The current version of the thing record in the registry.
arn str
The ARN of the thing.
default_client_id str
The default client ID.
id str
The provider-assigned unique ID for this managed resource.
version int
The current version of the thing record in the registry.

Look up an Existing Thing Resource

Get an existing Thing 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?: ThingState, opts?: CustomResourceOptions): Thing
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        arn: Optional[str] = None,
        attributes: Optional[Mapping[str, str]] = None,
        default_client_id: Optional[str] = None,
        name: Optional[str] = None,
        thing_type_name: Optional[str] = None,
        version: Optional[int] = None) -> Thing
func GetThing(ctx *Context, name string, id IDInput, state *ThingState, opts ...ResourceOption) (*Thing, error)
public static Thing Get(string name, Input<string> id, ThingState? state, CustomResourceOptions? opts = null)
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.

The following state arguments are supported:

Arn string
The ARN of the thing.
Attributes Dictionary<string, string>
Map of attributes of the thing.
DefaultClientId string
The default client ID.
Name string
The name of the thing.
ThingTypeName string
The thing type name.
Version int
The current version of the thing record in the registry.
Arn string
The ARN of the thing.
Attributes map[string]string
Map of attributes of the thing.
DefaultClientId string
The default client ID.
Name string
The name of the thing.
ThingTypeName string
The thing type name.
Version int
The current version of the thing record in the registry.
arn string
The ARN of the thing.
attributes {[key: string]: string}
Map of attributes of the thing.
defaultClientId string
The default client ID.
name string
The name of the thing.
thingTypeName string
The thing type name.
version number
The current version of the thing record in the registry.
arn str
The ARN of the thing.
attributes Mapping[str, str]
Map of attributes of the thing.
default_client_id str
The default client ID.
name str
The name of the thing.
thing_type_name str
The thing type name.
version int
The current version of the thing record in the registry.

Import

IOT Things can be imported using the name, e.g.

 $ pulumi import aws:iot/thing:Thing example example

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.