| 1 | import * as config from "@distilled.cloud/aws/config-service"; |
| 2 | import * as Layer from "effect/Layer"; |
| 3 | import { makeConfigAccountHttpBinding } from "./BindingHttp.ts"; |
| 4 | import { StartResourceEvaluation } from "./StartResourceEvaluation.ts"; |
| 5 | |
| 6 | export const StartResourceEvaluationHttp = Layer.effect( |
| 7 | StartResourceEvaluation, |
| 8 | makeConfigAccountHttpBinding({ |
| 9 | tag: "AWS.Config.StartResourceEvaluation", |
| 10 | operation: config.startResourceEvaluation, |
| 11 | // cloudformation:DescribeType is a dependent action: Config validates |
| 12 | // the CFN_RESOURCE_SCHEMA resource type schema with the CALLER's |
| 13 | // permissions and rejects with AccessDeniedException without it |
| 14 | // (observed live; see the StartResourceEvaluation API reference). |
| 15 | actions: ["config:StartResourceEvaluation", "cloudformation:DescribeType"], |
| 16 | }), |
| 17 | ); |