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

main
ts 44 lines 1.5 KB
Raw
1 import type * as efs from "@distilled.cloud/aws/efs";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { FileSystem } from "./FileSystem.ts";
5
6 /**
7 * `PutBackupPolicy` request with `FileSystemId` injected from the bound
8 * {@link FileSystem}.
9 */
10 export interface PutBackupPolicyRequest extends Omit<efs.PutBackupPolicyRequest, "FileSystemId"> {}
11
12 /**
13 * Runtime binding for the `PutBackupPolicy` operation (IAM action
14 * `elasticfilesystem:PutBackupPolicy` on the file system ARN).
15 *
16 * Starts or stops AWS Backup automatic backups for the bound
17 * {@link FileSystem} at runtime. For declarative control, prefer the
18 * FileSystem resource's `backup` prop — this binding is for operational
19 * tooling that toggles backups on demand. Provide the implementation with
20 * `Effect.provide(AWS.EFS.PutBackupPolicyHttp)`.
21 * ### Backup Policy
22 * **Example:** Enable automatic backups
23 * ```typescript
24 * const putBackupPolicy = yield* AWS.EFS.PutBackupPolicy(files);
25 *
26 * const { BackupPolicy } = yield* putBackupPolicy({
27 * BackupPolicy: { Status: "ENABLED" },
28 * });
29 * ```
30 *
31 * @binding
32 */
33 export interface PutBackupPolicy extends Binding.Service<
34 PutBackupPolicy,
35 "AWS.EFS.PutBackupPolicy",
36 (
37 fileSystem: FileSystem,
38 ) => Effect.Effect<
39 (
40 request: PutBackupPolicyRequest,
41 ) => Effect.Effect<efs.BackupPolicyDescription, efs.PutBackupPolicyError>
42 >
43 > {}
44 export const PutBackupPolicy = Binding.Service<PutBackupPolicy>("AWS.EFS.PutBackupPolicy");