| 1 | import * as resourcegroups from "@distilled.cloud/aws/resource-groups"; |
| 2 | import * as Layer from "effect/Layer"; |
| 3 | import { makeResourceGroupsAccountHttpBinding } from "./BindingHttp.ts"; |
| 4 | import { SearchResources } from "./SearchResources.ts"; |
| 5 | |
| 6 | export const SearchResourcesHttp = Layer.effect( |
| 7 | SearchResources, |
| 8 | makeResourceGroupsAccountHttpBinding({ |
| 9 | tag: "AWS.ResourceGroups.SearchResources", |
| 10 | operation: resourcegroups.searchResources, |
| 11 | // Documented minimum permissions: the search reads through the Resource |
| 12 | // Groups Tagging API and (for stack queries) CloudFormation. |
| 13 | actions: [ |
| 14 | "resource-groups:SearchResources", |
| 15 | "tag:GetResources", |
| 16 | "cloudformation:DescribeStacks", |
| 17 | "cloudformation:ListStackResources", |
| 18 | ], |
| 19 | }), |
| 20 | ); |