Class CfnThingGroup

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

@Generated(value="jsii-pacmak/1.101.0 (build b95fe5d)", date="2024-08-02T00:29:12.104Z") @Stability(Stable) public class CfnThingGroup extends CfnResource implements IInspectable, ITaggable
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();
 

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

    • CfnThingGroup

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

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

      @Stability(Stable) public CfnThingGroup(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable CfnThingGroupProps 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.
    • CfnThingGroup

      @Stability(Stable) public CfnThingGroup(@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 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()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getTags in interface ITaggable
    • getParentGroupName

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

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

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

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

      @Stability(Stable) @Nullable public List<CfnTag> getTagsRaw()
      Metadata which can be used to manage the thing group or dynamic thing group.
    • setTagsRaw

      @Stability(Stable) public void setTagsRaw(@Nullable List<CfnTag> value)
      Metadata which can be used to manage the thing group or dynamic thing group.
    • 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.