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

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

AWS Classic v6.31.1 published on Thursday, Apr 18, 2024 by Pulumi

aws.iot.ThingType

Explore with Pulumi AI

aws logo

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

AWS Classic v6.31.1 published on Thursday, Apr 18, 2024 by Pulumi

    Creates and manages an AWS IoT Thing Type.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const foo = new aws.iot.ThingType("foo", {name: "my_iot_thing"});
    
    import pulumi
    import pulumi_aws as aws
    
    foo = aws.iot.ThingType("foo", name="my_iot_thing")
    
    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.NewThingType(ctx, "foo", &iot.ThingTypeArgs{
    			Name: pulumi.String("my_iot_thing"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var foo = new Aws.Iot.ThingType("foo", new()
        {
            Name = "my_iot_thing",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.iot.ThingType;
    import com.pulumi.aws.iot.ThingTypeArgs;
    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 foo = new ThingType("foo", ThingTypeArgs.builder()        
                .name("my_iot_thing")
                .build());
    
        }
    }
    
    resources:
      foo:
        type: aws:iot:ThingType
        properties:
          name: my_iot_thing
    

    Create ThingType Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ThingType(name: string, args?: ThingTypeArgs, opts?: CustomResourceOptions);
    @overload
    def ThingType(resource_name: str,
                  args: Optional[ThingTypeArgs] = None,
                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def ThingType(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  deprecated: Optional[bool] = None,
                  name: Optional[str] = None,
                  properties: Optional[ThingTypePropertiesArgs] = None,
                  tags: Optional[Mapping[str, str]] = None)
    func NewThingType(ctx *Context, name string, args *ThingTypeArgs, opts ...ResourceOption) (*ThingType, error)
    public ThingType(string name, ThingTypeArgs? args = null, CustomResourceOptions? opts = null)
    public ThingType(String name, ThingTypeArgs args)
    public ThingType(String name, ThingTypeArgs args, CustomResourceOptions options)
    
    type: aws:iot:ThingType
    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 ThingTypeArgs
    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 ThingTypeArgs
    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 ThingTypeArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ThingTypeArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ThingTypeArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var thingTypeResource = new Aws.Iot.ThingType("thingTypeResource", new()
    {
        Deprecated = false,
        Name = "string",
        Properties = new Aws.Iot.Inputs.ThingTypePropertiesArgs
        {
            Description = "string",
            SearchableAttributes = new[]
            {
                "string",
            },
        },
        Tags = 
        {
            { "string", "string" },
        },
    });
    
    example, err := iot.NewThingType(ctx, "thingTypeResource", &iot.ThingTypeArgs{
    	Deprecated: pulumi.Bool(false),
    	Name:       pulumi.String("string"),
    	Properties: &iot.ThingTypePropertiesArgs{
    		Description: pulumi.String("string"),
    		SearchableAttributes: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    	},
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var thingTypeResource = new ThingType("thingTypeResource", ThingTypeArgs.builder()        
        .deprecated(false)
        .name("string")
        .properties(ThingTypePropertiesArgs.builder()
            .description("string")
            .searchableAttributes("string")
            .build())
        .tags(Map.of("string", "string"))
        .build());
    
    thing_type_resource = aws.iot.ThingType("thingTypeResource",
        deprecated=False,
        name="string",
        properties=aws.iot.ThingTypePropertiesArgs(
            description="string",
            searchable_attributes=["string"],
        ),
        tags={
            "string": "string",
        })
    
    const thingTypeResource = new aws.iot.ThingType("thingTypeResource", {
        deprecated: false,
        name: "string",
        properties: {
            description: "string",
            searchableAttributes: ["string"],
        },
        tags: {
            string: "string",
        },
    });
    
    type: aws:iot:ThingType
    properties:
        deprecated: false
        name: string
        properties:
            description: string
            searchableAttributes:
                - string
        tags:
            string: string
    

    ThingType 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 ThingType resource accepts the following input properties:

    Deprecated bool
    Whether the thing type is deprecated. If true, no new things could be associated with this type.
    Name string
    The name of the thing type.
    Properties ThingTypeProperties
    , Configuration block that can contain the following properties of the thing type:
    Tags Dictionary<string, string>
    Key-value mapping of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level
    Deprecated bool
    Whether the thing type is deprecated. If true, no new things could be associated with this type.
    Name string
    The name of the thing type.
    Properties ThingTypePropertiesArgs
    , Configuration block that can contain the following properties of the thing type:
    Tags map[string]string
    Key-value mapping of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level
    deprecated Boolean
    Whether the thing type is deprecated. If true, no new things could be associated with this type.
    name String
    The name of the thing type.
    properties ThingTypeProperties
    , Configuration block that can contain the following properties of the thing type:
    tags Map<String,String>
    Key-value mapping of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level
    deprecated boolean
    Whether the thing type is deprecated. If true, no new things could be associated with this type.
    name string
    The name of the thing type.
    properties ThingTypeProperties
    , Configuration block that can contain the following properties of the thing type:
    tags {[key: string]: string}
    Key-value mapping of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level
    deprecated bool
    Whether the thing type is deprecated. If true, no new things could be associated with this type.
    name str
    The name of the thing type.
    properties ThingTypePropertiesArgs
    , Configuration block that can contain the following properties of the thing type:
    tags Mapping[str, str]
    Key-value mapping of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level
    deprecated Boolean
    Whether the thing type is deprecated. If true, no new things could be associated with this type.
    name String
    The name of the thing type.
    properties Property Map
    , Configuration block that can contain the following properties of the thing type:
    tags Map<String>
    Key-value mapping of resource tags. 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 ThingType resource produces the following output properties:

    Arn string
    The ARN of the created AWS IoT Thing Type.
    Id string
    The provider-assigned unique ID for this managed resource.
    TagsAll Dictionary<string, string>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Arn string
    The ARN of the created AWS IoT Thing Type.
    Id string
    The provider-assigned unique ID for this managed resource.
    TagsAll map[string]string
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn String
    The ARN of the created AWS IoT Thing Type.
    id String
    The provider-assigned unique ID for this managed resource.
    tagsAll Map<String,String>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn string
    The ARN of the created AWS IoT Thing Type.
    id string
    The provider-assigned unique ID for this managed resource.
    tagsAll {[key: string]: string}
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn str
    The ARN of the created AWS IoT Thing Type.
    id str
    The provider-assigned unique ID for this managed resource.
    tags_all Mapping[str, str]
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn String
    The ARN of the created AWS IoT Thing Type.
    id String
    The provider-assigned unique ID for this managed resource.
    tagsAll Map<String>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Look up Existing ThingType Resource

    Get an existing ThingType 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?: ThingTypeState, opts?: CustomResourceOptions): ThingType
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            arn: Optional[str] = None,
            deprecated: Optional[bool] = None,
            name: Optional[str] = None,
            properties: Optional[ThingTypePropertiesArgs] = None,
            tags: Optional[Mapping[str, str]] = None,
            tags_all: Optional[Mapping[str, str]] = None) -> ThingType
    func GetThingType(ctx *Context, name string, id IDInput, state *ThingTypeState, opts ...ResourceOption) (*ThingType, error)
    public static ThingType Get(string name, Input<string> id, ThingTypeState? state, CustomResourceOptions? opts = null)
    public static ThingType get(String name, Output<String> id, ThingTypeState 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 created AWS IoT Thing Type.
    Deprecated bool
    Whether the thing type is deprecated. If true, no new things could be associated with this type.
    Name string
    The name of the thing type.
    Properties ThingTypeProperties
    , Configuration block that can contain the following properties of the thing type:
    Tags Dictionary<string, string>
    Key-value mapping of resource tags. 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>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Arn string
    The ARN of the created AWS IoT Thing Type.
    Deprecated bool
    Whether the thing type is deprecated. If true, no new things could be associated with this type.
    Name string
    The name of the thing type.
    Properties ThingTypePropertiesArgs
    , Configuration block that can contain the following properties of the thing type:
    Tags map[string]string
    Key-value mapping of resource tags. 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
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn String
    The ARN of the created AWS IoT Thing Type.
    deprecated Boolean
    Whether the thing type is deprecated. If true, no new things could be associated with this type.
    name String
    The name of the thing type.
    properties ThingTypeProperties
    , Configuration block that can contain the following properties of the thing type:
    tags Map<String,String>
    Key-value mapping of resource tags. 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>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn string
    The ARN of the created AWS IoT Thing Type.
    deprecated boolean
    Whether the thing type is deprecated. If true, no new things could be associated with this type.
    name string
    The name of the thing type.
    properties ThingTypeProperties
    , Configuration block that can contain the following properties of the thing type:
    tags {[key: string]: string}
    Key-value mapping of resource tags. 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}
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn str
    The ARN of the created AWS IoT Thing Type.
    deprecated bool
    Whether the thing type is deprecated. If true, no new things could be associated with this type.
    name str
    The name of the thing type.
    properties ThingTypePropertiesArgs
    , Configuration block that can contain the following properties of the thing type:
    tags Mapping[str, str]
    Key-value mapping of resource tags. 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]
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn String
    The ARN of the created AWS IoT Thing Type.
    deprecated Boolean
    Whether the thing type is deprecated. If true, no new things could be associated with this type.
    name String
    The name of the thing type.
    properties Property Map
    , Configuration block that can contain the following properties of the thing type:
    tags Map<String>
    Key-value mapping of resource tags. 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>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Supporting Types

    ThingTypeProperties, ThingTypePropertiesArgs

    Description string
    The description of the thing type.
    SearchableAttributes List<string>
    A list of searchable thing attribute names.
    Description string
    The description of the thing type.
    SearchableAttributes []string
    A list of searchable thing attribute names.
    description String
    The description of the thing type.
    searchableAttributes List<String>
    A list of searchable thing attribute names.
    description string
    The description of the thing type.
    searchableAttributes string[]
    A list of searchable thing attribute names.
    description str
    The description of the thing type.
    searchable_attributes Sequence[str]
    A list of searchable thing attribute names.
    description String
    The description of the thing type.
    searchableAttributes List<String>
    A list of searchable thing attribute names.

    Import

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

    $ pulumi import aws:iot/thingType:ThingType example example
    

    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.
    aws logo

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

    AWS Classic v6.31.1 published on Thursday, Apr 18, 2024 by Pulumi