@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:41.567Z") @Stability(value=Stable) public class CfnGroup extends CfnResource implements IInspectable
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:CreateGroupExample:
// 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();
| Modifier and Type | Class and Description |
|---|---|
static class |
CfnGroup.Builder
A fluent builder for
CfnGroup. |
static interface |
CfnGroup.ConfigurationItemProperty
One of the items in the service configuration assigned to a resource group.
|
static interface |
CfnGroup.ConfigurationParameterProperty
One parameter for a group configuration item.
|
static interface |
CfnGroup.QueryProperty
Specifies details within a `ResourceQuery` structure that determines the membership of the resource group.
|
static interface |
CfnGroup.ResourceQueryProperty
The query used to dynamically define the members of a group.
|
static interface |
CfnGroup.TagFilterProperty
Specifies a single tag key and optional values that you can use to specify membership in a tag-based group.
|
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$Proxy| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnGroup(software.constructs.Construct scope,
String id,
CfnGroupProps props)
Create a new `AWS::ResourceGroups::Group`.
|
protected |
CfnGroup(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnGroup(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
String |
getAttrArn()
The ARN of the new resource group.
|
protected Map<String,Object> |
getCfnProperties() |
Object |
getConfiguration()
The service configuration currently associated with the resource group and in effect for the members of the resource group.
|
String |
getDescription()
The description of the resource group.
|
String |
getName()
The name of a resource group.
|
Object |
getResourceQuery()
The resource query structure that is used to dynamically determine which AWS resources are members of the associated resource group.
|
List<String> |
getResources()
A list of the Amazon Resource Names (ARNs) of AWS resources that you want to add to the specified group.
|
TagManager |
getTags()
The tag key and value pairs that are attached to the resource group.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected Map<String,Object> |
renderProperties(Map<String,Object> props) |
void |
setConfiguration(IResolvable value)
The service configuration currently associated with the resource group and in effect for the members of the resource group.
|
void |
setConfiguration(List<Object> value)
The service configuration currently associated with the resource group and in effect for the members of the resource group.
|
void |
setDescription(String value)
The description of the resource group.
|
void |
setName(String value)
The name of a resource group.
|
void |
setResourceQuery(CfnGroup.ResourceQueryProperty value)
The resource query structure that is used to dynamically determine which AWS resources are members of the associated resource group.
|
void |
setResourceQuery(IResolvable value)
The resource query structure that is used to dynamically determine which AWS resources are members of the associated resource group.
|
void |
setResources(List<String> value)
A list of the Amazon Resource Names (ARNs) of AWS resources that you want to add to the specified group.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, shouldSynthesize, toString, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
protected CfnGroup(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnGroup(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnGroup(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
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.@Stability(value=Stable)
public void inspect(@NotNull
TreeInspector inspector)
inspect in interface IInspectableinspector - - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties in class CfnResourceprops - This parameter is required.@Stability(value=Stable) @NotNull public String getAttrArn()
@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull public TagManager getTags()
@Stability(value=Stable) @NotNull public String getName()
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.
@Stability(value=Stable)
public void setName(@NotNull
String value)
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.
@Stability(value=Stable) @Nullable public Object getConfiguration()
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 in the AWS Resource Groups User Guide .
You can include either a
Configurationor aResourceQuery, but not both.
@Stability(value=Stable)
public void setConfiguration(@Nullable
IResolvable value)
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 in the AWS Resource Groups User Guide .
You can include either a
Configurationor aResourceQuery, but not both.
@Stability(value=Stable)
public void setConfiguration(@Nullable
List<Object> value)
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 in the AWS Resource Groups User Guide .
You can include either a
Configurationor aResourceQuery, but not both.
@Stability(value=Stable) @Nullable public String getDescription()
@Stability(value=Stable)
public void setDescription(@Nullable
String value)
@Stability(value=Stable) @Nullable public Object getResourceQuery()
For more information about queries and how to construct them, see Build queries and groups in AWS Resource Groups in the AWS Resource Groups User Guide
- You can include either a
ResourceQueryor aConfiguration, but not both.- You can specify the group's membership either by using a
ResourceQueryor by using a list ofResources, but not both.
@Stability(value=Stable)
public void setResourceQuery(@Nullable
CfnGroup.ResourceQueryProperty value)
For more information about queries and how to construct them, see Build queries and groups in AWS Resource Groups in the AWS Resource Groups User Guide
- You can include either a
ResourceQueryor aConfiguration, but not both.- You can specify the group's membership either by using a
ResourceQueryor by using a list ofResources, but not both.
@Stability(value=Stable)
public void setResourceQuery(@Nullable
IResolvable value)
For more information about queries and how to construct them, see Build queries and groups in AWS Resource Groups in the AWS Resource Groups User Guide
- You can include either a
ResourceQueryor aConfiguration, but not both.- You can specify the group's membership either by using a
ResourceQueryor by using a list ofResources, but not both.
@Stability(value=Stable) @Nullable public List<String> getResources()
- You can specify the group membership either by using a list of
Resourcesor by using aResourceQuery, but not both.- You can include a
Resourcesproperty only if you also specify aConfigurationproperty.
@Stability(value=Stable)
public void setResources(@Nullable
List<String> value)
- You can specify the group membership either by using a list of
Resourcesor by using aResourceQuery, but not both.- You can include a
Resourcesproperty only if you also specify aConfigurationproperty.
Copyright © 2022. All rights reserved.