![]() |
![]()
| ![]() |
![]()
NAMEPaws::ResourceGroups::ResourceQuery USAGEThis class represents one of two things: Arguments in a call to a service Use the attributes of this class as arguments to methods. You shouldn't make instances of this class. Each attribute should be used as a named argument in the calls that expect this type of object. As an example, if Att1 is expected to be a Paws::ResourceGroups::ResourceQuery object: $service_obj->Method(Att1 => { Query => $value, ..., Type => $value }); Results returned from an API call Use accessors for each attribute. If Att1 is expected to be an Paws::ResourceGroups::ResourceQuery object: $result = $service_obj->Method(...); $result->Att1->Query DESCRIPTIONThe query that is used to define a resource group or a search for resources. A query specifies both a query type and a query string as a JSON object. See the examples section for example JSON strings. The examples that follow are shown as standard JSON strings. If you include such a string as a parameter to the AWS CLI or an SDK API, you might need to 'escape' the string into a single line. For example, see the Quoting strings (https://docs.aws.amazon.com/cli/latest/userguide/cli-usage-parameters-quoting-strings.html) in the AWS CLI User Guide. Example 1 The following generic example shows a resource query JSON string that includes only resources that meet the following criteria:
"{ "Type": "TAG_FILTERS_1_0", "Query": { "ResourceTypeFilters": [ "resource_type1", "resource_type2"], "TagFilters": [ { "Key": "Key1", "Values": ["ValueA","ValueB"] }, { "Key":"Key2", "Values":["ValueC","ValueD"] } ] } }" This has the equivalent "shortcut" syntax of the following: "{ "Type": "TAG_FILTERS_1_0", "Query": { "ResourceTypeFilters": [ "resource_type1", "resource_type2"], "TagFilters": [ { "Key1": ["ValueA","ValueB"] }, { "Key2": ["ValueC","ValueD"] } ] } }" Example 2 The following example shows a resource query JSON string that includes only Amazon EC2 instances that are tagged "Stage" with a value of "Test". "{ "Type": "TAG_FILTERS_1_0", "Query": "{ "ResourceTypeFilters": "AWS::EC2::Instance", "TagFilters": { "Stage": "Test" } } }" Example 3 The following example shows a resource query JSON string that includes resource of any supported type as long as it is tagged "Stage" with a value of "Prod". "{ "Type": "TAG_FILTERS_1_0", "Query": { "ResourceTypeFilters": "AWS::AllSupported", "TagFilters": { "Stage": "Prod" } } }" Example 4 The following example shows a resource query JSON string that includes only Amazon EC2 instances and Amazon S3 buckets that are part of the specified AWS CloudFormation stack. "{ "Type": "CLOUDFORMATION_STACK_1_0", "Query": { "ResourceTypeFilters": [ "AWS::EC2::Instance", "AWS::S3::Bucket" ], "StackIdentifier": "arn:aws:cloudformation:us-west-2:123456789012:stack/AWStestuseraccount/fb0d5000-aba8-00e8-aa9e-50d5cEXAMPLE" } }" ATTRIBUTESREQUIRED Query => StrThe query that defines a group or a search. REQUIRED Type => StrThe type of the query. You can use the following values:
The query would not include the following items in the results, however.
SEE ALSOThis class forms part of Paws, describing an object used in Paws::ResourceGroups BUGS and CONTRIBUTIONSThe source code is located here: <https://github.com/pplu/aws-sdk-perl> Please report bugs to: <https://github.com/pplu/aws-sdk-perl/issues>
|