All Products
Search
Document Center

SetDcdnDomainCertificate

Last Updated: May 17, 2019

Description

You can call this operation to enable or disable the certificate of a domain name, and modify the certificate information.

Request parameters

Name Type Required Description
Action String Yes The operation that you want to perform. Set the value to SetDcdnDomainCertificate.
DomainName String Yes The domain name secured by the certificate. The domain name uses HTTPS acceleration.
SSLProtocol String Yes Indicates whether to enable the HTTPS certificate. Valid values:
  • on: The HTTPS certificate is enabled.
  • off: The HTTPS certificate is disabled.
The default value for this parameter is “off.”
SSLPub String No The content of the certificate. If the certificate is disabled, you do not need to specify the content of the certificate.
SSLPri String No The private key. If the certificate is disabled, you do not need to specify the private key.
CertName String No The name of the certificate.
CertType String No The certificate type. Valid values:
  • upload: the local certificate
  • cas: the certificate issued by SSL Certificate Service
  • free: the free certificate

Response parameters

Name Type Description
RequestID String Common response parameters

Examples

Sample requests

  1. http://dcdn.aliyuncs.com?Action=SetDcdnDomainCertificate&DomainName=test.com&SSLProtocol=on&SSLPub=xxx&SSLPri=yyy&<Common request parameters>

Sample responses

JSON format

  1. {
  2. "RequestId": "0AEDAF20-4DDF-4165-8750-47FF9C1929C9"
  3. }

Error codes

Error code Error message HTTP status code Description
InvalidDomain.NotFound The domain provided does not belong to you. 404 The error message returned when the domain name does not exist or does not belong to you.
IllegalOperation Illegal domain operate is not permitted. 403 The error message returned when you have no permission to execute the operation.
ServiceBusy The specified Domain is configuring, please retry later. 403 The error message returned when the domain name is being configured. Please try again later.
InvalidDomain.Offline The domain provided is offline. 400 The error message returned when the domain name is offline.
OperationDenied Your CDN service is suspended. 403 The error message returned when your account has an overdue bill. Please add funds to your account.
InvalidSSLProtocol.ValueNotSupported The specified value of parameter Enable is not supported. 400 The error message returned when the SSLProtocol value is invalid.
SSLPub.MissingParameter An input parameter SSLPub that is mandatory for processing the request is not supplied. 400 The error message returned when the SSLPub parameter is not specified.
SSLPri.MissingParameter An input parameter SSLPri that is mandatory for processing the request is not supplied. 400 The error message returned when the SSLPri parameter is not specified.
InvalidCertificate The Certificate you provided is malformed! 400 The error message returned when the certificate is invalid.
InvalidSSLPri The SSLPri you provided is malformed! 400 The error message returned when the private key is invalid.
Certificate.MissMatch The SSLPri does not math the specified Certificate! 400 The error message returned when the private key does not match the specified certificate.
InvalidCertificate.TooLong The Certificate you provided is over the max length! 400 The error message returned when the length of the certificate exceeds the upper limit.
InvalidCertName.TooLong The Certificate name you provided is over the max length 128! 400 The error message returned when the certificate name exceeds 128 characters in length.
SetDomainSSLPub.ParameterError Parameters have error. 400 The error message returned when a parameter error occurs.
Certificate.StatusError Certificate is not exist or its status is error. 400 The error message returned when the certificate does not exist or the certificate status is incorrect.
DeleteFailed Delete certificate is failed. 400 The error message returned when the certificate fails to be deleted.
Certificate.NotFind Not find the certificate info. 400 The error message returned when the certificate cannot be found.
Certificate.Duplicated The certificate name is duplicated. 400 The error message returned when the certificate name already exists.
Certificate.FormatError The certificate format is error. 400 The error message returned when the certificate format is incorrect.
Certificate.StatusError The certificate status is error. 400 The error message returned when the certificate status is incorrect.
Certificate.KeyNull The SSLPri is not null. 400 The error message returned when the private key is not specified.
SSLPri.Malformed The SSLPri format is error. 400 The error message returned when the format of the private key is incorrect.