Class: AWSCDK::ResourceGroups::CfnGroup::ResourceQueryProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::ResourceGroups::CfnGroup::ResourceQueryProperty
- Defined in:
- resource_groups/cfn_group.rb
Overview
The query used to dynamically define the members of a group.
For more information about how to construct a query, see Build queries and groups in Resource Groups .
Instance Attribute Summary collapse
-
#query ⇒ AWSCDK::IResolvable, ...
readonly
The query that defines the membership of the group.
-
#type ⇒ String?
readonly
Specifies the type of resource query that determines this group's membership.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(query: nil, type: nil) ⇒ ResourceQueryProperty
constructor
A new instance of ResourceQueryProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(query: nil, type: nil) ⇒ ResourceQueryProperty
Returns a new instance of ResourceQueryProperty.
783 784 785 786 787 788 |
# File 'resource_groups/cfn_group.rb', line 783 def initialize(query: nil, type: nil) @query = query.is_a?(Hash) ? ::AWSCDK::ResourceGroups::CfnGroup::QueryProperty.new(**query.transform_keys(&:to_sym)) : query Jsii::Type.check_type(@query, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19yZXNvdXJjZWdyb3Vwcy5DZm5Hcm91cC5RdWVyeVByb3BlcnR5In1dfX0=")), "query") unless @query.nil? @type = type Jsii::Type.check_type(@type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "type") unless @type.nil? end |
Instance Attribute Details
#query ⇒ AWSCDK::IResolvable, ... (readonly)
The query that defines the membership of the group.
This is a structure with properties that depend on the Type .
The Query structure must be included in the following scenarios:
- When the
TypeisTAG_FILTERS_1_0, you must specify aQuerystructure that contains aTagFilterslist of tags. Resources with tags that match those in theTagFilterlist become members of the resource group. - When the
TypeisCLOUDFORMATION_STACK_1_0then this field is required only when you must specify a CloudFormation stack other than the one you are defining. To do this, theQuerystructure must contain theStackIdentifierproperty. If you don't specify either aQuerystructure or aStackIdentifierwithin thatQuery, then it defaults to the CloudFormation stack that you're currently constructing.
801 802 803 |
# File 'resource_groups/cfn_group.rb', line 801 def query @query end |
#type ⇒ String? (readonly)
Specifies the type of resource query that determines this group's membership. There are two valid query types:.
TAG_FILTERS_1_0indicates that the group is a tag-based group. To complete the group membership, you must include theTagFiltersproperty to specify the tag filters to use in the query.CLOUDFORMATION_STACK_1_0, the default, indicates that the group is a CloudFormation stack-based group. Group membership is based on the CloudFormation stack. You must specify theStackIdentifierproperty in the query to define which stack to associate the group with, or leave it empty to default to the stack where the group is defined.
809 810 811 |
# File 'resource_groups/cfn_group.rb', line 809 def type @type end |
Class Method Details
.jsii_properties ⇒ Object
811 812 813 814 815 816 |
# File 'resource_groups/cfn_group.rb', line 811 def self.jsii_properties { :query => "query", :type => "type", } end |
Instance Method Details
#to_jsii ⇒ Object
818 819 820 821 822 823 824 825 |
# File 'resource_groups/cfn_group.rb', line 818 def to_jsii result = {} result.merge!({ "query" => @query, "type" => @type, }) result.compact end |