| 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 { RuleGroup } from "./RuleGroup.ts"; |
| 5 | |
| 6 | /** |
| 7 | * Runtime binding for `wafv2:DeletePermissionPolicy` — remove the IAM |
| 8 | * policy that shares the bound {@link RuleGroup} with other accounts; the |
| 9 | * rule group ARN is injected automatically. Deleting a policy that does |
| 10 | * not exist succeeds. |
| 11 | * |
| 12 | * Provide `WAFv2.DeletePermissionPolicyHttp` on the hosting Lambda Function |
| 13 | * to satisfy the requirement. |
| 14 | * ### Sharing Rule Groups |
| 15 | * **Example:** Stop Sharing the Rule Group |
| 16 | * ```typescript |
| 17 | * // init — grants wafv2:DeletePermissionPolicy on the rule group |
| 18 | * const deletePermissionPolicy = yield* AWS.WAFv2.DeletePermissionPolicy(group); |
| 19 | * |
| 20 | * // runtime |
| 21 | * yield* deletePermissionPolicy(); |
| 22 | * ``` |
| 23 | * |
| 24 | * @binding |
| 25 | */ |
| 26 | export interface DeletePermissionPolicy extends Binding.Service< |
| 27 | DeletePermissionPolicy, |
| 28 | "AWS.WAFv2.DeletePermissionPolicy", |
| 29 | ( |
| 30 | ruleGroup: RuleGroup, |
| 31 | ) => Effect.Effect< |
| 32 | () => Effect.Effect< |
| 33 | WAFV2.DeletePermissionPolicyResponse, |
| 34 | WAFV2.DeletePermissionPolicyError |
| 35 | > |
| 36 | > |
| 37 | > {} |
| 38 | |
| 39 | export const DeletePermissionPolicy = Binding.Service<DeletePermissionPolicy>( |
| 40 | "AWS.WAFv2.DeletePermissionPolicy", |
| 41 | ); |