Queries multiple cache configurations.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
esa:ListCacheRules |
list |
*Site
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| SiteId |
integer |
Yes |
The site ID, which can be obtained by calling the ListSites operation. |
123456**** |
| ConfigId |
integer |
No |
The configuration ID. |
35281609698**** |
| ConfigType |
string |
No |
The configuration type. You can use this parameter to query global or rule configurations. Valid values:
This parameter is optional. If you do not specify this parameter, both global and rule configurations are returned. Valid values:
|
global |
| RuleName |
string |
No |
The rule name. You do not need to set this parameter when you add a global configuration. |
test |
| PageNumber |
integer |
No |
The page number for a paged query. The value must be greater than or equal to 1. |
1 |
| PageSize |
integer |
No |
The number of entries per page for a paged query. Valid values: 1 to 500. |
20 |
| SiteVersion |
integer |
No |
The version number of the site. For sites with version management enabled, you can use this parameter to specify the site version for which the configuration takes effect. Default value: 0. |
1 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
The request ID. |
36af3fcc-43d0-441c-86b1-428951dc8225 |
| Configs |
array<object> |
The configuration list in the response body. |
|
|
object |
|||
| ConfigId |
integer |
The configuration ID. |
395386449776640 |
| SiteVersion |
integer |
The version number of the site configuration. For sites with configuration version management enabled, you can use this parameter to specify the site version for which the configuration takes effect. Default value: 0. |
1 |
| Sequence |
integer |
The rule execution order. A smaller value indicates a higher priority. |
1 |
| RuleEnable |
string |
The rule switch. You do not need to set this parameter when you add a global configuration. Valid values:
|
on |
| Rule |
string |
The rule content, which uses conditional expressions to match user requests. You do not need to set this parameter when you add a global configuration. Two scenarios are supported:
|
(http.host eq \"video.example.com\") |
| RuleName |
string |
The rule name. You do not need to set this parameter when you add a global configuration. |
rule_example |
| ConfigType |
string |
The configuration type. You can use this parameter to query global or rule configurations. Valid values:
|
global |
| BypassCache |
string |
The bypass cache mode. Valid values:
|
cache_all |
| BrowserCacheMode |
string |
The browser cache mode. Valid values:
|
no_cache |
| BrowserCacheTtl |
string |
The browser cache expiration time, in seconds. |
300 |
| EdgeCacheMode |
string |
The edge cache mode. Valid values:
|
follow_origin |
| EdgeCacheTtl |
string |
The edge cache expiration time, in seconds. |
300 |
| EdgeStatusCodeCacheTtl |
string |
The status code cache expiration time, in seconds.
|
5xx=0,404=10 |
| SortQueryStringForCache |
string |
Specifies whether to sort query strings. Valid values:
|
on |
| QueryStringMode |
string |
The query string handling mode when generating cache keys. Valid values:
|
ignore_all |
| QueryString |
string |
The query strings to retain or remove when generating cache keys. Multiple values are separated by spaces. |
example |
| IncludeHeader |
string |
The specified header names (case-insensitive) and their values to include when generating cache keys. Multiple values are separated by spaces. Header names support the following character types:
|
headername1 headername2 |
| IncludeCookie |
string |
The specified cookie names (case-insensitive) and their values to include when generating cache keys. Multiple values are separated by spaces. Cookie names support the following character types:
|
cookiename1 cookiename2 |
| CacheReserveEligibility |
string |
The cache reserve eligibility. Controls whether user requests bypass the cache reserve node during back-to-origin. Valid values:
|
bypass_cache_reserve |
| CheckPresenceHeader |
string |
When generating cache keys, checks whether the specified headers exist. If a header exists, its name (case-insensitive) is added to the cache key. Multiple header names are separated by spaces. Header names support the following character types:
|
headername1 headername2 |
| CheckPresenceCookie |
string |
When generating cache keys, checks whether the specified cookies exist. If a cookie exists, its name (case-insensitive) is added to the cache key. Multiple cookie names are separated by spaces. Cookie names support the following character types:
|
cookiename1 cookiename2 |
| UserDeviceType |
string |
Specifies whether to include the type of the client when generating cache keys. Valid values:
|
on |
| UserGeo |
string |
Specifies whether to include the client geographic location when generating cache keys. Valid values:
|
on |
| UserLanguage |
string |
Specifies whether to include the client language type when generating cache keys. Valid values:
|
on |
| ServeStale |
string |
Specifies whether to serve stale cache. When enabled, edge nodes can respond to user requests with cached expired files when the origin server is unavailable. Valid values:
|
on |
| AdditionalCacheablePorts |
string |
|
8880,2052,2086 |
| CacheDeceptionArmor |
string |
The cache deception armor. Protects against web cache deception attacks by caching only content that passes validation. Valid values:
|
on |
| PostCache |
string |
Specifies whether to enable POST caching. |
on |
| PostBodyCacheKey |
string |
The cache key handling mode for POST caching. The following two modes are supported:
|
ignore |
| PostBodySizeLimit |
string |
The body size limit for POST caching. The value is a number in KB. Valid values: 1 to 8. If this parameter is left empty, the default value of 8 KB takes effect. |
1 |
| PageNumber |
integer |
The current page number, which is the same as the PageNumber request parameter. |
1 |
| PageSize |
integer |
The number of entries per page. |
10 |
| TotalCount |
integer |
The total number of records. |
20 |
| TotalPage |
integer |
The total number of pages. |
2 |
Examples
Success response
JSON format
{
"RequestId": "36af3fcc-43d0-441c-86b1-428951dc8225",
"Configs": [
{
"ConfigId": 395386449776640,
"SiteVersion": 1,
"Sequence": 1,
"RuleEnable": "on",
"Rule": "(http.host eq \\\"video.example.com\\\")",
"RuleName": "rule_example",
"ConfigType": "global",
"BypassCache": "cache_all",
"BrowserCacheMode": "no_cache",
"BrowserCacheTtl": "300",
"EdgeCacheMode": "follow_origin",
"EdgeCacheTtl": "300",
"EdgeStatusCodeCacheTtl": "5xx=0,404=10",
"SortQueryStringForCache": "on",
"QueryStringMode": "ignore_all",
"QueryString": "example",
"IncludeHeader": "headername1 headername2",
"IncludeCookie": "cookiename1 cookiename2",
"CacheReserveEligibility": "bypass_cache_reserve",
"CheckPresenceHeader": "headername1 headername2",
"CheckPresenceCookie": "cookiename1 cookiename2",
"UserDeviceType": "on",
"UserGeo": "on",
"UserLanguage": "on",
"ServeStale": "on",
"AdditionalCacheablePorts": "8880,2052,2086",
"CacheDeceptionArmor": "on",
"PostCache": "on",
"PostBodyCacheKey": "ignore",
"PostBodySizeLimit": "1"
}
],
"PageNumber": 1,
"PageSize": 10,
"TotalCount": 20,
"TotalPage": 2
}
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. |
| 400 | InvalidParameter.FunctionName | The specified feature does not exist. Specify a valid feature name based on the related documentation. | The specified feature does not exist. Specify a valid feature name based on the related documentation. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.