Enables or disables the Secure Sockets Layer (SSL) certificate for a specified domain name and modify the certificate information.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | SetDcdnDomainCertificate |
The operation that you want to perform. Set the value to SetDcdnDomainCertificate. |
DomainName | String | Yes | example.com |
The name of the accelerated domain. You can specify only one domain name. HTTPS acceleration must be enabled for the specified accelerated domain. |
SSLProtocol | String | Yes | on |
Specifies whether to enable the HTTPS certificate. Valid values:
|
CertName | String | No | yourCertName |
The name of the certificate. |
CertType | String | No | cas |
The type of the certificate. Valid values:
|
SSLPub | String | No | SSLPub |
The content of the certificate. Specify this parameter only if you enable the certificate. |
SSLPri | String | No | SSLPri |
The private key. Specify this parameter only if you enable the certificate. |
Region | String | No | cn-shanghai |
The region. Default value: ch-hangzhou. |
ForceSet | String | No | 1 |
Specifies whether to check the certificate name for duplicates. If you set the value to 1, the system does not perform the check and overwrites the information about the certificate that uses the same name. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 0AEDAF20-4DDF-4165-8750-47FF9C1929C9 |
The ID of the request. |
Examples
Sample requests
http://dcdn.aliyuncs.com?Action=SetDcdnDomainCertificate
&DomainName=example.com
&SSLProtocol=on
&SSLPub=xxx
&SSLPri=yyy
&<Common request parameters>
Sample success responses
XML
format
<SetDcdnDomainCertificateResponse>
<RequestId>0AEDAF20-4DDF-4165-8750-47FF9C1929C9</RequestId>
</SetDcdnDomainCertificateResponse>
JSON
format
{
"RequestId": "0AEDAF20-4DDF-4165-8750-47FF9C1929C9"
}
Error codes
HttpCode | Error code | Error message | Description |
---|---|---|---|
400 | InvalidSSLProtocol.ValueNotSupported | The specified SSLProtocol is invalid. | The error message returned because the specified value of the SSLProtocol parameter is invalid. Set the SSLProtocol parameter to on or off. |
400 | SSLPub.MissingParameter | The SSLPub parameter is required. | The error message returned because the SSLPub parameter is not specified. |
400 | SSLPri.MissingParameter | The SSLPri parameter is required. | The error message returned because the SSLPri parameter is not specified. |
400 | InvalidSSLPub | The specified SSLPub is invalid. | The error message returned because the specified value of the SSLPub parameter is invalid. Specify another value. |
400 | InvalidSSLPri | The specified SSLPri is invalid. | The error message returned because the specified value of the SSLPri parameter is invalid. Specify a valid value. |
400 | Certificate.MissMatch | The SSLPri does not match the certificate. | The error message returned because the specified certificate and private key do not correspond to each other. |
400 | InvalidCertificate.TooLong | The maximum length of the certificate is exceeded. | The error message returned because the maximum length of the certificate content has been reached. |
400 | InvalidCertName.TooLong | The length of the certificate name cannot exceed 128 characters. | The error message returned because the maximum number of characters that consist of the certificate name has been reached. Specify a certificate name that does not exceed 128 characters in length. |
400 | IllegalOperationDomain | You are not authorized to operate the domain. | The error message returned because you are not authorized to manage the domain. |
400 | AuthenticationFailed | Error performing verification. | The error message returned because the authentication has failed. |
400 | SetDomainCertificate.ParameterError | The specified parameters are invalid. | The error message returned because the specified parameter values are invalid. Specify a valid value and try again. |
400 | Certificate.StatusError | The status of the certificate is invalid. | The error message returned because the certificate status is invalid. |
400 | DeleteFailed | Error deleting the certificate. | The error message returned because the system has failed to delete the specified certificate. |
400 | Certificate.NotFind | The certificate does not exist. | The error message returned because the specified certificate does not exist. |
400 | Certificate.Duplicated | The certificate name already exists. | The error message returned because the certificate already exists. |
400 | Certificate.FormatError | The format of the certificate is invalid. | The error message returned because the certificate format is invalid. |
400 | Certificate.StatusError | The certificate does not exist, or the status of the certificate is invalid. | The error message returned because the specified certificate does not exist or the certificate status is invalid. |
400 | Certificate.KeyNull | The private key is required. | The error message returned because the private key is not specified. |
400 | Key.Malformed | The specified Key format is invalid. | The error message returned because the format of the specified value for the Key parameter is invalid. |
400 | CertStorage.failed | Error saving the certificate. | The error message returned because the system has failed to save the certificate. |
400 | CertificateContent.Duplicated | The certificate has been uploaded; do not upload again. | The error message returned because the certificate has been uploaded. |
400 | Certificate.Expired | The certificate has expired. | The error message returned because the certificate has expired. |
400 | InvalidDomain.notOnline | The domain is offline. Check the status of the domain and try again later. | The error message returned because the specified domain is offline. Check the domain status and try again later. |
400 | Decode.Error | Error decoding the SSLPub or SSLPri certificate. | The error message returned because the system has failed to decode the public key or the private key of the SSL certificate. |
400 | sslPub.Error | Error encoding SSLPub. | The error message returned because the system has failed to encode the public key of the SSL certificate. |
400 | sslPri.Error | Error encoding SSLPri. | The error message returned because the system has failed to encode the private key of the SSL certificate. |
400 | DomainInSafeMode | The domain is in safe mode. To request permission, contact Customer Service. | The error message returned because the domain name is in security mode. To call this operation, submit a ticket. |
403 | DomainInProtectedMode | The domain is in protection mode. To request permission, contact Customer Service. | The error message returned because the specified domain is being protected. To call this operation, contact Customer Service. |
For a list of error codes, visit the API Error Center.