| 1 | import type * as privateca from "@distilled.cloud/gcp/privateca_v1"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { RuntimeContext } from "../../RuntimeContext.ts"; |
| 5 | import type { CertificateAuthority } from "./CertificateAuthority.ts"; |
| 6 | |
| 7 | export interface GetCertificateAuthorityRequest extends Omit< |
| 8 | privateca.GetProjectsLocationsCaPoolsCertificateAuthoritiesRequest, |
| 9 | "name" |
| 10 | > {} |
| 11 | |
| 12 | /** |
| 13 | * Runtime binding for Certificate Authority Service |
| 14 | * `certificateAuthorities.get`. |
| 15 | * |
| 16 | * Bind this operation to a {@link CertificateAuthority} in a Function/Action |
| 17 | * init phase. Provide {@link GetCertificateAuthorityHttp}. |
| 18 | * |
| 19 | * ### Observing Certificate Authorities |
| 20 | * **Example:** Read the bound CA |
| 21 | * ```typescript |
| 22 | * const getCa = yield* GCP.PrivateCA.GetCertificateAuthority(root); |
| 23 | * const live = yield* getCa(); |
| 24 | * ``` |
| 25 | * |
| 26 | * @binding |
| 27 | * @category PrivateCA |
| 28 | */ |
| 29 | export interface GetCertificateAuthority extends Binding.Service< |
| 30 | GetCertificateAuthority, |
| 31 | "GCP.PrivateCA.GetCertificateAuthority", |
| 32 | ( |
| 33 | ca: CertificateAuthority, |
| 34 | ) => Effect.Effect< |
| 35 | ( |
| 36 | request?: GetCertificateAuthorityRequest, |
| 37 | ) => Effect.Effect< |
| 38 | privateca.CertificateAuthority, |
| 39 | privateca.GetProjectsLocationsCaPoolsCertificateAuthoritiesError, |
| 40 | RuntimeContext |
| 41 | > |
| 42 | > |
| 43 | > {} |
| 44 | |
| 45 | export const GetCertificateAuthority = Binding.Service<GetCertificateAuthority>( |
| 46 | "GCP.PrivateCA.GetCertificateAuthority", |
| 47 | ); |