调用SetDcdnDomainSSLCertificate设置某域名下是否启用证书功能及更新证书信息。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
dcdn:SetDcdnDomainSSLCertificate |
none |
*Domain
|
无 | 无 |
请求参数
名称 |
类型 |
必填 |
描述 |
示例值 |
DomainName |
string |
是 |
证书所属的服务域名,需属于 HTTPS 加速类型。 |
example.com |
CertName |
string |
否 |
证书名称,目前只支持单个证书名称,只有 CertType=upload 时生效。 CertType=upload 时选填,给新证书的名称。 |
yourCertName |
CertId |
integer |
否 |
证书 ID,只有 CertType=cas 时生效。 CertType=cas 时必填,表示选择已有证书。 |
8089870 |
CertType |
string |
否 |
证书类型。
|
upload |
SSLProtocol |
string |
是 |
HTTPS 证书是否启用。
|
off |
SSLPub |
string |
否 |
安全证书内容,不启用证书则无需输入,配置证书请输入证书内容。 |
xxx |
SSLPri |
string |
否 |
私钥内容,不启用证书则无需输入,配置证书请输入私钥内容。 |
y**** |
CertRegion |
string |
否 |
证书所在地域,只有 CertType=cas 时生效。支持cn-hangzhou和ap-southeast-1,默认cn-hangzhou。国际站用户建议使用ap-southeast-1。 |
cn-hangzhou |
返回参数
名称 |
类型 |
描述 |
示例值 |
object |
|||
RequestId |
string |
请求 ID。 |
A7C69682-7F88-40DD-A198-10D0309E439D |
示例
正常返回示例
JSON
格式
{
"RequestId": "A7C69682-7F88-40DD-A198-10D0309E439D"
}
错误码
HTTP status code |
错误码 |
错误信息 |
描述 |
---|---|---|---|
400 | InvalidSSLProtocol.ValueNotSupported | The specified SSLProtocol is invalid. | 不支持该HTTPS证书开关,请填写on或off。 |
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 | 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.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. | 此域名处于安全模式。如果您想做这个操作,请工单联系我们。 |
400 | CreateCertificateFailed | Create certificate failed,please try again. | 创建证书失败,请重新创建证书。 |
400 | Abs.CertRegion.ValueNotSupported | CertRegion is not supported. | 不支持的证书地域。 |
400 | CertNameAlreadyExists | The CertName already exists. | 该证书名称已存在。 |
403 | DomainInProtectedMode | The domain is in protection mode. To request permission, contact Customer Service. | 此域名处于被保护模式。如果您想做这个操作,请联系我们。 |
404 | CertName.MissingParameter | You must specify CertName. | |
404 | InvalidDomain.Offline | The domain is offline. | 域名已下线。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。