AWS::ResourceGroups::GroupCreates 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 Resource Groups](https://docs.aws.amazon.com//ARG/latest/userguide/getting_started-query.html) in the *Resource Groups User Guide* . For more information about service-linked groups and service configurations, see [Service configurations for Resource Groups](https://docs.aws.amazon.com//ARG/latest/APIReference/about-slg.html) . *Minimum permissions* To run this command, you must have the following permissions: - `resource-groups:CreateGroup`
import { CfnGroup } from 'aws-cdk-lib/aws-resourcegroups';Or use the module namespace:
import * as resourcegroups from 'aws-cdk-lib/aws-resourcegroups';
// resourcegroups.CfnGroupConfiguration passed to the constructor as CfnGroupProps.
nameRequiredstringThe name of a resource group. The name must be unique within the AWS Region in which you create the resource. To create multiple resource groups based on the same CloudFormation stack, you must generate unique names for each.
configurationOptionalIResolvable | IResolvable | ConfigurationItemProperty[]The service configuration currently associated with the resource group and in effect for the members of the resource group. A `Configuration` consists of one or more `ConfigurationItem` entries. For information about service configurations for resource groups and how to construct them, see [Service configurations for resource groups](https://docs.aws.amazon.com//ARG/latest/APIReference/about-slg.html) in the *Resource Groups User Guide* . > You can include either a `Configuration` or a `ResourceQuery` , but not both.
descriptionOptionalstringThe description of the resource group.
resourceQueryOptionalIResolvable | ResourceQueryPropertyThe resource query structure that is used to dynamically determine which AWS resources are members of the associated resource group. For more information about queries and how to construct them, see [Build queries and groups in Resource Groups](https://docs.aws.amazon.com//ARG/latest/userguide/gettingstarted-query.html) in the *Resource Groups User Guide* > - You can include either a `ResourceQuery` or a `Configuration` , but not both. > - You can specify the group's membership either by using a `ResourceQuery` or by using a list of `Resources` , but not both.
resourcesOptionalstring[]A list of the Amazon Resource Names (ARNs) of AWS resources that you want to add to the specified group. > - You can specify the group membership either by using a list of `Resources` or by using a `ResourceQuery` , but not both. > - You can include a `Resources` property only if you also specify a `Configuration` property.
tagsOptionalCfnTag[]The tag key and value pairs that are attached to the resource group.
This L1 construct maps directly to the following CloudFormation resource type.
Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.
Subscribe to Newsletteraws-resourcegroupsAWS::ResourceGroups::Group