@devries-cameron20 / t3code Mirror · read-only
Fork 0

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

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 06:00 UTC

main
ts 43 lines 1.52 KB
Raw
1 import type * as transfer from "@distilled.cloud/aws/transfer";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { User } from "./User.ts";
5
6 /**
7 * Runtime binding for `transfer:DeleteSshPublicKey`.
8 *
9 * Removes an SSH public key from the bound {@link User} by
10 * `SshPublicKeyId` (returned by {@link ImportSshPublicKey} or listed via
11 * {@link DescribeUser}) — the revocation half of key rotation. The
12 * `ServerId` and `UserName` are injected from the binding. Deleting a key
13 * that no longer exists fails with the typed `ResourceNotFoundException`.
14 * Provide the implementation with
15 * `Effect.provide(AWS.Transfer.DeleteSshPublicKeyHttp)`.
16 * ### Managing SSH Keys at Runtime
17 * **Example:** Revoke a User's Key
18 * ```typescript
19 * // init — bind the operation to the user
20 * const deleteSshPublicKey = yield* AWS.Transfer.DeleteSshPublicKey(user);
21 *
22 * // runtime
23 * yield* deleteSshPublicKey({ SshPublicKeyId: keyId }).pipe(
24 * Effect.catchTag("ResourceNotFoundException", () => Effect.void),
25 * );
26 * ```
27 *
28 * @binding
29 */
30 export interface DeleteSshPublicKey extends Binding.Service<
31 DeleteSshPublicKey,
32 "AWS.Transfer.DeleteSshPublicKey",
33 (
34 user: User,
35 ) => Effect.Effect<
36 (
37 request: Omit<transfer.DeleteSshPublicKeyRequest, "ServerId" | "UserName">,
38 ) => Effect.Effect<transfer.DeleteSshPublicKeyResponse, transfer.DeleteSshPublicKeyError>
39 >
40 > {}
41 export const DeleteSshPublicKey = Binding.Service<DeleteSshPublicKey>(
42 "AWS.Transfer.DeleteSshPublicKey",
43 );