| 1 | import type * as kvs from "@distilled.cloud/aws/cloudfront-keyvaluestore"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { KeyValueStore } from "./KeyValueStore.ts"; |
| 5 | |
| 6 | export 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 | */ |
| 27 | export 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 | |
| 39 | export const ListKeys = Binding.Service<ListKeys>("AWS.CloudFront.ListKeys"); |