feat(api): add ACM certificates to the cloud explorer
CI / checks (pull_request) Successful in 27m28s
CI / checks (pull_request) Successful in 27m28s
Request public certificates (optionally exportable) or import your own, see each domain's DNS validation records and what uses a certificate, download the certificate and chain, export an exportable one with its encrypted key, and revoke it. ListCertificates asks for every key type, since AWS otherwise leaves EC certificates out.
This commit is contained in:
@@ -33,6 +33,9 @@ import type {
|
||||
UserPoolSignInTestResult,
|
||||
UserPoolClientSettings,
|
||||
DistributionInvalidation,
|
||||
CertificatePem,
|
||||
CertificateRevocationReason,
|
||||
ExportedCertificate,
|
||||
AlarmHistoryItem,
|
||||
AlarmStateValue,
|
||||
MetricSeries,
|
||||
@@ -1679,6 +1682,44 @@ export async function testWebSocketApi(cloud: CloudProvider, apiId: string, inpu
|
||||
return res.data;
|
||||
}
|
||||
|
||||
export async function getCertificatePem(
|
||||
cloud: CloudProvider,
|
||||
certificateId: string,
|
||||
): Promise<CertificatePem> {
|
||||
const res = await apiClient.call<CertificatePem>(
|
||||
apiEndpointKeys.clouds.certificates.pem,
|
||||
requestOptions(cloud, "certificates"),
|
||||
{ cloud, id: certificateId },
|
||||
);
|
||||
return res.data;
|
||||
}
|
||||
|
||||
export async function exportCertificate(
|
||||
cloud: CloudProvider,
|
||||
certificateId: string,
|
||||
passphrase: string,
|
||||
): Promise<ExportedCertificate> {
|
||||
const res = await apiClient.call<ExportedCertificate, { passphrase: string }>(
|
||||
apiEndpointKeys.clouds.certificates.export,
|
||||
requestOptions(cloud, "certificates", { body: { passphrase } }),
|
||||
{ cloud, id: certificateId },
|
||||
);
|
||||
return res.data;
|
||||
}
|
||||
|
||||
export async function revokeCertificate(
|
||||
cloud: CloudProvider,
|
||||
certificateId: string,
|
||||
reason: CertificateRevocationReason,
|
||||
): Promise<CloudResource> {
|
||||
const res = await apiClient.call<CloudResource, { reason: CertificateRevocationReason }>(
|
||||
apiEndpointKeys.clouds.certificates.revoke,
|
||||
requestOptions(cloud, "certificates", { body: { reason } }),
|
||||
{ cloud, id: certificateId },
|
||||
);
|
||||
return res.data;
|
||||
}
|
||||
|
||||
export async function setDistributionEnabled(
|
||||
cloud: CloudProvider,
|
||||
distributionId: string,
|
||||
|
||||
Reference in New Issue
Block a user