@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-22T19:35:36.379Z") public class CfnGroup extends CfnResource implements IInspectable
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();
Modifier and Type | Class and Description |
---|---|
static class |
CfnGroup.Builder
A fluent builder for
CfnGroup . |
static interface |
CfnGroup.GroupVersionProperty
A 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.
|
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnGroup(Construct scope,
java.lang.String id,
CfnGroupProps props)
Create a new `AWS::Greengrass::Group`.
|
protected |
CfnGroup(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnGroup(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAttrArn()
The ARN of the `Group` , such as `arn:aws:greengrass:us-east-1: :/greengrass/definition/groups/1234a5b6-78cd-901e-2fgh-3i45j6k178l9` .
|
java.lang.String |
getAttrId()
The ID of the `Group` , such as `1234a5b6-78cd-901e-2fgh-3i45j6k178l9` .
|
java.lang.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` .
|
java.lang.String |
getAttrName()
The name of the `Group` , such as `MyGroup` .
|
java.lang.String |
getAttrRoleArn()
The ARN of the IAM role that's attached to the `Group` , such as `arn:aws:iam:: :role/role-name` .
|
java.lang.String |
getAttrRoleAttachedAt()
The time (in milliseconds since the epoch) when the group role was attached to the `Group` .
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.Object |
getInitialVersion()
The group version to include when the group is created.
|
java.lang.String |
getName()
The name of the group.
|
java.lang.String |
getRoleArn()
The Amazon Resource Name (ARN) of the IAM role attached to the group.
|
TagManager |
getTags()
Application-specific metadata to attach to the group.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setInitialVersion(CfnGroup.GroupVersionProperty value)
The group version to include when the group is created.
|
void |
setInitialVersion(IResolvable value)
The group version to include when the group is created.
|
void |
setName(java.lang.String value)
The name of the group.
|
void |
setRoleArn(java.lang.String value)
The Amazon Resource Name (ARN) of the IAM role attached to the group.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnGroup(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnGroup(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnGroup(Construct scope, java.lang.String id, CfnGroupProps props)
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. This parameter is required.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.public java.lang.String getAttrArn()
public java.lang.String getAttrId()
public java.lang.String getAttrLatestVersionArn()
public java.lang.String getAttrName()
public java.lang.String getAttrRoleArn()
public java.lang.String getAttrRoleAttachedAt()
protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public TagManager getTags()
You can use tags in IAM policies to control access to AWS IoT Greengrass resources. You can also use tags to categorize your resources. For more information, see Tagging Your AWS IoT Greengrass Resources in the Developer Guide .
This Json
property type is processed as a map of key-value pairs. It uses the following format, which is different from most Tags
implementations in AWS CloudFormation templates.
"Tags": { "KeyName0": "value", "KeyName1": "value", "KeyName2": "value" }
public java.lang.String getName()
public void setName(java.lang.String value)
public java.lang.Object getInitialVersion()
A group version references the Amazon Resource Name (ARN) of a core definition version, device definition version, subscription definition version, and other version types. The group version must reference a core definition version that contains one core. Other version types are optionally included, depending on your business need.
To associate a group version after the group is created, create an
AWS::Greengrass::GroupVersion
resource and specify the ID of this group.
public void setInitialVersion(IResolvable value)
A group version references the Amazon Resource Name (ARN) of a core definition version, device definition version, subscription definition version, and other version types. The group version must reference a core definition version that contains one core. Other version types are optionally included, depending on your business need.
To associate a group version after the group is created, create an
AWS::Greengrass::GroupVersion
resource and specify the ID of this group.
public void setInitialVersion(CfnGroup.GroupVersionProperty value)
A group version references the Amazon Resource Name (ARN) of a core definition version, device definition version, subscription definition version, and other version types. The group version must reference a core definition version that contains one core. Other version types are optionally included, depending on your business need.
To associate a group version after the group is created, create an
AWS::Greengrass::GroupVersion
resource and specify the ID of this group.
public java.lang.String getRoleArn()
This role contains the permissions that Lambda functions and connectors use to interact with other AWS services.
public void setRoleArn(java.lang.String value)
This role contains the permissions that Lambda functions and connectors use to interact with other AWS services.