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.104.0 (build e79254c)", date="2024-11-21T06:34:09.056Z") @Stability(Stable) public class CfnGroup extends CfnResource implements IInspectable, ITaggable
AWS IoT Greengrass seamlessly extends AWS to edge devices so they can act locally on the data they generate, while still using the cloud for management, analytics, and durable storage.

With AWS IoT Greengrass , connected devices can run AWS Lambda functions, execute predictions based on machine learning models, keep device data in sync, and communicate with other devices securely – even when not connected to the internet. For more information, see the Developer Guide .

For AWS Region support, see AWS CloudFormation Support for AWS IoT Greengrass in the Developer Guide .

The AWS::Greengrass::Group resource represents a group in AWS IoT Greengrass . In the AWS IoT Greengrass API, groups are used to organize your group versions.

Groups can reference multiple group versions. All group versions must be associated with a group. A group version references a device definition version, subscription definition version, and other version types that contain the components you want to deploy to a Greengrass core device.

To deploy a group version, the group version must reference a core definition version that contains one core. Other version types are optionally included, depending on your business need.

When you create a group, you can optionally include an initial group version. To associate a group version later, create a AWS::Greengrass::GroupVersion resource and specify the ID of this group.

To change group components (such as devices, subscriptions, or functions), you must create new versions. This is because versions are immutable. For example, to add a function, you create a function definition version that contains the new function (and all other functions that you want to deploy). Then you create a group version that references the new function definition version (and all other version types that you want to deploy).

Deploying a Group Version

After you create the group version in your AWS CloudFormation template, you can deploy it using the aws greengrass create-deployment command in the AWS CLI or from the Greengrass node in the AWS IoT console. To deploy a group version, you must have a Greengrass service role associated with your AWS account . For more information, see AWS CloudFormation Support for AWS IoT Greengrass in the 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.greengrass.*;
 Object tags;
 CfnGroup cfnGroup = CfnGroup.Builder.create(this, "MyCfnGroup")
         .name("name")
         // the properties below are optional
         .initialVersion(GroupVersionProperty.builder()
                 .connectorDefinitionVersionArn("connectorDefinitionVersionArn")
                 .coreDefinitionVersionArn("coreDefinitionVersionArn")
                 .deviceDefinitionVersionArn("deviceDefinitionVersionArn")
                 .functionDefinitionVersionArn("functionDefinitionVersionArn")
                 .loggerDefinitionVersionArn("loggerDefinitionVersionArn")
                 .resourceDefinitionVersionArn("resourceDefinitionVersionArn")
                 .subscriptionDefinitionVersionArn("subscriptionDefinitionVersionArn")
                 .build())
         .roleArn("roleArn")
         .tags(tags)
         .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

    • CfnGroup

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

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

      @Stability(Stable) public CfnGroup(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnGroupProps 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. 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 ARN of the Group , such as arn:aws:greengrass:us-east-1: :/greengrass/definition/groups/1234a5b6-78cd-901e-2fgh-3i45j6k178l9 .
    • getAttrId

      @Stability(Stable) @NotNull public String getAttrId()
      The ID of the Group , such as 1234a5b6-78cd-901e-2fgh-3i45j6k178l9 .
    • getAttrLatestVersionArn

      @Stability(Stable) @NotNull public String getAttrLatestVersionArn()
      The ARN of the last GroupVersion that was added to the Group , such as arn:aws:greengrass:us-east-1: :/greengrass/definition/groups/1234a5b6-78cd-901e-2fgh-3i45j6k178l9/versions/9876ac30-4bdb-4f9d-95af-b5fdb66be1a2 .
    • getAttrName

      @Stability(Stable) @NotNull public String getAttrName()
      The name of the Group , such as MyGroup .
    • getAttrRoleArn

      @Stability(Stable) @NotNull public String getAttrRoleArn()
      The ARN of the IAM role that's attached to the Group , such as arn:aws:iam:: :role/role-name .
    • getAttrRoleAttachedAt

      @Stability(Stable) @NotNull public String getAttrRoleAttachedAt()
      The time (in milliseconds since the epoch) when the group role was attached to the Group .
    • 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
    • getName

      @Stability(Stable) @NotNull public String getName()
      The name of the group.
    • setName

      @Stability(Stable) public void setName(@NotNull String value)
      The name of the group.
    • getInitialVersion

      @Stability(Stable) @Nullable public Object getInitialVersion()
      The group version to include when the group is created.
    • setInitialVersion

      @Stability(Stable) public void setInitialVersion(@Nullable IResolvable value)
      The group version to include when the group is created.
    • setInitialVersion

      @Stability(Stable) public void setInitialVersion(@Nullable CfnGroup.GroupVersionProperty value)
      The group version to include when the group is created.
    • getRoleArn

      @Stability(Stable) @Nullable public String getRoleArn()
      The Amazon Resource Name (ARN) of the IAM role attached to the group.
    • setRoleArn

      @Stability(Stable) public void setRoleArn(@Nullable String value)
      The Amazon Resource Name (ARN) of the IAM role attached to the group.
    • getTagsRaw

      @Stability(Stable) @Nullable public Object getTagsRaw()
      Application-specific metadata to attach to the group.
    • setTagsRaw

      @Stability(Stable) public void setTagsRaw(@Nullable Object value)
      Application-specific metadata to attach to the group.