Class CfnGroup
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.resourcegroups.CfnGroup
- All Implemented Interfaces:
IInspectable,ITaggable,IGroupRef,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.113.0 (build fc68b25)",
date="2025-10-14T12:28:19.192Z")
@Stability(Stable)
public class CfnGroup
extends CfnResource
implements IInspectable, IGroupRef, ITaggable
Creates a resource group with the specified name and description.
You can optionally include either a resource query or a service configuration. For more information about constructing a resource query, see Build queries and groups in AWS Resource Groups in the AWS Resource Groups User Guide . For more information about service-linked groups and service configurations, see Service configurations for Resource Groups .
Minimum permissions
To run this command, you must have the following permissions:
resource-groups:CreateGroup
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.resourcegroups.*;
CfnGroup cfnGroup = CfnGroup.Builder.create(this, "MyCfnGroup")
.name("name")
// the properties below are optional
.configuration(List.of(ConfigurationItemProperty.builder()
.parameters(List.of(ConfigurationParameterProperty.builder()
.name("name")
.values(List.of("values"))
.build()))
.type("type")
.build()))
.description("description")
.resourceQuery(ResourceQueryProperty.builder()
.query(QueryProperty.builder()
.resourceTypeFilters(List.of("resourceTypeFilters"))
.stackIdentifier("stackIdentifier")
.tagFilters(List.of(TagFilterProperty.builder()
.key("key")
.values(List.of("values"))
.build()))
.build())
.type("type")
.build())
.resources(List.of("resources"))
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnGroup.static interfaceOne of the items in the service configuration assigned to a resource group.static interfaceOne parameter for a group configuration item.static interfaceSpecifies details within aResourceQuerystructure that determines the membership of the resource group.static interfaceThe query used to dynamically define the members of a group.static interfaceSpecifies a single tag key and optional values that you can use to specify membership in a tag-based group.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.services.resourcegroups.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) -
Method Summary
Modifier and TypeMethodDescriptionstatic IGroupReffromGroupArn(software.constructs.Construct scope, String id, String arn) Creates a new IGroupRef from an ARN.static IGroupReffromGroupName(software.constructs.Construct scope, String id, String groupName) Creates a new IGroupRef from a groupName.The ARN of the new resource group.The service configuration currently associated with the resource group and in effect for the members of the resource group.The description of the resource group.A reference to a Group resource.getName()The name of a resource group.The resource query structure that is used to dynamically determine which AWS resources are members of the associated resource group.A list of the Amazon Resource Names (ARNs) of AWS resources that you want to add to the specified group.getTags()Tag Manager which manages the tags for this resource.The tag key and value pairs that are attached to the resource group.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidsetConfiguration(List<Object> value) The service configuration currently associated with the resource group and in effect for the members of the resource group.voidsetConfiguration(IResolvable value) The service configuration currently associated with the resource group and in effect for the members of the resource group.voidsetDescription(String value) The description of the resource group.voidThe name of a resource group.voidsetResourceQuery(IResolvable value) The resource query structure that is used to dynamically determine which AWS resources are members of the associated resource group.voidThe resource query structure that is used to dynamically determine which AWS resources are members of the associated resource group.voidsetResources(List<String> value) A list of the Amazon Resource Names (ARNs) of AWS resources that you want to add to the specified group.voidsetTagsRaw(List<CfnTag> value) The tag key and value pairs that are attached to the resource group.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, 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.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) - 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.
-
fromGroupName
@Stability(Stable) @NotNull public static IGroupRef fromGroupName(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String groupName) Creates a new IGroupRef from a groupName.- Parameters:
scope- This parameter is required.id- This parameter is required.groupName- 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 the new resource group. -
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 a resource group. -
setName
The name of a resource group. -
getConfiguration
The service configuration currently associated with the resource group and in effect for the members of the resource group. -
setConfiguration
The service configuration currently associated with the resource group and in effect for the members of the resource group. -
setConfiguration
The service configuration currently associated with the resource group and in effect for the members of the resource group. -
getDescription
The description of the resource group. -
setDescription
The description of the resource group. -
getResourceQuery
The resource query structure that is used to dynamically determine which AWS resources are members of the associated resource group. -
setResourceQuery
The resource query structure that is used to dynamically determine which AWS resources are members of the associated resource group. -
setResourceQuery
The resource query structure that is used to dynamically determine which AWS resources are members of the associated resource group. -
getResources
A list of the Amazon Resource Names (ARNs) of AWS resources that you want to add to the specified group. -
setResources
A list of the Amazon Resource Names (ARNs) of AWS resources that you want to add to the specified group. -
getTagsRaw
The tag key and value pairs that are attached to the resource group. -
setTagsRaw
The tag key and value pairs that are attached to the resource group.
-