Queries the configurations of a specified forwarding rule.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | DescribeRuleAttribute |
The operation that you want to perform. Set the value to DescribeRuleAttribute. |
RegionId | String | Yes | cn-hangzhou |
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. |
RuleId | String | Yes | rule-bp1efemp9**** |
The ID of the forwarding rule. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RuleName | String | Rule1 |
The name of the forwarding rule. |
LoadBalancerId | String | lb-bp1ca0zt07t934wxe**** |
The ID of the SLB instance. |
ListenerPort | String | 90 |
The listener port that is used by the SLB instance. |
Domain | String | test.com |
The domain name that is configured in the forwarding rule. |
Url | String | /cache |
The URL that is configured in the forwarding rule. |
VServerGroupId | String | rsp-cige6j**** |
The ID of the vServer group that is associated with the forwarding rule. |
Cookie | String | wwe |
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. |
CookieTimeout | Integer | 12 |
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.
|
HealthCheck | String | off |
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.
|
HealthCheckConnectPort | Integer | 23 |
The port of the backend server 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 you left this parameter empty and the HealthCheck parameter is set to on, the backend port configuration of the listener is used by default.
|
HealthCheckDomain | String | www.example.com |
The domain name that is used for health checks. Valid values:
Note If you set the HealthCheck parameter to on, this parameter is required.
|
HealthCheckHttpCode | String | http_3xx |
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.
|
HealthCheckInterval | Integer | 34 |
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.
|
HealthCheckTimeout | Integer | 34 |
The timeout period of a health check response. If a backend ECS instance does not send an expected response within the specified period of time, the ECS instance is considered unhealthy. Valid values: 1 to 300. Unit: seconds. Note If the value of the HealthCHeckTimeout parameter is smaller than that of the HealthCheckInterval parameter, the value of the HealthCHeckTimeout parameter is ignored and the value of the HealthCheckInterval parameter is regarded as the waiting period. If you set the HealthCheck parameter to on, this parameter is required.
|
HealthCheckURI | String | 10.21.22.1 |
The URI that is used for health checks. Note If you set the HealthCheck parameter to on, this parameter is required.
|
HealthyThreshold | Integer | 2 |
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.
|
ListenerSync | String | off |
Indicates whether the forwarding rule uses the scheduling algorithm, session persistence, and health check configurations of the listener. Valid values: on and off.
|
RequestId | String | 9DEC9C28-AB05-4DDF-9A78-6B08EC9CE18C |
The ID of the request. |
RuleId | String | rule-hfgnd***** |
The ID of the forwarding rule. |
Scheduler | String | wrr |
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.
|
StickySession | String | off |
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.
|
StickySessionType | String | insert |
The method that is used to handle a cookie. Valid values:
Note If you set the StickySession parameter to on, this parameter is required.
|
UnhealthyThreshold | Integer | 3 |
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.
|
Examples
Sample requests
http(s)://[Endpoint]/?Action=DescribeRuleAttribute
&RegionId=cn-hangzhou
&RuleId=rule-bp1efemp9suk5
&<Common request parameters>
Sample success responses
XML
format
<DescribeRuleAttributeResponse>
<Domain>test.com</Domain>
<VServerGroupId>rsp-bp114nimo4kl9</VServerGroupId>
<LoadBalancerId>lb-bp1ca0zt07t934wxezyxo</LoadBalancerId>
<RuleName>Rule2</RuleName>
<ListenerPort>90</ListenerPort>
<RequestId>DB3C28EE-9A6C-4FFA-8759-4ED8346A675E</RequestId>
<ListenerSync>on</ListenerSync>
</DescribeRuleAttributeResponse>
JSON
format
{
"Domain": "test.com",
"VServerGroupId": "rsp-bp114nimo4kl9",
"LoadBalancerId": "lb-bp1ca0zt07t934wxezyxo",
"RuleName": "Rule2",
"ListenerPort": 90,
"RequestId": "DB3C28EE-9A6C-4FFA-8759-4ED8346A675E",
"ListenerSync": "on"
}
Error codes
For a list of error codes, visit the API Error Center.