SearchResources
Source:
src/AWS/ResourceGroups/SearchResources.ts
Runtime binding for resource-groups:SearchResources.
Runs an ad-hoc resource query (the same TAG_FILTERS_1_0 /
CLOUDFORMATION_STACK_1_0 syntax a query-based group is defined with)
and returns the matching resource ARNs — a group-less preview of what a
query would capture. Account-level: the query is chosen per request, so
the grant is on * (including the Tagging API / CloudFormation
read-through permissions the search fans out to). Provide the
implementation with Effect.provide(AWS.ResourceGroups.SearchResourcesHttp).
Searching Resources
Section titled “Searching Resources”// initconst searchResources = yield* AWS.ResourceGroups.SearchResources();
// runtimeconst { ResourceIdentifiers } = yield* searchResources({ ResourceQuery: { Type: "TAG_FILTERS_1_0", Query: JSON.stringify({ ResourceTypeFilters: ["AWS::AllSupported"], TagFilters: [{ Key: "env", Values: ["prod"] }], }), },});