创建自定义错误响应页面。当用户的请求被Web应用防火墙(WAF)阻断时,可以展示这些自定义的错误页面。用户可以配置页面HTML内容、页面类型、描述等信息,并通过BASE64编码方式提交页面内容。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
esa:CreatePage |
create |
*全部资源
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| Name |
string |
是 |
自定义页面的名称。 |
example |
| Description |
string |
否 |
页面的描述信息。 |
a custom deny page |
| ContentType |
string |
是 |
指定 HTTP Header 中的 Content-Type 字段,例如:
|
text/html |
| Content |
string |
否 |
BASE64 编码后的页面内容。 示例值: "PGh0bWw+aGVsbG8gcGFnZTwvaHRtbD4=" (表示 "hello page") |
PGh0bWw+aGVsbG8gcGFnZTwvaHRtbD4= |
| SiteIds |
array |
否 |
||
|
integer |
否 |
1 |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
Schema of Response |
||
| RequestId |
string |
请求 ID。 |
36af3fcc-43d0-441c-86b1-428951dc8225 |
| Id |
integer |
自定义响应页面的 ID,可通过调用 ListPages 接口获取。 |
50000001 |
示例
正常返回示例
JSON格式
{
"RequestId": "36af3fcc-43d0-441c-86b1-428951dc8225",
"Id": 50000001
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | InvalidParameter | The specified parameter is invalid. | 输入参数规范校验失败。 |
| 400 | InternalException | Failed to call the service. Try again later or contact technical support. | 调用服务失败,请稍后重试或联系客服咨询详情。 |
| 403 | %s.NotSupport | The specified resource type %s is not supported. | 不支持指定的资源类型。如需使用该类型资源,请与我们联系。 |
| 403 | %s.OverQuota | The quantity of %s exceeds the quota. | 该资源的数量超出了配额所规定的范围,如需申请更多的额度,请与我们联系。 |
| 403 | %s.WrongValueMatched | The value of specified parameter %s can not pass the matching check. | 指定的参数对应的值不能通过匹配校验。如果您确定需要使用该参数值,请与我们联系。 |
| 403 | Page.SiteAlreadyBound | The specified site has already been associated with another custom error page of the same type. Dissociate the site from the existing page and try again. | 指定的站点已被同类型的另一个自定义响应页面绑定,请先解除该站点与现有页面的绑定后重试。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。