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

main
ts 45 lines 1.46 KB
Raw
1 import type * as acm from "@distilled.cloud/aws/acm";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { Certificate } from "./Certificate.ts";
5
6 /**
7 * The revoke request without the injected `CertificateArn`.
8 */
9 export interface RevokeCertificateRequest extends Omit<
10 acm.RevokeCertificateRequest,
11 "CertificateArn"
12 > {}
13
14 /**
15 * Runtime binding for `acm:RevokeCertificate`.
16 *
17 * Bind this operation to a {@link Certificate} to get a callable that revokes
18 * a previously exported public certificate — e.g. from a security-automation
19 * function reacting to a leaked private key. Revocation is permanent. Provide
20 * the implementation with `Effect.provide(AWS.ACM.RevokeCertificateHttp)`.
21 * ### Revoking Certificates
22 * **Example:** Revoke a Compromised Certificate
23 * ```typescript
24 * // init — bind the operation to the certificate
25 * const revokeCertificate = yield* AWS.ACM.RevokeCertificate(certificate);
26 *
27 * // runtime
28 * yield* revokeCertificate({ RevocationReason: "KEY_COMPROMISE" });
29 * ```
30 *
31 * @binding
32 */
33 export interface RevokeCertificate extends Binding.Service<
34 RevokeCertificate,
35 "AWS.ACM.RevokeCertificate",
36 (
37 certificate: Certificate,
38 ) => Effect.Effect<
39 (
40 request: RevokeCertificateRequest,
41 ) => Effect.Effect<acm.RevokeCertificateResponse, acm.RevokeCertificateError>
42 >
43 > {}
44
45 export const RevokeCertificate = Binding.Service<RevokeCertificate>("AWS.ACM.RevokeCertificate");