@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 40 lines 1.37 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 * Runtime binding for `acm:DescribeCertificate`.
8 *
9 * Bind this operation to a {@link Certificate} to get a callable that reads
10 * the certificate's live metadata — status, domain validation state, renewal
11 * summary, expiry — from inside a function runtime. Useful for expiry
12 * monitors and issuance dashboards. Provide the implementation with
13 * `Effect.provide(AWS.ACM.DescribeCertificateHttp)`.
14 * ### Inspecting Certificates
15 * **Example:** Read a Certificate's Status and Expiry
16 * ```typescript
17 * // init — bind the operation to the certificate
18 * const describeCertificate = yield* AWS.ACM.DescribeCertificate(certificate);
19 *
20 * // runtime
21 * const { Certificate: detail } = yield* describeCertificate();
22 * const status = detail?.Status;
23 * const notAfter = detail?.NotAfter;
24 * ```
25 *
26 * @binding
27 */
28 export interface DescribeCertificate extends Binding.Service<
29 DescribeCertificate,
30 "AWS.ACM.DescribeCertificate",
31 (
32 certificate: Certificate,
33 ) => Effect.Effect<
34 () => Effect.Effect<acm.DescribeCertificateResponse, acm.DescribeCertificateError>
35 >
36 > {}
37
38 export const DescribeCertificate = Binding.Service<DescribeCertificate>(
39 "AWS.ACM.DescribeCertificate",
40 );