AWS Native v0.63.0, May 25 23
AWS Native v0.63.0, May 25 23
aws-native.iot.Thing
Explore with Pulumi AI
Resource Type definition for AWS::IoT::Thing
Example Usage
Example
using System.Collections.Generic;
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.Any{
MyAttributeA: myAttributeValueA,
MyAttributeB: myAttributeValueB,
MyAttributeC: 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!
Example
using System.Collections.Generic;
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.Any{
MyAttributeA: myAttributeValueA,
MyAttributeB: myAttributeValueB,
MyAttributeC: 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
new Thing(name: string, args?: ThingArgs, opts?: CustomResourceOptions);
@overload
def Thing(resource_name: str,
opts: Optional[ResourceOptions] = None,
attribute_payload: Optional[ThingAttributePayloadArgs] = None,
thing_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)
type: aws-native: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:
Outputs
All input properties are implicitly available as output properties. Additionally, the Thing resource produces the following output properties:
Supporting Types
ThingAttributePayload
- Attributes object
- Attributes interface{}
- attributes Object
- attributes any
- attributes Any
- attributes Any
Package Details
- Repository
- AWS Native pulumi/pulumi-aws-native
- License
- Apache-2.0