Queries the settings of a forwarding rule.
Debug
Use OpenAPI Explorer to perform debug operations and generate SDK code examples.
Request parameters
Parameter | Type | Required? | Example value | Description |
---|---|---|---|---|
Action | String | Yes | DescribeRuleAttribute |
The name of this action. Value: DescribeRuleAttribute |
RegionId | String | Yes | cn-hangzhou |
The ID of the region to which the SLB instance belongs. To query the region ID, call DescribeRegions. |
RuleId | String | Yes | rule-bp1efemp9suk5 |
The ID of the forwarding rule. |
Response parameters
Parameter | Type | Example value | Description |
---|---|---|---|
RuleName | String | Rule1 |
The name of the forwarding rule. |
LoadBalancerId | String | lb-bp1ca0zt07t934wxezyxo |
The ID of the SLB instance. |
ListenerPort | String | 90 |
The frontend listener port used by the SLB instance. |
Domain | String | test.com |
The domain name of the forwarding rule. |
Url | String | /cache |
The forwarding rule path. |
VServerGroupId | String | rsp-cige6j5e7p |
The ID of the VServer group associated with the forwarding rule. |
Cookie | String | wwe |
The cookie configured on the backend server. The cookie must be 1 to 200 characters in length and can only contain ASCII English letters and numbers. It cannot contain commas (,), semicolons (;), or spaces, nor can it begin with $. This parameter is required and takes effect only when StickySession is set to on and StickySessionType is set to server. |
CookieTimeout | Integer | 12 |
Timeout period of the cookie. Value range: 1 to 86400. Unit: seconds Note This parameter is required and takes effect only when StickySession is set to on and StickySessionType is set to insert.
|
HealthCheck | String | off |
Indicates whether to enable the health check function. Valid values: on | off Note This parameter takes effect when ListenerSync is set to off. Listener settings prevail when this parameter is set to on.
|
HealthCheckConnectPort | Integer | 23 |
The port of the backend server used for health checks. Value range: 1 to 65535 Note This parameter takes effect when HealthCheck is set to on. By default, backend listener settings prevail if this parameter retains empty and
HealthCheck is set to on.
|
HealthCheckDomain | String | www.example.com |
The domain name used for health checks. Valid values:
Note This parameter takes effect when HealthCheck is set to on.
|
HealthCheckHttpCode | String | http_3xx |
The HTTP status code indicating that the health check is normal. Separate multiple status codes by using commas (,). Default value: http_2xx Valid values: http_2xx | http_3xx | http_4xx | http_5xx Note This parameter takes effect when HealthCheck is set to on.
|
HealthCheckInterval | Integer | 34 |
The time interval between two consecutive health checks. Value range: 1 to 50. Unit: seconds Note This parameter takes effect when HealthCheck is set to on.
|
HealthCheckTimeout | Integer | 34 |
The length of time to wait for the response from a health check. If the backend ECS instance does not send a correct response within the specified time, the health check fails. Value range: 1 to 300. Unit: seconds Note If the value of HealthCheckTimeout is smaller than that of HealthCheckInterval, the parameter HealthCheckTimeout is invalid, and the timeout is set to the value of HealthCheckInterval. This parameter takes effect when HealthCheck is set to on.
|
HealthCheckURI | String | 10.21.22.1 |
The URI used for health checks. Note This parameter takes effect when HealthCheck is set to on.
|
HealthyThreshold | Integer | 2 |
The number of consecutive successes of health checks before a backend server is declared as healthy (from failure to success). Value range: 2 to 10 Note This parameter takes effect when HealthCheck is set to on.
|
ListenerSync | String | off |
Indicates whether a forwarding rule inherits the settings of health checks, session persistence, and scheduling algorithm from a listener. Valid values: on | 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 algorithm used to distribute traffic. Value values:
Note This parameter takes effect when ListenerSync is set to off. Listener settings prevail when this parameter is set to on.
|
StickySession | String | off |
Indicates whether to enable session persistence. Valid values: on | off Note This parameter is required and takes effect when ListenerSync is set to off. Listener settings take precedence when this parameter is set to on.
|
StickySessionType | String | insert |
The method used to handle the cookie. Valid values:
Note This parameter takes effect when StickySession is set to on.
|
UnhealthyThreshold | Integer | 3 |
The number of consecutive failures of health checks before a backend server is declared as unhealthy (from success to failure). Value range: 2 to 10 Note This parameter takes effect when HealthCheck is set to on.
|
Examples
Request example
http(s)://[Endpoint]/? Action=DescribeRuleAttribute
&RegionId=cn-hangzhou
&RuleId=rule-bp1efemp9suk5
&<CommonParameters>
Response examples
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",
"RequestId":"DB3C28EE-9A6C-4FFA-8759-4ED8346A675E",
"VServerGroupId":"rsp-bp114nimo4kl9",
"LoadBalancerId":"lb-bp1ca0zt07t934wxezyxo",
"RuleName":"Rule2",
"ListenerSync":"on",
"ListenerPort":90
}