开发者社区> 问答> 正文

如何设置证书?



SetDomainServerCertificate



描述


该接口用于设置某域名下证书功能是否启用及 修改证书信息

名称类型必须?描述
ActionString操作接口名,系统规定参数。取值:SetDomainServerCertificate
DomainNameString指定证书所属加速域名 需属于https加速类型
CertNameString证书名称
ServerCertificateStatusStringHTTPS证书是否启用,取值on:启用;off:不启用,默认取值:off:不启用
ServerCertificateString安全证书内容,不启用证书则无需输入,配置证书请输入证书内容。
PrivateKeyString私钥内容,不启用证书则无需输入,配置证书请输入私钥内容。


返回参数

名称类型描述
RequestIDString公共返回参数


特殊错误码 (公共错误码)

ErrorCode 错误码Message 错误信息HTTP 状态语义
InvalidDomain.NotFoundThe domain provided does not belong to you.404域名不存在或不属于当前用户
IllegalOperationIllegal domain operate is not permitted.403没有权限执行当前操作
ServiceBusyThe specified Domain is configuring, please retry later.403域名正在配置中, 请稍后再试
InvalidDomain.OfflineThe domain provided is offline.400域名已下线
OperationDeniedYour CDN service is suspended.403该账号已经欠费,请充值;
InvalidServerCertificateStatus.ValueNotSupportedThe specified value of parameter Enable is not supported.400ServerCertificateStatus的值不合法
ServerCertificate.MissingParameterAn input parameter ServerCertificate that is mandatory for processing the request is not supplied.400ServerCertificate参数缺失
PrivateKey.MissingParameterAn input parameter PrivateKey that is mandatory for processing the request is not supplied.400PrivateKey参数却是
InvalidCertificateThe Certificate you provided is malformed!400证书内容不合法
InvalidPrivateKeyThe Private Key you provided is malformed!400私钥内容不合法
Certificate.MissMatchThe Private Key does not math the specified Certificate!400证书和私钥不匹配
InvalidCertificate.TooLongThe Certificate you provided is over the max length!400证书内容超过长度限制
InvalidCertName.TooLongThe Certificate name you provided is over the max length 128!400证书名称不能超过128个字符.
SetDomainServerCertificate.ParameterErrorParameters have error.400参数错误
Certificate.StatusErrorCertificate is not exist or its status is error.400证书不存在或证书状态错误
DeleteFailedDelete certificate is failed.400删除证书失败
Certificate.NotFindNot find the certificate info.400没有查到相应证书
Certificate.DuplicatedThe certificate name is duplicated.400证书名称重复
Certificate.FormatErrorThe certificate format is error.400证书格式错误
Certificate.StatusErrorThe certificate status is error.400证书状态错误
Certificate.KeyNullThe private key is not null.400私钥不能为空
Key.MalformedThe private key format is error.400私钥格式错误


示例


请求示例: http://cdn.aliyuncs.com?Action=SetDomainServerCertificate&DomainName=test.com&CertName=myCert1&ServerCertificateStatus=on&ServerCertificate=xxx&PrivateKey=yyy&<公共请求参数>

返回示例
JSON格式: {
  "RequestId": "0AEDAF20-4DDF-4165-8750-47FF9C1929C9"
}


XML格式: <SetDomainServerCertificateResponse>
  <RequestId>8436769A-55D0-4DF8-BBA7-0DBC156D7AAF</RequestId>
</SetDomainServerCertificateResponse>

展开
收起
青衫无名 2017-10-24 10:53:31 3108 0
0 条回答
写回答
取消 提交回答
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载