edit-icon download-icon

Upload an SSL certificate

Last Updated: Nov 08, 2017

Description

This function is for uploading an SSL certificate for a specified custom domain name.

  • This function is intended for API providers.
  • The SSL certificate must match the custom domain name.
  • After the SSL certificate is bound, you can provide the HTTPS-based API service.

Request parameters

Name Type Required? Description
Action String Yes Interface name, which is a required parameter; value: SetDomainCertificate.
GroupId String Yes API group ID, which is generated by the system and globally unique.
DomainName String Yes Custom domain name.
CertificateName String Yes SSL certificate name.
CertificateBody String Yes Certificate content.
CertificatePrivateKey String Yes Private key of the certificate.

Returned parameters

Name Type Description
RequestId String Unique request ID.

Examples

Request example

  1. https://apigateway.cn-hangzhou.aliyuncs.com/?Action=SetDomainCertificate
  2. &GroupId=927d50c0f2e54b359919923d908bb015
  3. &DomainName=api.demo.com
  4. &CertificateName=test_cert
  5. &CertificateBody=-----BEGIN CERTIFICATE-----
  6. MIICaTCCAdICCQDLDvXtNkCrHjANBgkqhkiG9w0BAQUFADB5MQswCQYDVQQGEwJD
  7. TjELMAkGA1UECBMCWkoxCzAJBgNVBAcTAkhaMQ0wCwYDVQQKEwR0ZXN0MQ0wCwYD
  8. VQQLEwR0ZXN0MRQwEgYDVQQDEwthcGkuaWxhZC5jbjEcMBoGCSqGSIb3DQEJARYN
  9. dGVzdEB0ZXN0LmNvbTAeFw0xNjAzMzEwMzMxMTBaFw0yNjAzMjkwMzMxMTBaMHkx
  10. CzAJBgNVBAYTAkNOMQswCQYDVQQIEwJaSjELMAkGA1UEBxMCSFoxDTALBgNVBAoT
  11. BHRlc3QxDTALBgNVBAsTBHRlc3QxFDASBgNVBAMTC2FwaS5pbGFkLmNuMRwwGgYJ
  12. KoZIhvcNAQkBFg10ZXN0QHRlc3QuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCB
  13. iQKBgQDFfPttxLedyMF+tk/9VIGIIQ90LEx6JwfuKX38aO8zlN3+KxU7kMXBLYN7
  14. kB7yZDsHBo87wlxXXPg7FO+3HjEcWAy8FgBFNfrnLLjXEK23Lrkn/3AdVulQ+eEi
  15. oVfOokQ1PO7GYFZSo8UFvBzol2An/f2Sd/bey713/rIUVgUd7wIDAQABMA0GCSqG
  16. SIb3DQEBBQUAA4GBAAqj2TQ8jzbmN5IDM8fMOARKLQQK8qTgkrHMAMEq7PJwNRtK
  17. A05enhbgZKJVkYhYk5nccWb3XZuklm6KX/ImWM1zfxi9EjvdD6Xkvxd9RpdZwlod
  18. zu6LnGpfi0YFiIBY301sFp0ACPudUvE1tVckrqM/ONPNhHWEnkAT9DF84hEN
  19. -----END CERTIFICATE-----
  20. &CertificatePrivateKey=-----BEGIN RSA PRIVATE KEY-----
  21. MIICXAIBAAKBgQDFfPttxLedyMF+tk/9VIGIIQ90LEx6JwfuKX38aO8zlN3+KxU7
  22. kMXBLYN7kB7yZDsHBo87wlxXXPg7FO+3HjEcWAy8FgBFNfrnLLjXEK23Lrkn/3Ad
  23. VulQ+eEioVfOokQ1PO7GYFZSo8UFvBzol2An/f2Sd/bey713/rIUVgUd7wIDAQAB
  24. AoGAeBxKgvlYv5Mg8+MIBUhHO7b3wi1LGiPw882yfTiI+vM4jORBFqg3TgVTaWw/
  25. FicVq3E23h6YsN2vb6eNH+8x6DtGGZFiaWqIubWGEFenct8GPnlNY6JnxDdLMoGT
  26. K0P0r4qMZD5gSRs4sGR/wcGdbCGvSaFrzEConLmsaSlgLTkCQQD5KVwvchG/pai0
  27. o13LJ9F4TVSegt8roH6QO0SuEb4GiKqUlY+Q1+PIBMHS1VciBJGyAWreLJkZnfKK
  28. g80cDL6VAkEAyuiPBt4u9dc68qet9vgVAYBI95vyCvg2u+MdVJKFYKaqNEDXbeyV
  29. qsrlsJ46LCAsQiLpzdEyrOioGiW3yNo9cwJBAKkn0EMR0UToJcIFSy8aaFahQXqf
  30. 5P1MZ8BpzHXU68qpzA02AJLYTvdDa4dEeXRJ39QWrEQLySEgH0K0unJ5oIUCQDtp
  31. Ln+vTIa091CXYit+5f+jhTni0lL97GDFFhBuOllbU1irZ6iK7iOs9uXo3lWPMgZH
  32. XLfjuffAw3+sbYyEwhsCQEtkrLCYEi5PQ4Z2RjonIBWWgXs+hDkd6qe5QM4Asr5t
  33. SDX2p8U+SnvvzJ3HuLM2ZB3D8duKJHCrKwOjX7nlXHo=
  34. -----END RSA PRIVATE KEY-----
  35. &<Public request parameters>

Response example

XML format

  1. <SetDomainCertificateResponse>
  2. <RequestId>6EF60BEC-0242-43AF-BB20-270359FB54A7</RequestId>
  3. </SetDomainCertificateResponse>

JSON format

  1. {
  2. "RequestId": "6EF60BEC-0242-43AF-BB20-270359FB54A7",
  3. }
Thank you! We've received your feedback.