Queries the forwarding rules in a region.
Debugging
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:
- The required resource types are displayed in bold characters.
- 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.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
alb:ListRules | Read |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
NextToken | string | No | The starting point of the current query. If you do not specify this parameter, the query starts from the beginning. | FFmyTO70tTpLG6I3FmYAXGKPd**** |
MaxResults | integer | No | The maximum number of entries to return. Valid values: 1 to 100. Default value: 20. If you do not specify this parameter, the default value is used. Note
This parameter is optional.
| 20 |
RuleIds | array | No | The forwarding rules. | |
string | No | The forwarding rule ID. You can specify up to 20 IDs in each request. | rule-sada | |
ListenerIds | array | No | The listener IDs. | |
string | No | The listener ID. You can specify up to 20 IDs in each request. | lsn-i35udpz3pxsmnf**** | |
LoadBalancerIds | array | No | The Application Load Balancer (ALB) instance IDs. | |
string | No | The ALB instance ID. You can specify up to 20 IDs in each request. | alb-x30o38azsuj0sx**** | |
Direction | string | No | The direction to which the forwarding rule is applied. Valid values:
Note
You cannot set this parameter to Response if you use basic ALB instances.
| Request |
Tag | object [] | No | The tag. | |
Key | string | No | The tag key. The tag key can be up to 128 characters in length. It cannot start with aliyun or acs: and cannot contain http:// or https://. | env |
Value | string | No | The tag value. The tag value can be up to 128 characters in length. It cannot start with aliyun or acs: and cannot contain http:// or https://. | product |
Response parameters
Examples
Sample success responses
JSON
format
{
"MaxResults": 50,
"NextToken": "FFmyTO70tTpLG6I3FmYAXGKPd****",
"RequestId": "CEF72CEB-54B6-4AE8-B225-F876FF7BA984",
"Rules": [
{
"ListenerId": "lsn-i35udpz3pxsmnf****",
"LoadBalancerId": "alb-x30o38azsuj0sx****",
"Priority": 1,
"RuleActions": [
{
"FixedResponseConfig": {
"Content": "dssacav",
"ContentType": "text/plain",
"HttpCode": "HTTP_2xx"
},
"ForwardGroupConfig": {
"ServerGroupTuples": [
{
"ServerGroupId": "sg-atstuj3rtoptyui****",
"Weight": 2
}
],
"ServerGroupStickySession": {
"Enabled": true,
"Timeout": 100
}
},
"InsertHeaderConfig": {
"Key": "key",
"Value": "ClientSrcPort",
"ValueType": "SystemDefined"
},
"Order": 1,
"RedirectConfig": {
"Host": "www.example.com",
"HttpCode": "301",
"Path": "/test",
"Port": "10",
"Protocol": "HTTP",
"Query": "quert"
},
"RemoveHeaderConfig": {
"Key": "key"
},
"RewriteConfig": {
"Host": "www.example.com",
"Path": "/tsdf",
"Query": "quedsa"
},
"TrafficMirrorConfig": {
"TargetType": "ForwardGroupMirror",
"MirrorGroupConfig": {
"ServerGroupTuples": [
{
"ServerGroupId": "srg-00mkgijak0w4qgz9****",
"Weight": 2
}
]
}
},
"TrafficLimitConfig": {
"QPS": 4,
"PerIpQps": 80
},
"Type": "ForwardGroup",
"CorsConfig": {
"AllowOrigin": [
"http://test.com"
],
"AllowMethods": [
"GET"
],
"AllowHeaders": [
"test_123"
],
"ExposeHeaders": [
"test_123"
],
"AllowCredentials": "on",
"MaxAge": 1000
}
}
],
"RuleConditions": [
{
"CookieConfig": {
"Values": [
{
"Key": "test",
"Value": "test"
}
]
},
"HeaderConfig": {
"Key": "Port",
"Values": [
"5006"
]
},
"HostConfig": {
"Values": [
"www.example.com"
]
},
"MethodConfig": {
"Values": [
"PUT"
]
},
"PathConfig": {
"Values": [
"/test"
]
},
"QueryStringConfig": {
"Values": [
{
"Key": "test",
"Value": "test"
}
]
},
"SourceIpConfig": {
"Values": [
"192.168.XX.XX/32"
]
},
"ResponseStatusCodeConfig": {
"Values": [
"200"
]
},
"ResponseHeaderConfig": {
"Key": "key",
"Values": [
"value"
]
},
"Type": "Host"
}
],
"RuleId": "rule-bpn0kn908w4nbw****",
"RuleName": "rule-instance-test",
"RuleStatus": "Available",
"Direction": "Request",
"Tags": [
{
"Key": "env",
"Value": "product"
}
]
}
],
"TotalCount": 1000
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
403 | Forbidden.LoadBalancer | Authentication is failed for %s. | Authentication is failed for %s. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation | ||||
---|---|---|---|---|---|---|
2024-01-29 | The Error code has changed | see changesets | ||||
| ||||||
2024-01-23 | The internal configuration of the API is changed, but the call is not affected | see changesets | ||||
| ||||||
2023-06-01 | The response structure of the API has changed | see changesets | ||||
| ||||||
2023-06-01 | The response structure of the API has changed | see changesets | ||||
|