Class CfnThing

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.98.0 (build 00b106d)", date="2024-05-08T21:35:08.373Z") @Stability(Stable) public class CfnThing extends CfnResource implements IInspectable
Use the AWS::IoT::Thing resource to declare an AWS IoT thing.

For information about working with things, see How AWS IoT Works and Device Registry for AWS IoT in the AWS IoT Developer Guide .

Example:

 // 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.*;
 CfnThing cfnThing = CfnThing.Builder.create(this, "MyCfnThing")
         .attributePayload(AttributePayloadProperty.builder()
                 .attributes(Map.of(
                         "attributesKey", "attributes"))
                 .build())
         .thingName("thingName")
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnThing

      protected CfnThing(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnThing

      protected CfnThing(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnThing

      @Stability(Stable) public CfnThing(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable CfnThingProps props)
      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties.
    • CfnThing

      @Stability(Stable) public CfnThing(@NotNull software.constructs.Construct scope, @NotNull String id)
      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrArn

      @Stability(Stable) @NotNull public String getAttrArn()
      The Amazon Resource Name (ARN) of the AWS IoT thing, such as arn:aws:iot:us-east-2:123456789012:thing/MyThing .
    • getAttrId

      @Stability(Stable) @NotNull public String getAttrId()
      The Id of this thing.
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getAttributePayload

      @Stability(Stable) @Nullable public Object getAttributePayload()
      A string that contains up to three key value pairs.
    • setAttributePayload

      @Stability(Stable) public void setAttributePayload(@Nullable IResolvable value)
      A string that contains up to three key value pairs.
    • setAttributePayload

      @Stability(Stable) public void setAttributePayload(@Nullable CfnThing.AttributePayloadProperty value)
      A string that contains up to three key value pairs.
    • getThingName

      @Stability(Stable) @Nullable public String getThingName()
      The name of the thing to update.
    • setThingName

      @Stability(Stable) public void setThingName(@Nullable String value)
      The name of the thing to update.