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

AWS Native is in preview. AWS Classic is fully supported.

AWS Native v0.103.0 published on Monday, Apr 22, 2024 by Pulumi

aws-native.iot.Thing

Explore with Pulumi AI

aws-native logo

AWS Native is in preview. AWS Classic is fully supported.

AWS Native v0.103.0 published on Monday, Apr 22, 2024 by Pulumi

    Resource Type definition for AWS::IoT::Thing

    Example Usage

    Example

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AwsNative = Pulumi.AwsNative;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var nameParameter = config.Require("nameParameter");
        var myAttributeValueA = config.Get("myAttributeValueA") ?? "myStringA123";
        var myAttributeValueB = config.Get("myAttributeValueB") ?? "myStringB123";
        var myAttributeValueC = config.Get("myAttributeValueC") ?? "myStringC123";
        var myThing = new AwsNative.IoT.Thing("myThing", new()
        {
            ThingName = nameParameter,
            AttributePayload = new AwsNative.IoT.Inputs.ThingAttributePayloadArgs
            {
                Attributes = 
                {
                    { "myAttributeA", myAttributeValueA },
                    { "myAttributeB", myAttributeValueB },
                    { "myAttributeC", myAttributeValueC },
                },
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/iot"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		nameParameter := cfg.Require("nameParameter")
    		myAttributeValueA := "myStringA123"
    		if param := cfg.Get("myAttributeValueA"); param != "" {
    			myAttributeValueA = param
    		}
    		myAttributeValueB := "myStringB123"
    		if param := cfg.Get("myAttributeValueB"); param != "" {
    			myAttributeValueB = param
    		}
    		myAttributeValueC := "myStringC123"
    		if param := cfg.Get("myAttributeValueC"); param != "" {
    			myAttributeValueC = param
    		}
    		_, err := iot.NewThing(ctx, "myThing", &iot.ThingArgs{
    			ThingName: pulumi.String(nameParameter),
    			AttributePayload: &iot.ThingAttributePayloadArgs{
    				Attributes: pulumi.StringMap{
    					"myAttributeA": pulumi.String(myAttributeValueA),
    					"myAttributeB": pulumi.String(myAttributeValueB),
    					"myAttributeC": pulumi.String(myAttributeValueC),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Coming soon!

    import pulumi
    import pulumi_aws_native as aws_native
    
    config = pulumi.Config()
    name_parameter = config.require("nameParameter")
    my_attribute_value_a = config.get("myAttributeValueA")
    if my_attribute_value_a is None:
        my_attribute_value_a = "myStringA123"
    my_attribute_value_b = config.get("myAttributeValueB")
    if my_attribute_value_b is None:
        my_attribute_value_b = "myStringB123"
    my_attribute_value_c = config.get("myAttributeValueC")
    if my_attribute_value_c is None:
        my_attribute_value_c = "myStringC123"
    my_thing = aws_native.iot.Thing("myThing",
        thing_name=name_parameter,
        attribute_payload=aws_native.iot.ThingAttributePayloadArgs(
            attributes={
                "myAttributeA": my_attribute_value_a,
                "myAttributeB": my_attribute_value_b,
                "myAttributeC": my_attribute_value_c,
            },
        ))
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws_native from "@pulumi/aws-native";
    
    const config = new pulumi.Config();
    const nameParameter = config.require("nameParameter");
    const myAttributeValueA = config.get("myAttributeValueA") || "myStringA123";
    const myAttributeValueB = config.get("myAttributeValueB") || "myStringB123";
    const myAttributeValueC = config.get("myAttributeValueC") || "myStringC123";
    const myThing = new aws_native.iot.Thing("myThing", {
        thingName: nameParameter,
        attributePayload: {
            attributes: {
                myAttributeA: myAttributeValueA,
                myAttributeB: myAttributeValueB,
                myAttributeC: myAttributeValueC,
            },
        },
    });
    

    Coming soon!

    Create Thing Resource

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

    Constructor syntax

    new Thing(name: string, args?: ThingArgs, opts?: CustomResourceOptions);
    @overload
    def Thing(resource_name: str,
              args: Optional[ThingArgs] = None,
              opts: Optional[ResourceOptions] = None)
    
    @overload
    def Thing(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              attribute_payload: Optional[ThingAttributePayloadArgs] = None,
              thing_name: Optional[str] = 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-native:iot:Thing
    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 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.

    Example

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

    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    const thingResource = new aws_native.iot.Thing("thingResource", {
        attributePayload: {
            attributes: {
                string: "string",
            },
        },
        thingName: "string",
    });
    
    Coming soon!
    

    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:

    Outputs

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

    Arn string
    AwsId string
    Id string
    The provider-assigned unique ID for this managed resource.
    Arn string
    AwsId string
    Id string
    The provider-assigned unique ID for this managed resource.
    arn String
    awsId String
    id String
    The provider-assigned unique ID for this managed resource.
    arn string
    awsId string
    id string
    The provider-assigned unique ID for this managed resource.
    arn str
    aws_id str
    id str
    The provider-assigned unique ID for this managed resource.
    arn String
    awsId String
    id String
    The provider-assigned unique ID for this managed resource.

    Supporting Types

    ThingAttributePayload, ThingAttributePayloadArgs

    Attributes Dictionary<string, string>
    Attributes map[string]string
    attributes Map<String,String>
    attributes {[key: string]: string}
    attributes Mapping[str, str]
    attributes Map<String>

    Package Details

    Repository
    AWS Native pulumi/pulumi-aws-native
    License
    Apache-2.0
    aws-native logo

    AWS Native is in preview. AWS Classic is fully supported.

    AWS Native v0.103.0 published on Monday, Apr 22, 2024 by Pulumi