CfnGroupProps Struct
Properties for defining a CfnGroup.
| Source |
|---|
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_resourcegroups as resourcegroups } from 'aws-cdk-lib';
const cfnGroupProps: resourcegroups.CfnGroupProps = {
name: 'name',
// the properties below are optional
configuration: [{
parameters: [{
name: 'name',
values: ['values'],
}],
type: 'type',
}],
description: 'description',
resourceQuery: {
query: {
resourceTypeFilters: ['resourceTypeFilters'],
stackIdentifier: 'stackIdentifier',
tagFilters: [{
key: 'key',
values: ['values'],
}],
},
type: 'type',
},
resources: ['resources'],
tags: [{
key: 'key',
value: 'value',
}],
};
python
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_resourcegroups as resourcegroups
cfn_group_props = resourcegroups.CfnGroupProps(
name="name",
# the properties below are optional
configuration=[resourcegroups.CfnGroup.ConfigurationItemProperty(
parameters=[resourcegroups.CfnGroup.ConfigurationParameterProperty(
name="name",
values=["values"]
)],
type="type"
)],
description="description",
resource_query=resourcegroups.CfnGroup.ResourceQueryProperty(
query=resourcegroups.CfnGroup.QueryProperty(
resource_type_filters=["resourceTypeFilters"],
stack_identifier="stackIdentifier",
tag_filters=[resourcegroups.CfnGroup.TagFilterProperty(
key="key",
values=["values"]
)]
),
type="type"
),
resources=["resources"],
tags=[CfnTag(
key="key",
value="value"
)]
)
java
// 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.*;
CfnGroupProps cfnGroupProps = CfnGroupProps.builder()
.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();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.ResourceGroups;
var cfnGroupProps = new CfnGroupProps {
Name = "name",
// the properties below are optional
Configuration = new [] { new ConfigurationItemProperty {
Parameters = new [] { new ConfigurationParameterProperty {
Name = "name",
Values = new [] { "values" }
} },
Type = "type"
} },
Description = "description",
ResourceQuery = new ResourceQueryProperty {
Query = new QueryProperty {
ResourceTypeFilters = new [] { "resourceTypeFilters" },
StackIdentifier = "stackIdentifier",
TagFilters = new [] { new TagFilterProperty {
Key = "key",
Values = new [] { "values" }
} }
},
Type = "type"
},
Resources = new [] { "resources" },
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
cfnGroupProps := &CfnGroupProps{
Name: jsii.String("name"),
// the properties below are optional
Configuration: []interface{}{
&ConfigurationItemProperty{
Parameters: []interface{}{
&ConfigurationParameterProperty{
Name: jsii.String("name"),
Values: []*string{
jsii.String("values"),
},
},
},
Type: jsii.String("type"),
},
},
Description: jsii.String("description"),
ResourceQuery: &ResourceQueryProperty{
Query: &QueryProperty{
ResourceTypeFilters: []*string{
jsii.String("resourceTypeFilters"),
},
StackIdentifier: jsii.String("stackIdentifier"),
TagFilters: []interface{}{
&TagFilterProperty{
Key: jsii.String("key"),
Values: []*string{
jsii.String("values"),
},
},
},
},
Type: jsii.String("type"),
},
Resources: []*string{
jsii.String("resources"),
},
Tags: []CfnTag{
&CfnTag{
Key: jsii.String("key"),
Value: jsii.String("value"),
},
},
}
Properties
configurationoptionalIResolvable | IResolvable | CfnGroup.configurationoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, ConfigurationItemProperty]]]configurationoptionalIResolvableConfigurationoptionalIResolvableConfigurationoptionalinterface{} #The service configuration currently associated with the resource group and in effect for the members of the resource group.
notes
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 Resource Groups User Guide .
You can include either a
Configurationor aResourceQuery, but not both.
descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string #The description of the resource group.
The 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.
resourceQueryoptionalIResolvable | CfnGroup.ResourceQueryPropertyresource_queryoptionaltyping.Union[IResolvable, ResourceQueryProperty]resourceQueryoptionalIResolvableResourceQueryoptionalIResolvableResourceQueryoptionalinterface{} #The resource query structure that is used to dynamically determine which AWS resources are members of the associated resource group.
notes
For more information about queries and how to construct them, see Build queries and groups in Resource Groups in the 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.
resourcesoptionalstring[]resourcesoptionaltyping.List[str]resourcesoptionalList<String>Resourcesoptionalstring[]Resourcesoptional*[]*string #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
Resourcesor by using aResourceQuery, but not both.- You can include a
Resourcesproperty only if you also specify aConfigurationproperty.