全部产品
存储与CDN 数据库 域名与网站(万网) 应用服务 数加·人工智能 数加·大数据基础服务 互联网中间件 视频服务 开发者工具 解决方案 物联网 钉钉智能硬件
CDN

设置证书

更新时间:2018-01-17 16:50:41

SetDomainServerCertificate

描述

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

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

返回参数

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

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

ErrorCode 错误码 Message 错误信息 HTTP 状态 语义
InvalidDomain.NotFound The domain provided does not belong to you. 404 域名不存在或不属于当前用户
IllegalOperation Illegal domain operate is not permitted. 403 没有权限执行当前操作
ServiceBusy The specified Domain is configuring, please retry later. 403 域名正在配置中, 请稍后再试
InvalidDomain.Offline The domain provided is offline. 400 域名已下线
OperationDenied Your CDN service is suspended. 403 该账号已经欠费,请充值;
InvalidServerCertificateStatus.ValueNotSupported The specified value of parameter Enable is not supported. 400 ServerCertificateStatus的值不合法
ServerCertificate.MissingParameter An input parameter ServerCertificate that is mandatory for processing the request is not supplied. 400 ServerCertificate参数缺失
PrivateKey.MissingParameter An input parameter PrivateKey that is mandatory for processing the request is not supplied. 400 PrivateKey参数缺失
InvalidCertificate The Certificate you provided is malformed! 400 证书内容不合法
InvalidPrivateKey The Private Key you provided is malformed! 400 私钥内容不合法
Certificate.MissMatch The Private Key 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 证书名称不能超过128个字符.
SetDomainServerCertificate.ParameterError Parameters have error. 400 参数错误
Certificate.StatusError Certificate is not exist or its status is error. 400 证书不存在或证书状态错误
DeleteFailed Delete certificate is failed. 400 删除证书失败
Certificate.NotFind Not find the certificate info. 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 私钥格式错误

示例

请求示例:

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

返回示例

JSON格式:

  1. {
  2. "RequestId": "0AEDAF20-4DDF-4165-8750-47FF9C1929C9"
  3. }

XML格式:

  1. <SetDomainServerCertificateResponse>
  2. <RequestId>8436769A-55D0-4DF8-BBA7-0DBC156D7AAF</RequestId>
  3. </SetDomainServerCertificateResponse>
本文导读目录