Enables or disables the Secure Sockets Layer (SSL) certificate for a specified domain name. When you call this operation to enable the SSL certificate, you can also modify the certificate information.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes SetLiveDomainCertificate

The operation that you want to perform. Set the value to SetLiveDomainCertificate.

DomainName String Yes play.yourdomain.com

The domain name that is secured by the certificate. The domain name uses HTTPS acceleration.

SSLProtocol String Yes off

Specifies whether to enable the SSL certificate. Valid values:

  • on: enables the SSL certificate.
  • off: disables the SSL certificate. This is the default value.
CertName String No Cert-****

The name of the certificate.

CertType String No free

The type of the certificate. Valid values: Valid values:

  • upload: an uploaded certificate
  • cas: a certificate that is issued by SSL Certificates Service
  • free: a free certificate
SSLPub String No ****

The content of the certificate.

This parameter is required only if you enable the SSL certificate.

SSLPri String No ****

The private key.

This parameter is required only if you enable the SSL certificate.

ForceSet String No 1

Specifies whether to check the certificate name for duplicates. A value of 1 indicates that the system does not perform the check and overwrites the information about the certificate that uses the same name. Set the value to 1.

Response parameters

Parameter Type Example Description
RequestId String 16A96B9A-F203-4EC5-8E43-CB92E68F4CD8

The ID of the request.

Examples

Sample requests

http(s)://live.aliyuncs.com/? Action=SetLiveDomainCertificate
&DomainName=play.yourdomain.com
&SSLProtocol=off
&<Common request parameters>

Sample success responses

XML format

<SetLiveDomainCertificateResponse>
	  <RequestId>0AEDAF20-4DDF-4165-8750-47FF9C1929C9</RequestId>
</SetLiveDomainCertificateResponse>

JSON format

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

Error codes

HttpCode Error code Error message Description
403 IllegalOperation Illegal domain operate is not permitted. The error message returned because you do not have the permission to call this operation as a RAM user. Use the Alibaba Cloud account to grant the required permissions to the RAM user.

For a list of error codes, visit the API Error Center.