Class CfnThingGroup

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

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:29:57.632Z") @Stability(Stable) public class CfnThingGroup extends CfnResource implements IInspectable
A CloudFormation AWS::IoT::ThingGroup.

Creates a new thing group. A dynamic thing group is created if the resource template contains the QueryString attribute. A dynamic thing group will not contain the ParentGroupName attribute. A static thing group and dynamic thing group can't be converted to each other via the addition or removal of the QueryString attribute.

This is a control plane operation. See Authorization for information about authorizing control plane actions.

Requires permission to access the CreateThingGroup action.

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.*;
 CfnThingGroup cfnThingGroup = CfnThingGroup.Builder.create(this, "MyCfnThingGroup")
         .parentGroupName("parentGroupName")
         .queryString("queryString")
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .thingGroupName("thingGroupName")
         .thingGroupProperties(ThingGroupPropertiesProperty.builder()
                 .attributePayload(AttributePayloadProperty.builder()
                         .attributes(Map.of(
                                 "attributesKey", "attributes"))
                         .build())
                 .thingGroupDescription("thingGroupDescription")
                 .build())
         .build();
 
  • 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

    • CfnThingGroup

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

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

      @Stability(Stable) public CfnThingGroup(@NotNull Construct scope, @NotNull String id, @Nullable CfnThingGroupProps props)
      Create a new AWS::IoT::ThingGroup.

      Parameters:
      scope -
      • scope in which this resource is defined.
      This parameter is required.
      id -
      • scoped id of the resource.
      This parameter is required.
      props -
      • resource properties.
    • CfnThingGroup

      @Stability(Stable) public CfnThingGroup(@NotNull Construct scope, @NotNull String id)
      Create a new AWS::IoT::ThingGroup.

      Parameters:
      scope -
      • scope in which this resource is defined.
      This parameter is required.
      id -
      • scoped id of the resource.
      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 thing group ARN.
    • getAttrId

      @Stability(Stable) @NotNull public String getAttrId()
      The thing group ID.
    • getCfnProperties

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

      @Stability(Stable) @NotNull public TagManager getTags()
      Metadata which can be used to manage the thing group or dynamic thing group.
    • getParentGroupName

      @Stability(Stable) @Nullable public String getParentGroupName()
      The parent thing group name.

      A Dynamic Thing Group does not have parentGroupName defined.

    • setParentGroupName

      @Stability(Stable) public void setParentGroupName(@Nullable String value)
      The parent thing group name.

      A Dynamic Thing Group does not have parentGroupName defined.

    • getQueryString

      @Stability(Stable) @Nullable public String getQueryString()
      The dynamic thing group search query string.

      The queryString attribute is required for CreateDynamicThingGroup . The queryString attribute is not required for CreateThingGroup .

    • setQueryString

      @Stability(Stable) public void setQueryString(@Nullable String value)
      The dynamic thing group search query string.

      The queryString attribute is required for CreateDynamicThingGroup . The queryString attribute is not required for CreateThingGroup .

    • getThingGroupName

      @Stability(Stable) @Nullable public String getThingGroupName()
      The thing group name.
    • setThingGroupName

      @Stability(Stable) public void setThingGroupName(@Nullable String value)
      The thing group name.
    • getThingGroupProperties

      @Stability(Stable) @Nullable public Object getThingGroupProperties()
      Thing group properties.
    • setThingGroupProperties

      @Stability(Stable) public void setThingGroupProperties(@Nullable IResolvable value)
      Thing group properties.
    • setThingGroupProperties

      @Stability(Stable) public void setThingGroupProperties(@Nullable CfnThingGroup.ThingGroupPropertiesProperty value)
      Thing group properties.