申请免费证书。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
授权信息
下表是API对应的授权信息,可以在RAM权限策略语句的Action
元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:
- 操作:是指具体的权限点。
- 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
- 资源类型:是指操作中支持授权的资源类型。具体说明如下:
- 对于必选的资源类型,用前面加 * 表示。
- 对于不支持资源级授权的操作,用
全部资源
表示。
- 条件关键字:是指云产品自身定义的条件关键字。
- 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
操作 | 访问级别 | 资源类型 | 条件关键字 | 关联操作 |
---|---|---|---|---|
esa:ApplyCertificate | create | *Site acs:esa:{#regionId}:{#accountId}:site/{#SiteId} |
| 无 |
请求参数
名称 | 类型 | 必填 | 描述 | 示例值 |
---|---|---|---|---|
SiteId | long | 是 | 站点 ID。 | 1234567890123 |
Domains | string | 是 | 域名列表,多个域名用逗号分隔。 | www.example.com,blog.example.com |
Type | string | 否 | 证书类型。可能值:lets_encrypt:Let's Encrypt 证书;digicert_single:Digicert 单域名证书;digicert_wildcard:Digicert 泛域名证书。 | lets_encrypt |
返回参数
示例
正常返回示例
JSON
格式
{
"SiteName": "example.com ",
"TotalCount": 2,
"Result": [
{
"Domain": "*.example.com ",
"Status": "Applying",
"Id": "30000478"
}
],
"RequestId": "156A6B-677B1A-4297B7-9187B7-2B44792"
}
错误码
HTTP status code | 错误码 | 错误信息 | 描述 |
---|---|---|---|
400 | SiteNotFound | The specified site is not found. | 您指定的站点不存在,请检查输入的站点是否正确。 |
400 | SiteNotActivated | The site is not activated, the process is not allowed. | 站点未激活,不支持该操作。 |
400 | MissingSiteId | Required parameter SiteId missing. Specify SiteId and try again. | 缺少必填参数SiteId,请指定SiteId参数后重试。 |
400 | InvalidParameter.Domains | You have already submitted a certificate application for the domain name. | 您已提交该域名证书申请任务,请勿重复提交。 |
400 | InternalException | Failed to call the service. Try again later or contact technical support. | 调用服务失败,请稍后重试或联系客服咨询详情。 |
400 | InvalidParameter.Domains | The maximum number of domain names specified by parameter Domains has been reached. Adjust your configurations and try again. The upper limit of lets.encrypt type domain name is 50, the upper limit of digicert.single type domain name is 10, and the upper limit of digicert.wildcard type domain name is 1. | Domains参数中包含的域名数超过配额,请重新指定后重试。lets_encrypt类型域名上限为50,digicert_single类型域名上限为10,digicert_wildcard类型域名上限为1。 |
400 | InvalidParameter.Domains | The domain specified in Domains parameter is not a valid domain name, please check and try again. | Domains参数中存在无效的域名,请检查后重试。 |
400 | InvalidParameter.Domains | One or more domain names specified by parameter Domains do not belong to the current website. Check and try again. | 指定参数Domains中包含的域名存在不属于当前站点的情况,请检查后重试。 |
400 | QuotaCheckFailed | Failed to check free certificate Quota, please try again later. | 检查免费证书Quota失败,请稍后重试。 |
400 | InvalidParameter.Type | The specified Type parameter is invalid, please check and try again. | 您配置的Type参数有误,请您检查后重试。证书申请Type支持lets_encrypt,digicert_single,digicert_wildcard。 |
400 | QuotaExceed.RecordCount | The maximum number of records has been reached. Delete some and try again or upgrade your plan. | 记录数量已达上限,请删除部分记录后重试或升级套餐。 |
400 | InvalidParameter.Domains | The site which is configured in CNAME mode does not support wildcard domain certificate application. | CNAME站点不支持申请泛域名免费证书。 |
403 | Unauthorized.InvalidTime | The specified authentication time is invalid. | 您输入的鉴权时间参数无效,请检查参数值后重试。 |
403 | Unauthorized.InvalidToken | Token authentication failed. | 您输入的token无效,请检查并输入正确的token后进行重试。 |
403 | QuotaExceeded | The quota is exceeded. | 额度不足 |
访问错误中心查看更多错误码。