查询重写URL配置详情。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
esa:GetRewriteUrlRule |
get |
*Site
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| SiteId |
integer |
是 |
站点 ID,可通过调用 ListSites 接口获取。 |
123456**** |
| ConfigId |
integer |
是 |
配置 ID。可通过调用 ListRewriteUrlRules 接口获取。 |
35281609698**** |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
请求响应结果。 |
||
| RequestId |
string |
请求 ID。 |
0AEDAF20-4DDF-4165-8750-47FF9C1929C9 |
| ConfigId |
integer |
配置 ID。 |
35281609698**** |
| ConfigType |
string |
配置类型。取值范围:
|
global |
| SiteVersion |
integer |
站点配置的版本号。开启了配置版本管理的站点,可以通过该参数指定配置生效的站点版本,默认为版本 0。 |
0 |
| Sequence |
integer |
规则执行顺序。数值越小越优先执行。 |
1 |
| RuleEnable |
string |
规则开关。添加全局配置的时候不需要设置该参数。取值范围:
|
on |
| Rule |
string |
规则内容,使用条件表达式来匹配用户请求。添加全局配置的时候不需要设置该参数。存在两种使用场景:
|
(http.host eq "video.example.com") |
| RuleName |
string |
规则名称。添加全局配置的时候不需要设置该参数。 |
rule_example |
| RewriteUriType |
string |
路径重写类型。取值范围:
|
static |
| Uri |
string |
重写后的目标 URI。 |
/image/example.jpg |
| RewriteQueryStringType |
string |
查询字符串重写类型。取值范围:
|
static |
| QueryString |
string |
重写后的查询字符串。 |
example=123 |
示例
正常返回示例
JSON格式
{
"RequestId": "0AEDAF20-4DDF-4165-8750-47FF9C1929C9",
"ConfigId": 0,
"ConfigType": "global",
"SiteVersion": 0,
"Sequence": 1,
"RuleEnable": "on",
"Rule": "(http.host eq \"video.example.com\")",
"RuleName": "rule_example",
"RewriteUriType": "static",
"Uri": "/image/example.jpg",
"RewriteQueryStringType": "static",
"QueryString": "example=123"
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | InternalException | Failed to call the service. Try again later or contact technical support. | 调用服务失败,请稍后重试或联系客服咨询详情。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。