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

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

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes UploadCertificate

The operation that you want to perform. Set the value to UploadCertificate.

CertificateId String Yes 12345678-1234-1234-1234-12345678****

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

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

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

CertificateChain String No -----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-----

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

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

Response parameters

Parameter Type Example Description
RequestId String 15a735a1-8fe6-45cc-a64c-3c4ff839334e

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

Examples

Sample requests

http(s)://[Endpoint]/?Action=UploadCertificate
&CertificateId=12345678-1234-1234-1234-12345678****
&Certificate=-----BEGIN CERTIFICATE-----  (X.509 Certificate PEM Content)  -----END CERTIFICATE-----
&CertificateChain=-----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-----
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<UploadCertificateResponse>
    <RequestId>15a735a1-8fe6-45cc-a64c-3c4ff839334e</RequestId>
</UploadCertificateResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

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

Error codes

HTTP status code Error code Error message Description
400 InvalidParameter The specified parameter is not valid. The error message returned because an invalid value is specified for the parameter.
404 InvalidAccessKeyId.NotFound The Access Key ID provided does not exist in our records. The error message returned because the specified AccessKey ID does not exist.

For a list of error codes, visit the API Error Center.