All Products
Search
Document Center

Edge Security Acceleration:ListRedirectRules

Last Updated:Apr 16, 2025
This topic is generated by a machine translation engine without any human intervention. ALIBABA CLOUD DOES NOT GUARANTEE THE ACCURACY OF MACHINE TRANSLATED CONTENT. To request a human-translated version of this topic or provide feedback on this translation, please include it in the feedback form.

Query Redirect Rule List

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
esa:ListRedirectRulesnone
*Site
acs:esa:{#regionId}:{#accountId}:site/{#SiteId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
SiteIdlongYes

Site ID, which can be obtained by calling the ListSites interface.

123456******
ConfigIdlongNo

Configuration ID.

35281609698****
ConfigTypestringNo

Configuration type. Possible values:

  • global: Global configuration.
  • rule: Rule configuration.
rule
RuleNamestringNo

Rule name, which can be used to find the rule with the specified name.

rule_example
PageNumberintegerNo

Page number.

1
PageSizeintegerNo

Page size, default is 500, and the value range is 1~500.

20
SiteVersionintegerNo

Version number of the site configuration. For sites with version management enabled, you can use this parameter to specify the effective version of the site configuration, with the default being version 0.

0

Response parameters

ParameterTypeDescriptionExample
object

Request response result.

RequestIdstring

Request ID.

EDBD3EB3-97DA-5465-AEF5-8DCA5DC5E395
Configsarray<object>

List of redirect configurations.

configsobject

Details of the redirect configuration.

ConfigIdlong

Configuration ID.

35281609698****
SiteVersioninteger

Version number of the site configuration. For sites with version management enabled, you can use this parameter to specify the effective version of the site configuration, with the default being version 0.

1
Sequenceinteger

Rule execution order. The smaller the value, the higher the priority.

1
RuleEnablestring

Rule switch. This parameter does not need to be set when adding a global configuration. Possible values:

  • on: Enabled.
  • off: Disabled.
on
Rulestring

Rule content, using conditional expressions to match user requests. This parameter does not need to be set when adding a global configuration. There are two usage scenarios:

  • Match all incoming requests: Set the value to true
  • Match specific requests: Set the value to a custom expression, for example: (http.host eq "video.example.com")
(http.host eq "video.example.com")
RuleNamestring

Rule name. This parameter does not need to be set when adding a global configuration.

rule_example
ConfigTypestring

Configuration type. Possible values:

  • global: Global configuration.
  • rule: Rule configuration.
rule
Typestring

Redirect type. Possible values:

  • static: Static mode.
  • dynamic: Dynamic mode.
static
TargetUrlstring

Target URL after redirection.

http://www.exapmle.com/index.html
StatusCodestring

Response status code used by the node to respond to the client with the redirect address. Possible values:

  • 301
  • 302
  • 303
  • 307
  • 308
301
ReserveQueryStringstring

Preserve query string. Value range:

  • on: enabled.
  • off: disabled.
on
PageNumberinteger

Current page number.

1
PageSizeinteger

Page size.

20
TotalCountinteger

Total number of items.

10
TotalPageinteger

Total number of pages.

1

Examples

Sample success responses

JSONformat

{
  "RequestId": "EDBD3EB3-97DA-5465-AEF5-8DCA5DC5E395",
  "Configs": [
    {
      "ConfigId": 0,
      "SiteVersion": 1,
      "Sequence": 1,
      "RuleEnable": "on",
      "Rule": "(http.host eq \"video.example.com\")",
      "RuleName": "rule_example",
      "ConfigType": "rule",
      "Type": "static",
      "TargetUrl": "http://www.exapmle.com/index.html\n",
      "StatusCode": "301",
      "ReserveQueryString": "on"
    }
  ],
  "PageNumber": 1,
  "PageSize": 20,
  "TotalCount": 10,
  "TotalPage": 1
}

Error codes

HTTP status codeError codeError messageDescription
400InternalExceptionFailed to call the service. Try again later or contact technical support.Failed to call the service. Try again later or contact technical support.
400InvalidParameter.FunctionNameThe 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.

For a list of error codes, visit the Service error codes.