The best way to control Claude Code, Codex and more from any computer or phone

main
ts 37 lines 1.32 KB
Raw
1 import * as S3 from "@distilled.cloud/aws/s3";
2 import * as Binding from "alchemy/Binding";
3 import * as Effect from "effect/Effect";
4 import type { Bucket } from "./Bucket.ts";
5
6 export interface GetObjectRetentionRequest extends Omit<S3.GetObjectRetentionRequest, "Bucket"> {}
7
8 /**
9 * Runtime binding for `s3:GetObjectRetention`.
10 *
11 * Bind this operation to a bucket to get a callable that reads an object's
12 * Object Lock retention settings — the bucket name is injected automatically
13 * and `s3:GetObjectRetention` is granted on the bucket's objects. Requires a
14 * bucket created with `objectLockEnabled: true`. Provide the implementation
15 * with `Effect.provide(AWS.S3.GetObjectRetentionHttp)`.
16 * ### Object Lock
17 * **Example:** Read an Object's Retention
18 * ```typescript
19 * const getObjectRetention = yield* AWS.S3.GetObjectRetention(bucket);
20 *
21 * const { Retention } = yield* getObjectRetention({ Key: "records/1.json" });
22 * ```
23 *
24 * @binding
25 */
26 export interface GetObjectRetention extends Binding.Service<
27 GetObjectRetention,
28 "AWS.S3.GetObjectRetention",
29 (
30 bucket: Bucket,
31 ) => Effect.Effect<
32 (
33 request: GetObjectRetentionRequest,
34 ) => Effect.Effect<S3.GetObjectRetentionOutput, S3.GetObjectRetentionError>
35 >
36 > {}
37 export const GetObjectRetention = Binding.Service<GetObjectRetention>("AWS.S3.GetObjectRetention");