All Products
Search
Document Center

CDN:SetCdnDomainSSLCertificate

Last Updated:Mar 28, 2024

Enables or disables the certificate for a domain name and updates the certificate information.

Operation description

  • You can call this operation up to 30 times per second per account.
  • Method: POST.

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
DomainNamestringYes

The accelerated domain name for which you want to configure the SSL certificate. The type of request supported by the domain name must be HTTPS. You can specify only one domain name in each request.

example.com
CertNamestringNo

The name of the SSL certificate. You can specify only one certificate name.

yourCertName
CertIdlongNo

The ID of the certificate.

8089870
CertTypestringNo

The type of the certificate.

  • upload: a user-uploaded SSL certificate.
  • cas: a certificate that is acquired through Certificate Management Service.
upload
SSLProtocolstringYes

Specifies whether to enable the SSL certificate.

  • on
  • off
off
SSLPubstringNo

The content of the SSL certificate. Specify the content of the SSL certificate only if you want to enable the SSL certificate.

xxx
SSLPristringNo

The private key. Specify the private key only if you want to enable the SSL certificate.

y****
CertRegionstringNo

The region ID of the certificate. Valid values: cn-hangzhou and ap-southeast-1. Default value: cn-hangzhou.

cn-hangzhou
EnvstringNo

Specifies whether the certificate is issued in canary releases. If you set this parameter to staging, the certificate is issued in canary releases. If you do not specify this parameter or set this parameter to other values, the certificate is officially issued.

staging

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

A7C69682-7F88-40DD-A198-10D0309E439D

Examples

Sample success responses

JSONformat

{
  "RequestId": "A7C69682-7F88-40DD-A198-10D0309E439D\n"
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidSSLProtocol.ValueNotSupportedThe specified SSLProtocol is invalid.-
400SSLPub.MissingParameterThe SSLPub parameter is required.-
400SSLPri.MissingParameterThe SSLPri parameter is required.-
400InvalidSSLPubThe specified SSLPub is invalid.-
400InvalidSSLPriThe specified SSLPri is invalid.-
400Certificate.MissMatchThe SSLPri does not match the certificate.-
400InvalidCertificate.TooLongThe maximum length of the certificate is exceeded.-
400InvalidCertName.TooLongThe length of the certificate name cannot exceed 128 characters.-
400IllegalOperationDomainYou are not authorized to operate the domain.You are not authorized to manage the domain name.
400AuthenticationFailedError performing verification.-
400SetDomainCertificate.ParameterErrorThe specified parameters are invalid.The specified parameter is invalid.
400Certificate.StatusErrorThe status of the certificate is invalid.-
400DeleteFailedError deleting the certificate.-
400Certificate.NotFindThe certificate does not exist.-
400Certificate.DuplicatedThe certificate name already exists.-
400Certificate.FormatErrorThe format of the certificate is invalid.The specified certificate is invalid.
400Certificate.StatusErrorThe certificate does not exist, or the status of the certificate is invalid.-
400Certificate.KeyNullThe private key is required.-
400Key.MalformedThe specified Key format is invalid.-
400CertStorage.failedError saving the certificate.-
400CertificateContent.DuplicatedThe certificate has been uploaded; do not upload again.-
400Certificate.ExpiredThe certificate has expired.-
400InvalidDomain.notOnlineThe domain is offline. Check the status of the domain and try again later.-
400Decode.ErrorError decoding the SSLPub or SSLPri certificate.-
400sslPub.ErrorError encoding SSLPub.-
400sslPri.ErrorError encoding SSLPri.-
400DomainInSafeModeThe domain is in safe mode. To request permission, contact Customer Service.-
400CreateCertificateFailedCreate certificate failed,please try again.Failed to create the certificate. Create it again.
400Abs.CertRegion.ValueNotSupportedCertRegion is not supported.The certificate region is not supported.
403DomainInProtectedModeThe domain is in protection mode. To request permission, contact Customer Service.-
404CertName.MissingParameterYou must specify CertName.-

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

Change history

Change timeSummary of changesOperation
2023-12-06The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 400 change
    delete Error Codes: 403
    delete Error Codes: 404
2023-09-04The Error code has changed. The request parameters of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
    delete Error Codes: 403
    delete Error Codes: 404
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: Env