Example 2: Pushing Your External SSL Certificate to Other Services
Scenario
This topic describes how to import your SSL certificates purchased on other platforms to SCM and push such certificates to your cloud services on Huawei Cloud, such as WAF and CDN, to keep your workloads secure.
Involved APIs
- Importing a certificate: Import an SSL certificate not purchased on SCM into SCM for centralized management.
- Querying the certificate list: Query all certificates under your current account and obtain the ID of the certificate to be pushed.
- Pushing a certificate: Push an SSL certificate imported into SCM to other Huawei Cloud services.
Procedure
- Import the certificate.
- API information
URI format: POST /v3/scm/certificates/import
For details, see Importing a Certificate
- Example request
POST: https://{endpoint}/v3/scm/certificates/import
Obtain {endpoint} from Regions and Endpoints.
- Example response
{ "certificate_id" : "scs1554192131150" }
- API information
- Query the certificate list.
- API information
URI format: GET /v3/scm/certificates
For details, see Querying the Certificate List.
- Example request
GET: https://{endpoint}/v3/scm/certificates
Obtain {endpoint} from Regions and Endpoints.
Body:
{ "limit": "2", "offset": "0" }
- Example response
{ "certificates" : [ { "id" : "scs1554192131150", "name" : "test", "domain" : "www.zx.com", "type" : "OV_SSL_CERT", "brand" : "GEOTRUST", "expire_time" : "2021-05-27 16:46:25.0", "domain_type" : "MULTI_DOMAIN", "validity_period" : 12, "status" : "ISSUED", "domain_count" : 2, "wildcard_count" : 0, "description" : null } ], "total_count" : 1 }
- API information
- Push a certificate.
- API information
URI format: POST /v3/scm/certificates/{certificate_id}/push
For details, see Pushing a Certificate
- Example request
POST: https://{endpoint}/v3/scm/certificates/scs1554192131150/push
Obtain {endpoint} from Regions and Endpoints.
- Example response
{ }
or{ "error_code" : "SCM.XXX", "error_msg" : "XXX" }
- API information
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot