The `google-cloud-certificate-manager` library is the official Python client for the Google Cloud Certificate Manager API. It allows developers to programmatically acquire and manage TLS (SSL) certificates for use with Cloud Load Balancing. Currently at version 1.13.0, it is part of the larger `google-cloud-python` monorepo, which undergoes frequent updates, ensuring ongoing feature development and maintenance.
pip install google-cloud-certificate-managerVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to initialize the `CertificateManagerClient` and list existing certificates within a specified Google Cloud project and location. Ensure your `GOOGLE_CLOUD_PROJECT` environment variable is set or replace 'your-project-id' with your actual project ID. Authentication is handled automatically via Application Default Credentials (ADC) if configured.
Upgrade your Python environment to 3.9 or higher.
Refer to Google Cloud's authentication documentation for Python client libraries to configure Application Default Credentials or explicitly provide credentials to the client.
Navigate to the Google Cloud Console, search for 'Certificate Manager API', and ensure it is enabled for your project.
Only use the client as a context manager if the transport is not shared. For long-running applications or shared transports, initialize the client outside a `with` statement and explicitly close the client's transport when no longer needed using `client.close()`.
Ensure the library is installed using pip: `pip install google-cloud-certificate-manager`
Check the detailed `authorizationAttemptInfo` for specific `failureReason` (e.g., `CONFIG`) and ensure DNS A/AAAA records point to the load balancer, CNAME records are correctly configured for DNS authorization, or CAA records permit Google to issue certificates.
Verify and correct the CNAME record in your DNS configuration to exactly match the value provided by Certificate Manager for domain authorization.
Ensure the certificate is in PEM format and is valid. You can use OpenSSL to validate the certificate (e.g., `openssl x509 -in CERTIFICATE_FILE -text -noout`) and ensure no extraneous characters like newline characters are present.