All Products
Search
Document Center

CDN:SetCdnDomainCSRCertificate

Last Updated:Jul 05, 2024

You can call this operation to configure an SSL certificate for a specific domain name.

Operation description

Note You can call this operation up to 100 times per second per account.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
ServerCertificatestringYes

The content of the certificate. The certificate must match the certificate signing request (CSR) created by calling the CreateCdnCertificateSigningRequest operation. Make sure that the content of the certificate is encoded in Base64 and then encoded by encodeURIComponent.

----BEGIN CERTIFICATE----- MIIFz****-----END CERTIFICATE-----
DomainNamestringYes

The accelerated domain name for which you want to configure an SSL certificate. The domain name must have HTTPS secure acceleration enabled.

example.com

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

0AEDAF20-4DDF-4165-8750-47FF9C1929C9

Examples

Sample success responses

JSONformat

{
  "RequestId": "0AEDAF20-4DDF-4165-8750-47FF9C1929C9"
}

Error codes

HTTP status codeError codeError messageDescription
400Certificate.MissingParameterYou must specify the Certificate parameter.You must specify the Certificate parameter.
400Certificate.EncodeErrorAn error occurred while encoding the certificate.-
400Certificate.DecodeErrorAn error occurred while decoding the certificate.-
400Certificate.FormatErrorThe format of the certificate is invalid.The specified certificate is invalid.
400Certificate.MissMatchThe certificate does not match the domain.The certificate and domain name do not match.
400Certificate.NoPrivateKeyThe private key of the certificate does not exist.-
500Internal.ForbidErrorYou cannot modify the configurations when some features of the domain are in a canary deployment.This domain cannot be changed because a feature is in canary release.
500Internal.ConfigErrorAn error occurred while configuring the certificate.-

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