Skip to content

DescribeCertificateAuthorityAuditReport

Source: src/AWS/ACMPCA/DescribeCertificateAuthorityAuditReport.ts

Runtime binding for acm-pca:DescribeCertificateAuthorityAuditReport.

Bind a CertificateAuthority inside a function runtime to check the status of an audit report started with CreateCertificateAuthorityAuditReport (reports are generated asynchronously into S3). Provide ACMPCA.DescribeCertificateAuthorityAuditReportHttp on the Function effect to implement the binding.

// init
const describeAuditReport =
yield* ACMPCA.DescribeCertificateAuthorityAuditReport(ca);
// runtime
const status = yield* describeAuditReport({
AuditReportId: report.AuditReportId!,
}).pipe(
Effect.repeat({
schedule: Schedule.spaced("2 seconds"),
until: (r) => r.AuditReportStatus !== "CREATING",
times: 10,
}),
);