SetLoadBalancerHTTPListenerAttribute

Last Updated: Aug 25, 2017

Description

Configure an HTTP listener.

Request parameter

Name Type Required Description
Action String Yes Name of the operating interface, which is specified in the systemValue:SetLoadBalancerHTTPListenerAttribute.
RegionId String Yes Region ID.
LoadBalancerId String Yes The unique ID of a Server Load Balancer instance.
ListenerPort Integer Yes Port used by the Server Load Balancer instance frontend. Value:1-65535.
Bandwidth Integer Yes Bandwidth peak of Listener

Value:-1 | 1-1000Mbps

For the public network instance charged per traffic consumed, the Bandwidth on Listener can be set to -1, indicating the bandwidth peak is unlimited.

XForwardedFor String No Whether to start to obtain the actual IP address of a visitor by means of X-Forwarde d-For.

Value:on | off

Default: None

When the parameter is not specified, it means this configuration item is not changed in the call, and the former configuration is maintained.

Scheduler String No Scheduling algorithm

Value:wrr | wlc

Default:wrr

StickySession String Yes Whether to enable session persistence.

Value:on | off

StickySessionType String As appropriate Mode for handling the cookie.

If StickySes sion is on, the parameter is mandatory, and if StickySes sion is off, the parameter will be ignored.

Value:insert | server

If it is set to insert, it means it is inserted from Server Load Balancer; and if it is set to server, it means the Server Load Balancer learns from the backend server.

CookieTimeout Integer As appropriate Cookie timeout.

The parameter is mandatory when StickySes sion is on and StickySes sionType is insert. Otherwise, it will be ignored.

Value: 1-86400(in seconds)

Cookie String As appropriate The cookie configured on the server.

It is mandatory only when StickySes sion is on and StickySes sionType is server; otherwise, the parameter will be ignored.

Value:String in line with RFC 2965, with length being 1- 200.

It only contains characters such as ASCII codes, English letters and digits instead of the comma, semicolon or spacing, and it cannot start with $.

HealthCheck String Yes Whether to enable health check.

Value:on | off.

HealthCheckDomain String No Domain name used for health check.

When HealthCheck is on, the parameter is mandatory; and when HealthCheck is off, the parameter will be ignored.

Value:$_ip | custom string

Rules of the custom string: its length is limited to 1-80 and only characters such as letters, digits, ‘-‘ and ‘.’ are allowed.

When the parameter is set to $_ip by the user, Server Load Balancer uses the private network IP address of each backend server as Domain used for health check.

HealthCheckURI String As appropriate URI used for health check.

When HealthCheck is on, the parameter is mandatory; and when HealthCheck is off, the parameter will be ignored.

Value: Its length is limited to 1-80 and it must start with /. Only characters such as letters, digits, ‘-’, ‘/’, ‘.’, ‘%’, ‘?’, #’ and ‘&’ are allowed.

HealthCheckConnectPort Integer As appropriate Port used for health check.

When HealthCheck is on, the parameter is mandatory; and when HealthCheck is off, the parameter will be ignored.

Value:1-65535 or ’-520’.

When the parameter is set to -520, it means the backend server port (Backen dServerPort) is used.

HealthyThreshold Integer As appropriate Threshold determining the result of the health check is success. Namely, after how many successive successful health checks, the health check result of the backend server is changed from fail to success.

When HealthCheck is on, the parameter is mandatory; and when HealthCheck is off, the parameter will be ignored.

Value:1-10.

UnhealthyThreshold Integer As appropriate Threshold determining the result of the health check is fail. Namely, after how many successive failed health checks, the health check result of the backend server is changed from success to fail.

When HealthCheck is on, the parameter is mandatory; and when HealthCheck is off, the parameter will be ignored.

Value:1-10.

HealthCheckTimeout Integer As appropriate Maximum timeout of each health check response.

When HealthCheck is on, the parameter is mandatory; and when HealthCheck is off, the parameter will be ignored.

Value:1-50(in seconds)

Note: If HealthCHe ckTimeout < HealthChec kInterval, HCTimeout is invalid, and the timeout is HealthCheckInterval.

HealthCheckInterval Integer As appropriate Time interval of health checks.

When HealthCheck is on, the parameter is mandatory; and when HealthCheck is off, the parameter will be ignored.

Value:1-5 (in seconds).

HealthCheckHttpCode String As appropriate Regular health check HTTP status code. Multiple codes are segmented by “,”.

When HealthCheck is on, the parameter is mandatory; and when HealthCheck is off, the parameter will be ignored.

Value:http_2xx | http_3xx | http_4xx | http_5xx

Default: http_2xx.

VServerGroup String No Whether to use VServer group. Value: on/off.

Default: off.

VServerGroupId String No The ID if VServer group.
Gzip String No Whether to enable Gzip. Use Gzip to compress files in certain type.

Value: on/off.

Default: on.

XForwardedFor_SLBIP String No Whether to open header XForwardedFor_SLBIP. Value: on/off.

Default: off.

XForwardedFor_SLBID String No Whether to open header XForwardedFor_SLBID. Value: on/off.

Default: off.

XForwardedFor_proto String No Whether to open header XForwardedFor_proto. Value: on/off.

Default: off.

Return parameter

They are all common return parameters. See Public Parameters for details.

Example

Request example

  1. https://slb.aliyuncs.com/
  2. &Action=SetLoadBalancerHTTPListenerAttribute
  3. &LoadBalancerId=139a00604ad-cn-east-hangzhou-01
  4. &ListenerPort=-520
  5. &Bandwidth=-1
  6. &<common request parameter>

Return example

  • XML format
    1. <?xml version="1.0" encoding="UTF-8"?>
    2. <SetLoadBalancerHTTPListenerAttributeResponse>
    3. <RequestId>CEF72CEB-54B6-4AE8-B225-F876FF7BA984</RequestId>
    4. </SetLoadBalancerHTTPListenerAttributeResponse>
  • JSON format
    1. {"RequestId":" CEF72CEB-54B6-4AE8-B225-F876FF7BA984"
    2. }
Thank you! We've received your feedback.