1import type * as kvs from "@distilled.cloud/aws/cloudfront-keyvaluestore";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { KeyValueStore } from "./KeyValueStore.ts";
5
6export interface ListKeysRequest extends Omit<kvs.ListKeysRequest, "KvsARN"> {}
7
8/**
9 * Runtime binding for `cloudfront-keyvaluestore:ListKeys`.
10 *
11 * Lists key/value pairs in the bound KeyValueStore's data plane (paginated
12 * via `NextToken`/`MaxResults`). Provide the implementation with
13 * `Effect.provide(AWS.CloudFront.ListKeysHttp)`.
14 * ### Reading KeyValueStore Data
15 * **Example:** List Keys
16 * ```typescript
17 * // init — bind the operation to the store
18 * const listKeys = yield* CloudFront.ListKeys(store);
19 *
20 * // runtime
21 * const res = yield* listKeys({ MaxResults: 50 });
22 * console.log(res.Items?.map((item) => item.Key));
23 * ```
24 *
25 * @binding
26 */
27export interface ListKeys extends Binding.Service<
28 ListKeys,
29 "AWS.CloudFront.ListKeys",
30 (
31 store: KeyValueStore,
32 ) => Effect.Effect<
33 (
34 request: ListKeysRequest,
35 ) => Effect.Effect<kvs.ListKeysResponse, kvs.ListKeysError>
36 >
37> {}
38
39export const ListKeys = Binding.Service<ListKeys>("AWS.CloudFront.ListKeys");