1. Packages
  2. AWS Classic
  3. API Docs
  4. iot
  5. Thing

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.24.0 published on Tuesday, Feb 27, 2024 by Pulumi

aws.iot.Thing

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.24.0 published on Tuesday, Feb 27, 2024 by Pulumi

    Creates and manages an AWS IoT Thing.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.Iot.Thing("example", new()
        {
            Attributes = 
            {
                { "First", "examplevalue" },
            },
        });
    
    });
    
    package main
    
    import (
    	"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 {
    		_, err := iot.NewThing(ctx, "example", &iot.ThingArgs{
    			Attributes: pulumi.StringMap{
    				"First": pulumi.String("examplevalue"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.iot.Thing;
    import com.pulumi.aws.iot.ThingArgs;
    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) {
            var example = new Thing("example", ThingArgs.builder()        
                .attributes(Map.of("First", "examplevalue"))
                .build());
    
        }
    }
    
    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",
    }});
    
    resources:
      example:
        type: aws:iot:Thing
        properties:
          attributes:
            First: examplevalue
    

    Create 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)
    public Thing(String name, ThingArgs args)
    public Thing(String name, ThingArgs args, CustomResourceOptions options)
    
    type: aws:iot:Thing
    properties: # The arguments to resource properties.
    options: # 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.
    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.
    name String
    The unique name of the resource.
    args ThingArgs
    The arguments to resource properties.
    options 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 Architecture and Concepts 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 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.
    attributes Map<String>
    Map of attributes of the thing.
    name String
    The name of the thing.
    thingTypeName String
    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 Integer
    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.
    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.

    Look up 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)
    public static Thing get(String name, Output<String> id, ThingState 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 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 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 Integer
    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.
    arn String
    The ARN of the thing.
    attributes Map<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.

    Import

    Using pulumi import, import IOT Things using the name. For example:

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

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.24.0 published on Tuesday, Feb 27, 2024 by Pulumi