Queries the configurations of a specified forwarding rule.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
slb:DescribeRuleAttribute |
get |
*loadbalancer
|
|
None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The ID of the region where the Server Load Balancer (SLB) instance is deployed. You can call the DescribeRegions operation to query the most recent region list. |
cn-hangzhou |
| RuleId |
string |
Yes |
The ID of the forwarding rule. |
rule-bp1efemp9**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| VServerGroupId |
string |
The ID of the vServer group that is associated with the forwarding rule. |
rsp-cige6j**** |
| Cookie |
string |
The cookie to be configured on the backend server. The cookie must be 1 to 200 characters in length and can contain ASCII letters and digits. It cannot contain commas (,), semicolons (;), or whitespace characters. It cannot start with a dollar sign ($). If you set the StickySession parameter to on and the StickySessionType parameter to server, this parameter is required. |
wwe |
| LoadBalancerId |
string |
The ID of the SLB instance. |
lb-bp1ca0zt07t934wxe**** |
| RuleId |
string |
The ID of the forwarding rule. |
rule-hfgnd***** |
| RequestId |
string |
The ID of the request. |
9DEC9C28-AB05-4DDF-9A78-6B08EC9CE18C |
| HealthCheckConnectPort |
integer |
The backend port that is used for health checks. Valid values: 1 to 65535. Note
If you set the HealthCheck parameter to on, this parameter is required. If this parameter is empty but HealthCheck is set to on, the listener port is used for health checks. |
23 |
| HealthCheckTimeout |
integer |
The timeout period of a health check response. If a backend ECS instance does not respond within the specified timeout period, the ECS instance fails the health check. Valid values: 1 to 300. Unit: seconds. Note
If you set the HealthCheck parameter to on, this parameter is required. |
34 |
| CookieTimeout |
integer |
The timeout period of a cookie. Valid values: 1 to 86400. Unit: seconds. Note
If you set the StickySession parameter to on and the StickySessionType parameter to insert, this parameter is required. |
12 |
| HealthCheckDomain |
string |
The domain name that is used for health checks. Valid values:
Note
If you set the HealthCheck parameter to on, this parameter is required. |
www.example.com |
| UnhealthyThreshold |
integer |
The number of consecutive failed health checks that must occur before a healthy backend server is declared unhealthy. In this case, the health check state is changed from success to fail. Valid values: 2 to 10. Note
If you set the HealthCheck parameter to on, this parameter is required. |
3 |
| HealthCheckHttpCode |
string |
The HTTP status code that indicates a successful health check. Separate multiple HTTP status codes with commas (,). Default value: http_2xx. Valid values: http_2xx, http_3xx, http_4xx, and http_5xx. Note
If you set the HealthCheck parameter to on, this parameter is required. |
http_3xx |
| Domain |
string |
The domain name that is configured in the forwarding rule. |
www.example.com |
| ListenerPort |
string |
The listener port that is used by the SLB instance. |
90 |
| Url |
string |
The URL that is configured in the forwarding rule. |
/cache |
| HealthCheckInterval |
integer |
The time interval between two consecutive health checks. Valid values: 1 to 50. Unit: seconds. Note
If you set the HealthCheck parameter to on, this parameter is required. |
34 |
| HealthCheckURI |
string |
The URI that is used for health checks. Note
If you set the HealthCheck parameter to on, this parameter is required. |
/rest |
| RuleName |
string |
The name of the forwarding rule. |
Rule1 |
| StickySessionType |
string |
The method that is used to handle a cookie. Valid values:
Note
If you set the StickySession parameter to on, this parameter is required. |
insert |
| Scheduler |
string |
The scheduling algorithm. Valid values:
Note
If you set the ListenerSync parameter to off, this parameter is required. If you set the parameter to on, the configuration of the listener is used. |
wrr |
| ListenerSync |
string |
Indicates whether the forwarding rule uses the scheduling algorithm, session persistence, and health check configurations of the listener. Valid values: on and off.
|
off |
| HealthyThreshold |
integer |
The number of consecutive successful health checks that must occur before an unhealthy backend server is declared healthy. In this case, the health check state is changed from fail to success. Valid values: 2 to 10. Note
If you set the HealthCheck parameter to on, this parameter is required. |
2 |
| StickySession |
string |
Indicates whether session persistence is enabled. Valid values: on and off. Note
If you set the ListenerSync parameter to off, this parameter is required. If you set the parameter to on, the configuration of the listener is used. |
off |
| HealthCheck |
string |
Specifies whether to enable health checks. Valid values: on and off. Note
If you set the ListenerSync parameter to off, this parameter is required. If you set the parameter to on, the configuration of the listener is used. |
off |
Examples
Success response
JSON format
{
"VServerGroupId": "rsp-cige6j****",
"Cookie": "wwe",
"LoadBalancerId": "lb-bp1ca0zt07t934wxe****",
"RuleId": "rule-hfgnd*****",
"RequestId": "9DEC9C28-AB05-4DDF-9A78-6B08EC9CE18C",
"HealthCheckConnectPort": 23,
"HealthCheckTimeout": 34,
"CookieTimeout": 12,
"HealthCheckDomain": "www.example.com",
"UnhealthyThreshold": 3,
"HealthCheckHttpCode": "http_3xx ",
"Domain": "www.example.com",
"ListenerPort": "90",
"Url": "/cache",
"HealthCheckInterval": 34,
"HealthCheckURI": "/rest",
"RuleName": "Rule1",
"StickySessionType": "insert",
"Scheduler": "wrr",
"ListenerSync": "off",
"HealthyThreshold": 2,
"StickySession": "off",
"HealthCheck": "off"
}
Error response
JSON format
{"Code":"InvalidParameter","Message":"The specified parameter is not valid.","HostId":"slb-pop.aliyuncs.com","RequestId":"0669D684-69D8-408E-A4FA-B9011E0F4E66"}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.