Example 1: Deleting an Expired SSL Certificate
Scenario
This topic describes how to delete an expired SSL certificate using the SCM API.
- This topic only describes how to delete an SSL certificate from Huawei Cloud. The certificate will still be valid and trusted by web browsers.
- After you submit a certificate deletion application, you cannot cancel it. Exercise caution when performing this operation.
Involved APIs
- Querying the certificate list: Query all SSL certificates under your current account.
- Deleting a certificate: Delete a specific expired SSL certificate.
Procedure
- 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
- Delete a certificate.
- API information
URI format: DELETE /v3/scm/certificates/{certificate_id}
For details, see Deleting a Certificate.
- Example request
DELETE: https://{endpoint}/v3/scm/certificates/scs1554192131150
Obtain {endpoint} from Regions and Endpoints.
Body:
{ certificate_id:scs1554192131150 }
- 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