Queries a single origin rule configuration.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
esa:GetOriginRule |
get |
*Site
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| SiteId |
integer |
Yes |
The site ID. Call ListSites to obtain it. |
3400350******** |
| ConfigId |
integer |
Yes |
The configuration ID. Call ListSiteRoutes to obtain it. |
33793140540**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Response schema. |
||
| RequestId |
string |
The request ID. |
04F0F334-1335-436C-A1D7-6C044FE73368 |
| ConfigId |
integer |
The configuration ID. |
352816096987136 |
| ConfigType |
string |
The configuration type. Valid values:
|
rule |
| SiteVersion |
integer |
The configuration version number. Specifies the website version for feature settings. Default: 0. |
1 |
| Sequence |
integer |
The rule execution order. Lower values have higher priority. |
1 |
| RuleEnable |
string |
Whether the rule is enabled. Not required for global configurations. Valid values:
|
on |
| Rule |
string |
The rule content, a conditional expression that matches user requests. Not required for global configurations. Use cases:
|
(http.host eq \"video.example.com\") |
| RuleName |
string |
The rule name. Not required for global configurations. |
rule_example |
| OriginHost |
string |
The Host header in origin requests. |
origin.example.com |
| OriginScheme |
string |
The back-to-origin protocol. Valid values:
|
http |
| OriginSni |
string |
The SNI in origin requests. |
origin.example.com |
| DnsRecord |
string |
The hostname that overrides the resolved hostname of an incoming request. |
test.example.com |
| OriginHttpPort |
string |
The HTTP port for back-to-origin requests. |
8080 |
| OriginHttpsPort |
string |
The HTTPS port for back-to-origin requests. |
4433 |
| Range |
string |
Whether to use range requests for back-to-origin. Valid values:
|
on |
| OriginMtls |
string |
Whether mTLS is enabled. Valid values:
|
on |
| OriginVerify |
string |
Whether origin certificate verification is enabled. Valid values:
|
on |
| RangeChunkSize |
string |
The range chunk size. Valid values:
|
1MB |
| OriginReadTimeout |
string |
The origin read timeout, in seconds. |
10 |
| Follow302Enable |
string |
Whether to follow 302 redirects. Valid values:
|
on |
| Follow302MaxTries |
string |
Maximum 302 redirect follows. Valid values: 1 to 5. |
1 |
| Follow302RetainArgs |
string |
Whether to retain original request parameters on redirect. Valid values:
|
on |
| Follow302RetainHeader |
string |
Whether to retain original request headers on redirect. Valid values:
|
on |
| Follow302TargetHost |
string |
The target host for 302 redirects. |
test.com |
Examples
Success response
JSON format
{
"RequestId": "04F0F334-1335-436C-A1D7-6C044FE73368",
"ConfigId": 352816096987136,
"ConfigType": "rule",
"SiteVersion": 1,
"Sequence": 1,
"RuleEnable": "on",
"Rule": "(http.host eq \\\"video.example.com\\\")\n",
"RuleName": "rule_example",
"OriginHost": "origin.example.com\n",
"OriginScheme": "http",
"OriginSni": "origin.example.com\n",
"DnsRecord": "test.example.com\n",
"OriginHttpPort": "8080",
"OriginHttpsPort": "4433",
"Range": "on",
"OriginMtls": "on",
"OriginVerify": "on",
"RangeChunkSize": "1MB",
"OriginReadTimeout": "10",
"Follow302Enable": "on",
"Follow302MaxTries": "1",
"Follow302RetainArgs": "on",
"Follow302RetainHeader": "on",
"Follow302TargetHost": "test.com"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InternalException | Failed to call the service. Try again later or contact technical support. | Failed to call the service. Try again later or contact technical support. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.