Enables or disables the certificate of a domain name, and modifies the certificate information.
Operation description
Obtain the domain name, and then call this operation to enable or disable the certificate of a domain name and modify the certificate information.
QPS limit
You can call this operation up to 30 times per second per account. Requests that exceed this limit are dropped and you will experience service interruptions. We recommend that you take note of this limit when you call this operation.
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 |
---|---|---|---|---|
live:SetLiveDomainCertificate | update | *Domain acs:cdn:*:{#accountId}:domain/{#DomainName} |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
DomainName | string | Yes | The domain name that is secured by the certificate. The domain name uses | developer.aliyundoc.com |
CertName | string | No | The certificate name. | Cert-**** |
CertType | string | No | The certificate type. Valid values:
| free |
SSLProtocol | string | Yes | Specifies whether to enable the HTTPS certificate. Valid values:
| off |
SSLPub | string | No | The public key. Note
This parameter is required only if you set the SSLProtocol parameter to on.
| **** |
SSLPri | string | No | The private key. Note
This parameter is required only if you set the SSLProtocol parameter to on.
| **** |
ForceSet | string | No | 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 has the same name. Set the value to 1. | 1 |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "16A96B9A-F203-4EC5-8E43-CB92E68F4CD8"
}
Error codes
HTTP status code | Error code | Error message |
---|---|---|
400 | InvalidSSLProtocol.ValueNotSupported | The specified value of parameter SSLProtocol is not supported. |
400 | SSLPub.MissingParameter | An input parameter "SSLPub" that is mandatory for processing the request is not supplied. |
400 | SSLPri.MissingParameter | An input parameter "SSLPri" that is mandatory for processing the request is not supplied. |
400 | InvalidSSLPub | The SSLPub you provided is malformed! |
400 | InvalidSSLPri | The SSLPri you provided is malformed! |
400 | Certificate.MissMatch | The SSLPri does not math the specified Certificate! |
400 | InvalidCertificate.TooLong | The Certificate you provided is over the max length! |
400 | InvalidCertName.TooLong | The Certificate name you provided is over the max length 128! |
400 | IllegalOperationDomain | You are not authorized to operate the domain. |
400 | Certificate.NotPermittedOff | Turn off certificate will change domain scheduling, please contact customer service |
400 | Certificate.SettedNotEffect | Certificate was successfully setted but does't take effect for protecting current service, please contact customer service |
400 | Certificate.NotFind | Not find the certificate info. |
400 | AuthenticationFailed | Authentication failed. |
400 | SetDomainCertificate.ParameterError | Parameters have error. |
400 | InvalidSSLPubOrInvalidSSLPri | The SSLPri or SSLPub you provided is malformed! |
400 | Certificate.MissMatch | The certificate is not match the private key. |
400 | Certificate.StatusError | Certificate is not exist or its status is error. |
400 | DeleteFailed | Delete certificate is failed. |
400 | Certificate.Duplicated | The certificate name is duplicated. |
400 | Certificate.FormatError | The certificate format is error. |
400 | Certificate.StatusError | The certificate status is error. |
400 | Certificate.KeyNull | The private key is not null. |
400 | Key.Malformed | The private key format is error. |
400 | CertStorage.failed | The certificate storage failed. |
400 | CertificateContent.Duplicated | The certificate is already uploaded, please don't upload again. |
400 | Certificate.Expired | The certificate is expired. |
400 | InvalidDomain.notOnline | The domain is not online, please check the domain status and try again later. |
400 | Decode.Error | The certificate sslpub or sslpri decode error. |
400 | sslPub.Error | The SSLPub encoded failed. |
400 | sslPri.Error | The SSLPri encoded failed. |
400 | DomainInSafeMode | This domain is in the safe mode. if you want to do this operation, please contact us! |
400 | DomainInProtectedMode | This domain is in the protected mode. if you want to do this operation, please contact us! |
400 | FunctionMutex | Function is mutex with other function. |
403 | IllegalOperation | Illegal domain operate is not permitted. |
404 | CertName.MissingParameter | The CertName parameter is required. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-09-29 | API Description Update. The Error code has changed | View Change Details |