Class CfnGroup
- All Implemented Interfaces:
IInspectable,IGroupRef,IEnvironmentAware,ITaggable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
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::GroupVersionresource 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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnGroup.static interfaceA group version in AWS IoT Greengrass , which references of a core definition version, device definition version, subscription definition version, and other version types that contain the components you want to deploy to a Greengrass core device.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.interfaces.greengrass.IGroupRef
IGroupRef.Jsii$Default, IGroupRef.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnGroup(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnGroup(software.amazon.jsii.JsiiObjectRef objRef) CfnGroup(software.constructs.Construct scope, String id, CfnGroupProps props) Create a newAWS::Greengrass::Group. -
Method Summary
Modifier and TypeMethodDescriptionstatic IGroupReffromGroupArn(software.constructs.Construct scope, String id, String arn) Creates a new IGroupRef from an ARN.static IGroupReffromGroupId(software.constructs.Construct scope, String id, String groupId) Creates a new IGroupRef from a groupId.The ARN of theGroup, such asarn:aws:greengrass:us-east-1: :/greengrass/definition/groups/1234a5b6-78cd-901e-2fgh-3i45j6k178l9.The ID of theGroup, such as1234a5b6-78cd-901e-2fgh-3i45j6k178l9.The ARN of the lastGroupVersionthat was added to theGroup, such asarn:aws:greengrass:us-east-1: :/greengrass/definition/groups/1234a5b6-78cd-901e-2fgh-3i45j6k178l9/versions/9876ac30-4bdb-4f9d-95af-b5fdb66be1a2.The name of theGroup, such asMyGroup.The ARN of the IAM role that's attached to theGroup, such asarn:aws:iam:: :role/role-name.The time (in milliseconds since the epoch) when the group role was attached to theGroup.A reference to a Group resource.The group version to include when the group is created.getName()The name of the group.The Amazon Resource Name (ARN) of the IAM role attached to the group.getTags()Tag Manager which manages the tags for this resource.Application-specific metadata to attach to the group.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidsetInitialVersion(IResolvable value) The group version to include when the group is created.voidThe group version to include when the group is created.voidThe name of the group.voidsetRoleArn(String value) The Amazon Resource Name (ARN) of the IAM role attached to the group.voidsetTagsRaw(Object value) Application-specific metadata to attach to the group.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getEnv, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
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) Create a newAWS::Greengrass::Group.- 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
-
fromGroupArn
@Stability(Stable) @NotNull public static IGroupRef fromGroupArn(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String arn) Creates a new IGroupRef from an ARN.- Parameters:
scope- This parameter is required.id- This parameter is required.arn- This parameter is required.
-
fromGroupId
@Stability(Stable) @NotNull public static IGroupRef fromGroupId(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String groupId) Creates a new IGroupRef from a groupId.- Parameters:
scope- This parameter is required.id- This parameter is required.groupId- This parameter is required.
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- 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:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrArn
The ARN of theGroup, such asarn:aws:greengrass:us-east-1: :/greengrass/definition/groups/1234a5b6-78cd-901e-2fgh-3i45j6k178l9. -
getAttrId
The ID of theGroup, such as1234a5b6-78cd-901e-2fgh-3i45j6k178l9. -
getAttrLatestVersionArn
The ARN of the lastGroupVersionthat was added to theGroup, such asarn:aws:greengrass:us-east-1: :/greengrass/definition/groups/1234a5b6-78cd-901e-2fgh-3i45j6k178l9/versions/9876ac30-4bdb-4f9d-95af-b5fdb66be1a2. -
getAttrName
The name of theGroup, such asMyGroup. -
getAttrRoleArn
The ARN of the IAM role that's attached to theGroup, such asarn:aws:iam:: :role/role-name. -
getAttrRoleAttachedAt
The time (in milliseconds since the epoch) when the group role was attached to theGroup. -
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getGroupRef
A reference to a Group resource.- Specified by:
getGroupRefin interfaceIGroupRef
-
getTags
Tag Manager which manages the tags for this resource. -
getName
The name of the group. -
setName
The name of the group. -
getInitialVersion
The group version to include when the group is created.Returns union: either
IResolvableorCfnGroup.GroupVersionProperty -
setInitialVersion
The group version to include when the group is created. -
setInitialVersion
The group version to include when the group is created. -
getRoleArn
The Amazon Resource Name (ARN) of the IAM role attached to the group. -
setRoleArn
The Amazon Resource Name (ARN) of the IAM role attached to the group. -
getTagsRaw
Application-specific metadata to attach to the group. -
setTagsRaw
Application-specific metadata to attach to the group.
-