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

main
ts 41 lines 1.29 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 RestoreObjectRequest extends Omit<S3.RestoreObjectRequest, "Bucket"> {}
7
8 /**
9 * Runtime binding for `s3:RestoreObject`.
10 *
11 * Bind this operation to a bucket to get a callable that initiates a restore
12 * of an archived (Glacier / Deep Archive) object — the bucket name is
13 * injected automatically and `s3:RestoreObject` is granted on the bucket's
14 * objects. Provide the implementation with
15 * `Effect.provide(AWS.S3.RestoreObjectHttp)`.
16 * ### Archived Objects
17 * **Example:** Restore an Archived Object for 3 Days
18 * ```typescript
19 * const restoreObject = yield* AWS.S3.RestoreObject(bucket);
20 *
21 * yield* restoreObject({
22 * Key: "archive/2024.tar",
23 * RestoreRequest: {
24 * Days: 3,
25 * GlacierJobParameters: { Tier: "Standard" },
26 * },
27 * });
28 * ```
29 *
30 * @binding
31 */
32 export interface RestoreObject extends Binding.Service<
33 RestoreObject,
34 "AWS.S3.RestoreObject",
35 (
36 bucket: Bucket,
37 ) => Effect.Effect<
38 (request: RestoreObjectRequest) => Effect.Effect<S3.RestoreObjectOutput, S3.RestoreObjectError>
39 >
40 > {}
41 export const RestoreObject = Binding.Service<RestoreObject>("AWS.S3.RestoreObject");