1import * as resourcegroups from "@distilled.cloud/aws/resource-groups";
2import * as Layer from "effect/Layer";
3import { makeResourceGroupsAccountHttpBinding } from "./BindingHttp.ts";
4import { SearchResources } from "./SearchResources.ts";
5
6export 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);