Class OracleCloudCertificateFetcher
java.lang.Object
io.micronaut.oraclecloud.certificates.services.OracleCloudCertificateFetcher
@Internal
@Singleton
@Requires(classes=com.oracle.bmc.certificates.Certificates.class) @Requires(beans=com.oracle.bmc.certificates.Certificates.class)
public class OracleCloudCertificateFetcher
extends Object
Fetches certificates and private keys from Oracle Cloud Infrastructure (OCI) Certificates service
and converts them into
CertificateEvent
instances
consumable by Micronaut SSL infrastructure.
This component is intended for internal use and is compatible with the bootstrap context.
-
Constructor Summary
ConstructorsConstructorDescriptionOracleCloudCertificateFetcher
(com.oracle.bmc.certificates.Certificates certificates) Creates a new fetcher that uses the provided OCI Certificates client. -
Method Summary
Modifier and TypeMethodDescriptionretrieveCertificate
(String certificateId, Long versionNumber, String certificateVersionName) Retrieves a certificate bundle (including private key) from OCI and converts it into aCertificateEvent
.
-
Constructor Details
-
OracleCloudCertificateFetcher
public OracleCloudCertificateFetcher(com.oracle.bmc.certificates.Certificates certificates) Creates a new fetcher that uses the provided OCI Certificates client.- Parameters:
certificates
- OCI Certificates client builder.
-
-
Method Details
-
retrieveCertificate
public CertificateEvent retrieveCertificate(String certificateId, Long versionNumber, String certificateVersionName) throws CertificateException Retrieves a certificate bundle (including private key) from OCI and converts it into aCertificateEvent
.- Parameters:
certificateId
- The OCID of the certificate to retrieve. Required.versionNumber
- The specific version number of the certificate to retrieve. Optional; may benull
.certificateVersionName
- The named version of the certificate to retrieve. Optional; may benull
.- Returns:
- An
Optional
containing the resultingCertificateEvent
if retrieval succeeds; otherwise empty. - Throws:
CertificateException
- If the certificate content cannot be parsed.
-