调用BatchSetDcdnDomainCertificate接口批量设置是否启用域名证书功能及修改证书信息。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | BatchSetDcdnDomainCertificate |
操作接口名,系统规定参数。取值:BatchSetDcdnDomainCertificate。 |
DomainName | String | 是 | **example**.com |
指定证书所属的加速域名。需属于HTTPS加速类型,多个域名用英文逗号(,)隔开。 |
SSLProtocol | String | 是 | on |
是否启用HTTPS证书。取值:
默认取值为off。 |
CertName | String | 否 | cert-te**.com |
证书名称。 |
CertType | String | 否 | cas |
证书类型。取值:
|
SSLPub | String | 否 | x**** |
安全证书内容。不启用证书则无需输入,配置证书时需输入证书内容。 |
SSLPri | String | 否 | y**** |
私钥内容。不启用证书则无需输入,配置证书时需输入私钥内容。 |
Region | String | 否 | cn-hangzhou |
地域。 |
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
RequestId | String | 0AEDAF20-4DDF-4165-8750-47FF9C1929C9 |
请求ID。 |
示例
请求示例
http(s)://dcdn.aliyuncs.com/?Action=BatchSetDcdnDomainCertificate
&DomainName=**example**.com
&SSLProtocol=on
&<公共请求参数>
正常返回示例
XML
格式
<BatchSetDcdnDomainCertificateResponse>
<RequestId>0AEDAF20-4DDF-4165-8750-47FF9C1929C9</RequestId>
</BatchSetDcdnDomainCertificateResponse>
JSON
格式
{
"RequestId": "0AEDAF20-4DDF-4165-8750-47FF9C1929C9"
}
错误码
HttpCode | 错误码 | 错误信息 | 描述 |
---|---|---|---|
400 | InvalidSSLProtocol.ValueNotSupported | The specified SSLProtocol is invalid. | 不支持该HTTPS证书开关,请填写on或off。 |
404 | CertName.MissingParameter | You must specify CertName. | 请填写证书名称。 |
400 | SSLPub.MissingParameter | The SSLPub parameter is required. | 请填写SSLPub。 |
400 | SSLPri.MissingParameter | The SSLPri parameter is required. | 请填写SSLPri。 |
400 | InvalidSSLPub | The specified SSLPub is invalid. | SSLPub错误,请重新填写。 |
400 | InvalidSSLPri | The specified SSLPri is invalid. | SSLPri错误,请填写正确的SSLPri。 |
400 | Certificate.MissMatch | The SSLPri does not match the certificate. | 证书与私钥不匹配。 |
400 | InvalidCertificate.TooLong | The maximum length of the certificate is exceeded. | Certificate长度超过限制。 |
400 | InvalidCertName.TooLong | The length of the certificate name cannot exceed 128 characters. | 证书名称不能超过128个字符。 |
400 | IllegalOperationDomain | You are not authorized to operate the domain. | 您没有权限操作该域名。 |
400 | AuthenticationFailed | Error performing verification. | 身份验证失败。 |
400 | SetDomainCertificate.ParameterError | The specified parameters are invalid. | 参数错误,请填写正确的参数再重试。 |
400 | Certificate.StatusError | The status of the certificate is invalid. | 证书状态错误。 |
400 | DeleteFailed | Error deleting the certificate. | 删除证书失败。 |
400 | Certificate.NotFind | The certificate does not exist. | 证书不存在。 |
400 | Certificate.Duplicated | The certificate name already exists. | 证书重复。 |
400 | Certificate.FormatError | The format of the certificate is invalid. | 证书格式错误。 |
400 | Certificate.StatusError | The certificate does not exist, or the status of the certificate is invalid. | 证书不存在或证书状态错误。 |
400 | Certificate.KeyNull | The private key is required. | 私钥不能为空。 |
400 | Key.Malformed | The specified Key format is invalid. | 参数Key格式错误。 |
400 | CertStorage.failed | Error saving the certificate. | 证书保存失败。 |
400 | CertificateContent.Duplicated | The certificate has been uploaded; do not upload again. | 证书已经上传,请不要再次上传。 |
400 | Certificate.Expired | The certificate has expired. | 证书过期了。 |
400 | InvalidDomain.notOnline | The domain is offline. Check the status of the domain and try again later. | 域名未在线,请检查域名状态,稍后再试。 |
400 | Decode.Error | Error decoding the SSLPub or SSLPri certificate. | 证书 sslpub 或 sslpri 解码错误。 |
400 | sslPub.Error | Error encoding SSLPub. | sslPub 编码失败。 |
400 | sslPri.Error | Error encoding SSLPri. | sslPri 编码失败。 |
400 | DomainInSafeMode | The domain is in safe mode. To request permission, contact Customer Service. | 此域名处于安全模式。如果您想做这个操作,请工单联系我们。 |
403 | DomainInProtectedMode | The domain is in protection mode. To request permission, contact Customer Service. | 此域名处于被保护模式。如果您想做这个操作,请联系我们。 |
400 | InvalidDomainNumber.TooLong | The maximum number of DomainNumber is 50. | 域名个数不能超过50个。 |
访问错误中心查看更多错误码。