设置某域名下证书功能是否启用及修改证书信息。
接口说明
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
授权信息
下表是API对应的授权信息,可以在RAM权限策略语句的Action
元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:
- 操作:是指具体的权限点。
- 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
- 资源类型:是指操作中支持授权的资源类型。具体说明如下:
- 对于必选的资源类型,用背景高亮的方式表示。
- 对于不支持资源级授权的操作,用
全部资源
表示。
- 条件关键字:是指云产品自身定义的条件关键字。
- 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
操作 | 访问级别 | 资源类型 | 条件关键字 | 关联操作 |
---|---|---|---|---|
live:SetLiveDomainCertificate | update | *Domain acs:cdn:*:{#accountId}:domain/{#DomainName} |
| 无 |
请求参数
名称 | 类型 | 必填 | 描述 | 示例值 |
---|---|---|---|---|
DomainName | string | 是 | 指定证书所属加速域名。属于 | developer.aliyundoc.com |
CertName | string | 否 | 证书名称。 | Cert-**** |
CertType | string | 否 | 证书类型。取值:
| free |
SSLProtocol | string | 是 | HTTPS 证书是否启用。取值:
| off |
SSLPub | string | 否 | 公钥内容。 说明
当 SSLProtocol 取值为 on 时,本参数才必填。
| **** |
SSLPri | string | 否 | 私钥内容。 说明
当 SSLProtocol 取值为 on 时,本参数才必填。
| **** |
ForceSet | string | 否 | 忽略证书名称重复的校验,覆盖原有同名证书信息。固定取值:1。 | 1 |
返回参数
示例
正常返回示例
JSON
格式
{
"RequestId": "16A96B9A-F203-4EC5-8E43-CB92E68F4CD8"
}
错误码
HTTP status code | 错误码 | 错误信息 | 描述 |
---|---|---|---|
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. | - |
访问错误中心查看更多错误码。
变更历史
变更时间 | 变更内容概要 | 操作 |
---|---|---|
2024-09-29 | OpenAPI 描述信息更新、OpenAPI 错误码发生变更 | 查看变更详情 |