Enables or disables the certificate of a domain name and modifies the certificate information.
Operation description
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
vod:SetVodDomainCertificate | create | *All Resources * |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
DomainName | string | Yes | The domain name that is secured by the certificate. The domain name must use HTTPS acceleration. | example.com |
CertName | string | No | The name of the certificate. | cert_name |
SSLProtocol | string | Yes | Specifies whether to enable the SSL certificate. Default value: off. Valid values:
| off |
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. | **** |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "04F0F334-1335-436C-****-6C044FE73368"
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|
Common errors
The following table describes the error codes that this operation can return.
Error code | Error message | HTTP status code | Description |
---|---|---|---|
InvalidDomain.NotFound | The domain provided does not belong to you. | 404 | The error message returned because the specified domain name does not exist or does not belong to the current account. |
IllegalOperation | Illegal domain operate is not permitted. | 403 | The error message returned because you are not authorized to perform this operation. |
ServiceBusy | The specified Domain is configuring, please retry later. | 403 | The error message returned because the domain name is being configured. Try again later. |
InvalidDomain.Offline | The domain provided is offline. | 400 | The error message returned because the domain name is disabled. |
OperationDenied | Your CDN service is suspended. | 403 | The error message returned because your Alibaba Cloud account has overdue payments. Add funds to your account. |
InvalidSSLProtocol.ValueNotSupported | The specified value of parameter Enable is not supported. | 400 | The error message returned because the value of the SSLProtocol parameter is invalid. |
SSLPub.MissingParameter | An input parameter SSLPub that is mandatory for processing the request is not supplied. | 400 | The error message returned because 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 because the SSLPri parameter is not specified. |
InvalidCertificate | The Certificate you provided is malformed! | 400 | The error message returned because the certificate content is invalid. |
InvalidSSLPri | The SSLPri you provided is malformed! | 400 | The error message returned because the private key is invalid. |
Certificate.MissMatch | The SSLPri does not math the specified Certificate! | 400 | The error message returned because the certificate and the private key do not match. |
InvalidCertificate.TooLong | The Certificate you provided is over the max length! | 400 | The error message returned because the length of the certificate content exceeds the upper limit. |
InvalidCertName.TooLong | The Certificate name you provided is over the max length 128! | 400 | The error message returned because the certificate name contains more than 128 characters. |
SetDomainSSLPub.ParameterError | Parameters have error. | 400 | The error message returned because one or more parameters are invalid. |
Certificate.StatusError | Certificate is not exist or its status is error. | 400 | The error message returned because the certificate does not exist or the certificate status is invalid. |
DeleteFailed | Delete certificate is failed. | 400 | The error message returned because the system failed to delete the specified certificate. |
Certificate.NotFind | Not find the certificate info. | 400 | The error message returned because the certificate was not found. |
Certificate.Duplicated | The certificate name is duplicated. | 400 | The error message returned because the certificate name already exists. |
Certificate.FormatError | The certificate format is error. | 400 | The error message returned because the certificate format is invalid. |
Certificate.StatusError | The certificate status is error. | 400 | The error message returned because the certificate status is invalid. |
Certificate.KeyNull | The SSLPri is not null. | 400 | The error message returned because the private key is not specified. |
SSLPri.Malformed | The SSLPri format is error. | 400 | The error message returned because the format of the private key is invalid. |
Certificate.NotPermittedOff | Turn off certificate will change domain scheduling, please contact customer service. | 400 | The error message returned because disabling the certificate may affect the scheduling of the domain name. Contact Customer Service. |
Certificate.SettedNotEffect | Certificate was successfully set but doesn't take effect for protecting current service, please contact customer service. | 400 | The error message returned because the certificate is configured but temporarily disabled to protect your service. To enable the certificate, contact Customer Service. |