All Products
Search
Document Center

Edge Security Acceleration:SetDcdnDomainSSLCertificate

Last Updated:Oct 17, 2024

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

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
DomainNamestringYes

The domain name that is secured by the SSL certificate.

example.com
CertNamestringNo

The name of the new certificate. You can specify only one certificate name. This parameter is optional and valid only when CertType is set to upload.

yourCertName
CertIdlongNo

The certificate ID. This parameter is required and valid only when CertType is set to cas. If you specify this parameter, an existing certificate is used.

8089870
CertTypestringNo

The type of the certificate. Valid values:

  • 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. Valid values:

  • 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 of the SSL certificate. This parameter takes effect only when CertType is set to cas. Default value: cn-hangzhou. Valid values: cn-hangzhou and ap-southeast-1.

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"
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidSSLProtocol.ValueNotSupportedThe specified SSLProtocol is invalid.The specified SSL certificate parameter is invalid. Set the value to on or off.
400SSLPub.MissingParameterThe SSLPub parameter is required.The SSLPub parameter is not specified.
400SSLPri.MissingParameterThe SSLPri parameter is required.The SSLPri parameter is not specified.
400InvalidSSLPubThe specified SSLPub is invalid.The value specified for the SSLPub parameter is invalid.
400InvalidSSLPriThe specified SSLPri is invalid.The value specified for the SSLPri parameter is invalid.
400Certificate.MissMatchThe SSLPri does not match the certificate.The certificate and private key do not match.
400InvalidCertificate.TooLongThe maximum length of the certificate is exceeded.The maximum length of the specified certificate content has been reached.
400InvalidCertName.TooLongThe length of the certificate name cannot exceed 128 characters.The certificate name cannot contain more than 128 characters.
400AuthenticationFailedError performing verification.Identity authentication failed.
400SetDomainCertificate.ParameterErrorThe specified parameters are invalid.The specified parameter values are invalid.
400Certificate.StatusErrorThe status of the certificate is invalid.The specified certificate status is invalid.
400DeleteFailedError deleting the certificate.Failed to delete the certificate.
400Certificate.NotFindThe certificate does not exist.The specified certificate does not exist.
400Certificate.DuplicatedThe certificate name already exists.The certificate is duplicated.
400Certificate.FormatErrorThe format of the certificate is invalid.The specified certificate format is invalid.
400Certificate.StatusErrorThe certificate does not exist, or the status of the certificate is invalid.The specified certificate does not exist or the certificate status is invalid.
400Certificate.KeyNullThe private key is required.The private key is not specified.
400Key.MalformedThe specified Key format is invalid.The Key parameter is set in an invalid format.
400CertStorage.failedError saving the certificate.Failed to store the certificate.
400CertificateContent.DuplicatedThe certificate has been uploaded; do not upload again.The specified certificate has been uploaded. Do not upload the certificate again.
400Certificate.ExpiredThe certificate has expired.The certificate has expired.
400InvalidDomain.notOnlineThe domain is offline. Check the status of the domain and try again later.The specified domain name status is invalid. Check whether the domain name is online and try again later.
400Decode.ErrorError decoding the SSLPub or SSLPri certificate.The system has failed to decode the public key or the private key of the SSL certificate.
400sslPub.ErrorError encoding SSLPub.Failed to encode sslPub.
400sslPri.ErrorError encoding SSLPri.Failed to encode SSLPri.
400DomainInSafeModeThe domain is in safe mode. To request permission, contact Customer Service.The specified domain name is in the protected mode. If you must perform this operation, submit a ticket.
400CreateCertificateFailedCreate certificate failed,please try again.The certificate failed to be created. Create the certificate again.
400Abs.CertRegion.ValueNotSupportedCertRegion is not supported.The certificate region is not supported.
400CertNameAlreadyExistsThe CertName already exists.The certificate name already exists.
400Certificate.MissMatchThe certificate does not match the domain.The certificate and domain name do not match.
403DomainInProtectedModeThe domain is in protection mode. To request permission, contact Customer Service.The specified domain name is in the protected mode. If you must perform this operation, contact customer service.
404CertName.MissingParameterYou must specify CertName.Enter the certificate name.
404InvalidDomain.OfflineThe domain is offline.The domain name is disabled.

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

Change history

Change timeSummary of changesOperation
2024-05-11The Error code has changedView Change Details
2023-12-06The Error code has changedView Change Details
2023-09-04The Error code has changed. The request parameters of the API has changedView Change Details