All Products
Search
Document Center

Key Management Service:UploadCertificate

Last Updated:Jul 29, 2025

Imports a certificate and a certificate chain issued by a certificate authority (CA) into Certificates Manager.

Operation description

In this example, a certificate issued by a CA is imported into Certificates Manager. The ID of the certificate in Certificates Manager is 12345678-1234-1234-1234-12345678****.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
CertificateIdstringYes

The ID of the certificate. The ID must be globally unique in Certificates Manager.

12345678-1234-1234-1234-12345678****
CertificatestringYes

The certificate issued by the CA, which is in the Privacy Enhanced Mail (PEM) format.

-----BEGIN CERTIFICATE----- (X.509 Certificate PEM Content) -----END CERTIFICATE-----
CertificateChainstringNo

The certificate chain issued by the CA, which is in the PEM format.

-----BEGIN CERTIFICATE----- (Sub CA Certificate PEM Content) -----END CERTIFICATE----- -----BEGIN CERTIFICATE----- (Sub CA Certificate PEM Content) -----END CERTIFICATE----- -----BEGIN CERTIFICATE----- (Root CA Certificate PEM Content) -----END CERTIFICATE-----

For more information about common request parameters, see Common parameters.

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request, which is used to locate and troubleshoot issues.

15a735a1-8fe6-45cc-a64c-3c4ff839334e

Examples

Sample success responses

JSONformat

{
  "RequestId": "15a735a1-8fe6-45cc-a64c-3c4ff839334e"
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidParameterThe specified parameter is not valid.An invalid value is specified for the parameter.
404InvalidAccessKeyId.NotFoundThe Access Key ID provided does not exist in our records.-

For a list of error codes, visit the Service error codes.