CfnThingProps Struct
Properties for defining a CfnThing.
| Source |
|---|
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_iot as iot } from 'aws-cdk-lib';
const cfnThingProps: iot.CfnThingProps = {
attributePayload: {
attributes: {
attributesKey: 'attributes',
},
},
thingName: 'thingName',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_iot as iot
cfn_thing_props = iot.CfnThingProps(
attribute_payload=iot.CfnThing.AttributePayloadProperty(
attributes={
"attributes_key": "attributes"
}
),
thing_name="thingName"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.iot.*;
CfnThingProps cfnThingProps = CfnThingProps.builder()
.attributePayload(AttributePayloadProperty.builder()
.attributes(Map.of(
"attributesKey", "attributes"))
.build())
.thingName("thingName")
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.IoT;
var cfnThingProps = new CfnThingProps {
AttributePayload = new AttributePayloadProperty {
Attributes = new Dictionary<string, string> {
{ "attributesKey", "attributes" }
}
},
ThingName = "thingName"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
cfnThingProps := &CfnThingProps{
AttributePayload: &AttributePayloadProperty{
Attributes: map[string]*string{
"attributesKey": jsii.String("attributes"),
},
},
ThingName: jsii.String("thingName"),
}
Properties
attributePayloadoptionalIResolvable | CfnThing.attribute_payloadoptionaltyping.Union[IResolvable, AttributePayloadProperty]attributePayloadoptionalIResolvableAttributePayloadoptionalIResolvableAttributePayloadoptionalinterface{} #A string that contains up to three key value pairs.
Maximum length of 800. Duplicates not allowed.
thingNameoptionalstringthing_nameoptionalstrthingNameoptionalStringThingNameoptionalstringThingNameoptional*string #The name of the thing to update.
You can't change a thing's name. To change a thing's name, you must create a new thing, give it the new name, and then delete the old thing.