| 1 | import type * as acm from "@distilled.cloud/aws/acm"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { Certificate } from "./Certificate.ts"; |
| 5 | |
| 6 | /** |
| 7 | * Runtime binding for `acm:RenewCertificate`. |
| 8 | * |
| 9 | * Bind this operation to a {@link Certificate} to get a callable that forces |
| 10 | * managed renewal of an eligible certificate — typically an exported |
| 11 | * certificate whose renewal is not fully automatic. Useful in rotation |
| 12 | * functions that renew and then re-export a certificate. Provide the |
| 13 | * implementation with `Effect.provide(AWS.ACM.RenewCertificateHttp)`. |
| 14 | * ### Renewing Certificates |
| 15 | * **Example:** Force a Managed Renewal |
| 16 | * ```typescript |
| 17 | * // init — bind the operation to the certificate |
| 18 | * const renewCertificate = yield* AWS.ACM.RenewCertificate(certificate); |
| 19 | * |
| 20 | * // runtime |
| 21 | * yield* renewCertificate(); |
| 22 | * ``` |
| 23 | * |
| 24 | * @binding |
| 25 | */ |
| 26 | export interface RenewCertificate extends Binding.Service< |
| 27 | RenewCertificate, |
| 28 | "AWS.ACM.RenewCertificate", |
| 29 | ( |
| 30 | certificate: Certificate, |
| 31 | ) => Effect.Effect< |
| 32 | () => Effect.Effect<acm.RenewCertificateResponse, acm.RenewCertificateError> |
| 33 | > |
| 34 | > {} |
| 35 | |
| 36 | export const RenewCertificate = Binding.Service<RenewCertificate>( |
| 37 | "AWS.ACM.RenewCertificate", |
| 38 | ); |