1import type * as rbin from "@distilled.cloud/aws/rbin";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4
5/**
6 * Runtime binding for `rbin:ListRules`.
7 *
8 * Enumerates the Region's Recycle Bin retention rules for a resource type
9 * (`EBS_SNAPSHOT`, `EC2_IMAGE`, or `EBS_VOLUME`), optionally filtered by
10 * resource tags, exclusion tags, or lock state — so a function can verify
11 * that deletion protection is in place before destructive maintenance.
12 * `ListRules` is an account-level list action, so the grant is on `*`.
13 * Provide the implementation with `Effect.provide(AWS.Rbin.ListRulesHttp)`.
14 * ### Listing Retention Rules
15 * **Example:** Enumerate the Region's snapshot retention rules
16 * ```typescript
17 * // init — grants rbin:ListRules on *
18 * const listRules = yield* AWS.Rbin.ListRules();
19 *
20 * // runtime
21 * const { Rules } = yield* listRules({ ResourceType: "EBS_SNAPSHOT" });
22 * for (const rule of Rules ?? []) {
23 * yield* Effect.log(`${rule.Identifier}: ${rule.Description ?? ""}`);
24 * }
25 * ```
26 *
27 * @binding
28 */
29export interface ListRules extends Binding.Service<
30 ListRules,
31 "AWS.Rbin.ListRules",
32 () => Effect.Effect<
33 (
34 request: rbin.ListRulesRequest,
35 ) => Effect.Effect<rbin.ListRulesResponse, rbin.ListRulesError>
36 >
37> {}
38export const ListRules = Binding.Service<ListRules>("AWS.Rbin.ListRules");