1import * as privateca from "@distilled.cloud/gcp/privateca_v1";
2import * as Layer from "effect/Layer";
3import { makeCertificateAuthorityHttpBinding } from "./BindingHttp.ts";
4import { GetCertificateAuthority } from "./GetCertificateAuthority.ts";
5
6/**
7 * HTTP implementation of {@link GetCertificateAuthority}.
8 *
9 * @layer
10 * @provides GCP.PrivateCA.GetCertificateAuthority
11 */
12export const GetCertificateAuthorityHttp = Layer.effect(
13 GetCertificateAuthority,
14 makeCertificateAuthorityHttpBinding({
15 tag: "GCP.PrivateCA.GetCertificateAuthority",
16 iam: { role: "roles/privateca.auditor", on: "privateca.caPool" },
17 operation: privateca.getProjectsLocationsCaPoolsCertificateAuthorities,
18 }),
19);