1import * as appregistry from "@distilled.cloud/aws/service-catalog-appregistry";
2import * as Layer from "effect/Layer";
3import { makeAppRegistryAccountHttpBinding } from "./BindingHttp.ts";
4import { SyncResource } from "./SyncResource.ts";
5
6export const SyncResourceHttp = Layer.effect(
7 SyncResource,
8 makeAppRegistryAccountHttpBinding({
9 tag: "AWS.AppRegistry.SyncResource",
10 operation: appregistry.syncResource,
11 // The target is an arbitrary external resource, so nothing here supports
12 // resource-level scoping. SyncResource verifies the CALLER can read and
13 // update the target resource, so the documented companion permissions
14 // (CloudFormation + resource-tagging) are granted alongside.
15 actions: [
16 "servicecatalog:SyncResource",
17 "cloudformation:DescribeStacks",
18 "cloudformation:UpdateStack",
19 "tag:GetResources",
20 "tag:TagResources",
21 "tag:UntagResources",
22 ],
23 }),
24);