| 1 | import type * as WAFV2 from "@distilled.cloud/aws/wafv2"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { WebACL } from "./WebACL.ts"; |
| 5 | |
| 6 | export interface ListResourcesForWebACLRequest extends Omit< |
| 7 | WAFV2.ListResourcesForWebACLRequest, |
| 8 | "WebACLArn" |
| 9 | > {} |
| 10 | |
| 11 | /** |
| 12 | * Runtime binding for `wafv2:ListResourcesForWebACL` — list the regional |
| 13 | * resources (ALBs, API Gateway stages, AppSync APIs, ...) associated with |
| 14 | * the bound {@link WebACL}; the web ACL ARN is injected automatically. |
| 15 | * |
| 16 | * Provide `WAFv2.ListResourcesForWebACLHttp` on the hosting Lambda Function |
| 17 | * to satisfy the requirement. |
| 18 | * ### Inspecting Associations |
| 19 | * **Example:** List Protected Resources |
| 20 | * ```typescript |
| 21 | * // init — grants wafv2:ListResourcesForWebACL on the web ACL |
| 22 | * const listResources = yield* AWS.WAFv2.ListResourcesForWebACL(acl); |
| 23 | * |
| 24 | * // runtime |
| 25 | * const { ResourceArns } = yield* listResources(); |
| 26 | * ``` |
| 27 | * |
| 28 | * @binding |
| 29 | */ |
| 30 | export interface ListResourcesForWebACL extends Binding.Service< |
| 31 | ListResourcesForWebACL, |
| 32 | "AWS.WAFv2.ListResourcesForWebACL", |
| 33 | ( |
| 34 | webAcl: WebACL, |
| 35 | ) => Effect.Effect< |
| 36 | ( |
| 37 | request?: ListResourcesForWebACLRequest, |
| 38 | ) => Effect.Effect< |
| 39 | WAFV2.ListResourcesForWebACLResponse, |
| 40 | WAFV2.ListResourcesForWebACLError |
| 41 | > |
| 42 | > |
| 43 | > {} |
| 44 | |
| 45 | export const ListResourcesForWebACL = Binding.Service<ListResourcesForWebACL>( |
| 46 | "AWS.WAFv2.ListResourcesForWebACL", |
| 47 | ); |