All Products
Search
Document Center

Edge Security Acceleration:UpdateLoadBalancer

Last Updated:Jun 25, 2026

Modifies the configuration of a load balancer that you specify by ID.

Operation description

You can modify a load balancer's name, acceleration status, session persistence policy, and advanced traffic routing settings.

Important Changes to certain parameters might affect the stability of existing services. Proceed with caution.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

esa:UpdateLoadBalancer

update

*Site

acs:esa:{#regionId}:{#accountId}:site/{#SiteId}

None None

Request parameters

Parameter

Type

Required

Description

Example

Enabled

boolean

No

Whether the load balancer is enabled.

  • true: The load balancer is enabled.

  • false: The load balancer is disabled.

Valid values:

  • true :

    true

  • false :

    false

true

SiteId

integer

Yes

The site ID. You can call the ListSites operation to obtain this ID.

1159101787****

AdaptiveRouting

object

No

Configures origin-pull behavior across address pools.

FailoverAcrossPools

boolean

No

Whether to perform origin-pull across address pools.

  • true: Enables origin-pull across address pools.

  • false: Disables origin-pull across address pools.

false

OriginLevelRetry

boolean

No

DefaultPools

array

No

A list of default address pool IDs.

integer

No

The ID of a default address pool.

96228666776****

FallbackPool

integer

No

The ID of the fallback address pool. Traffic is routed to this pool when all other address pools are unavailable.

96228666776****

RandomSteering

object

No

The weighted round-robin configuration that controls how traffic is distributed across address pools.

DefaultWeight

integer

No

The default weight for address pools without a specific weight. Valid values: 0 to 100.

50

PoolWeights

object

No

A map of pool IDs to weights that determine the proportion of traffic routed to each pool.

integer

No

The weight for a single origin pool. Valid values: 0 to 100. A value of 0 routes no traffic to this pool.

50

Rules

array<object>

No

A list of rules that define behavior overrides for specific conditions.

array<object>

No

The configuration of a single rule.

RuleName

string

No

The name of the rule. This parameter is not required when you configure global settings.

rule_1

Rule

string

No

The content of the rule, specified as a conditional expression to match user requests. This parameter is not required when you configure global settings. Use cases:

  • To match all incoming requests, set the value to true.

  • To match specific requests, set the value to a custom expression, such as (http.host eq "video.example.com").

http.request.method eq "GET"

RuleEnable

string

No

Whether the rule is enabled. Not required for global settings. Valid values:

  • on: Enabled.

  • off: Disabled.

on

FixedResponse

object

No

The fixed response to return when the rule's condition is met.

ContentType

string

No

The value of the Content-Type field in the HTTP response header.

application/json

Location

string

No

The value of the Location field in the HTTP response header. This is typically used for redirections.

http://www.example.com/index.html

MessageBody

string

No

The content of the response body.

Hello World!

StatusCode

integer

No

The HTTP status code of the response.

200

Overrides

any

No

The settings to override when a request matches this rule. These take precedence over the load balancer's main configuration.

{ "adaptive_routing": { "failover_across_pools": true }, "sub_region_pools": { "AL,AT": [ 92298024898****, 92304347804**** ], "BG,BY": [ 92298024898**** ] }, "default_pools": [ 92298024898****, 92304347804**** ], "fallback_pool": 92298024898****, "location_strategy": { "mode": "resolver_ip", "prefer_ecs": "always" }, "random_steering": { "default_weight": 0.3, "pool_weights": { "92298024898****": 0.7, "92304347804****": 0.8 } }, "region_pools": { "CN,SEAS": [ 92298024898****, 92304347804**** ], "SAF,SAS": [ 92304347804**** ] }, "session_affinity": "ip", "steering_policy": "geo", "ttl": 30 }

Sequence

integer

No

The execution priority of the rule. If not specified, rules run in listed order. If specified, the value must be an integer greater than 0. A larger value indicates a higher priority.

1

Terminates

boolean

No

Whether to stop processing subsequent rules after this rule is matched.

  • true: Stop processing subsequent rules.

  • false: Continue processing subsequent rules. This is the default value.

true

SessionAffinity

string

No

The session affinity method, which routes requests from the same client to the same origin server. Valid values:

  • off: Disables session affinity.

  • ip: Enables session affinity based on the client IP address.

  • cookie: Enables session affinity based on a cookie.

ip

SteeringPolicy

string

No

The traffic steering policy, which determines how traffic is distributed among the address pools.

order

Description

string

No

A description of the load balancer for identification and management.

Load Balancer Description

Ttl

integer

No

The Time to Live (TTL) for the DNS record, in seconds. Default value: 30. Valid values: 10 to 600.

300

Monitor

object

No

The health check monitor configuration.

Type

string

No

The protocol to use for the health check, such as HTTP. If you set this to off, no health check is performed.

HTTP

Method

string

No

The HTTP method to use for the health check. For example, GET.

GET

Port

integer

No

The port on the origin server to use for the health check.

80

Path

string

No

The path on the origin server to request for the health check. For example, /healthcheck.

/health

Interval

integer

No

The interval in seconds between each health check. For example, 60.

100

Timeout

integer

No

The timeout for the health check, in seconds. Valid values: 1 to 10.

5

ExpectedCodes

string

No

The expected HTTP status codes that indicate a healthy response. For example, 200,202.

200,202

FollowRedirects

boolean

No

Whether the health check monitor follows HTTP redirects.

  • true: The monitor follows HTTP redirections.

  • false: The monitor does not follow HTTP redirections.

true

ConsecutiveUp

integer

No

The number of consecutive successful health checks required to mark an origin server as healthy.

3

ConsecutiveDown

integer

No

The number of consecutive failed health checks required to mark an origin server as unhealthy.

5

Header

any

No

The HTTP request headers to send with each health check.

{ "host": [ "example1.com", "example2.com" ] }

MonitoringRegion

string

No

The regions from which the health checks are performed. The default value is Global.

  • Global: From probe locations worldwide.

  • ChineseMainland: From probe locations within the Chinese mainland.

  • OutsideChineseMainland: From probe locations outside the Chinese mainland.

Valid values:

  • OutsideChineseMainland :

    Outside Chinese mainland

  • ChineseMainland :

    Chinese mainland

  • Global :

    Global

Global

Id

integer

Yes

The load balancer ID. You can call the ListLoadBalancers operation to obtain this ID.

95913670174****

RegionPools

any

No

A map of primary regions to their corresponding address pools.

{ "ENAM": [ 12345678**** ], "WNAM": [ 23456789****, 23456789**** ] }

SubRegionPools

any

No

A map of secondary regions to their corresponding address pools. To assign the same address pools to multiple secondary regions, combine their codes into a single, comma-separated key.

{"AL,MO": [92298024898****],"CN-SH,CN-SX,CN-SC":[92304347804****,92843536908****]}

Response elements

Element

Type

Description

Example

object

The response returned when the load balancer is updated.

RequestId

string

The ID of the request.

EEEBE525-F576-1196-8DAF-2D70CA3F4D2F

Examples

Success response

JSON format

{
  "RequestId": "EEEBE525-F576-1196-8DAF-2D70CA3F4D2F\n"
}

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidParameter The specified parameter is invalid. The specified parameter is invalid.
400 LoadBalancerQuotaCheckFailed Load balancer enable quota check failed. Your current plan cannot use the load balancer related functions. If you need to use it, upgrade the plan.
400 LoadBalancerNumberExceedQuotaLimit The number of load balancers you have added has reached the limit of the plan quota. Please delete the unused load balancers or upgrade the plan and try again. The number of load balancers you have added has reached the limit of the plan quota. Please delete the unused load balancers or upgrade the plan and try again.
400 LoadBalancerRuleQuotaCheckFailed Your current plan does not support configuring load balancer custom rules, or the load balancer rules you have added exceed the plan quota limit. Please upgrade the plan or delete the rules that are no longer in use and try again. Your current plan does not support configuring load balancer custom rules, or the load balancer rules you have added exceed the plan quota limit. Please upgrade the plan or delete the rules that are no longer in use and try again.
400 LoadBalancerPolicyCheckFailed Your current plan does not support the load balancer scheduling policy. Upgrade the plan and try again. Your current plan does not support the load balancer scheduling policy. Upgrade the plan and try again.
400 LoadBalancerHealthDetectionQuotaCheckFailed Your current plan does not allow you to configure the load balancer's health detection. Upgrade the plan and try again. Your current plan does not allow you to configure the load balancer's health detection. Upgrade the plan and try again.
400 LoadBalancerHealthDetectionIntervalCheckFailed The configured load balancer health detection interval exceeds the quota range allowed by the plan. Please revise the interval within the range or upgrade the plan and try again. The configured load balancer health detection interval exceeds the quota range allowed by the plan. Please revise the interval within the range or upgrade the plan and try again.
400 InternalException Failed to call the service. Try again later or contact technical support. Failed to call the service. Try again later or contact technical support.
400 Instance.NotOnline Your plan is unavailable due to an overdue payment. Complete the payment first. Your plan is unavailable due to an overdue payment. Complete the payment first.
400 MonitorExpectedBodyInvalid Invalid response body. Specify a response body that does not exceed 102,400 characters in length in your custom rule. Invalid response body. Specify a response body that does not exceed 102,400 characters in length in your custom rule.
400 MonitorExpectedCodesInvalid Invalid expected status code for the probe.Make sure that you specify no more than 10 status codes in the probe settings, and each status code must be 3 to 4 characters in length.Examples: 200, 301, 3xx, 8000, and 88xx. Invalid expected status code for the probe.Make sure that you specify no more than 10 status codes in the probe settings, and each status code must be 3 to 4 characters in length.Examples: 200, 301, 3xx, 8000, and 88xx.
400 MonitorHeaderInvalid Invalid request header for the probe. You can add up to 10 request headers, each with 1 to 9 values. The combined length of all headers and values cannot exceed 6,000 characters. You cannot configure the User-Agent header. The incoming monitor is carrying an illegal request header. Make sure that the number of request headers does not exceed 10, that each request header has a value length between 1 and 10, and that you must not use the User-Agent request header (which is reserved for internal specific scenarios). In addition, the total length of all request headers and their values must not exceed 6000 characters. Please check and correct the request header configuration and try again.
400 MonitorMethodNotSupport Invalid HTTP method for the probe request. Valid values are GET and HEAD. Invalid HTTP method for the probe request. Valid values are GET and HEAD.
400 MonitorPathNotSupport Invalid probe URL path.If you set the probe protocol to HTTP or HTTPS, make sure you specify a probe URL path that does not exceed 1,024 characters in length. Invalid probe URL path.If you set the probe protocol to HTTP or HTTPS, make sure you specify a probe URL path that does not exceed 1,024 characters in length.
400 MonitorPortNotSupport Invalid probe port. Specify a valid port from 1 to 65535 for the probe request. Then, try again. The incoming monitor listening port is not supported. The port value range is [1-65535]. Please ensure that the port is within the value range and try again.
400 MonitorRetriesInvalid Invalid number of probe retries. Specify an integer from 0 to 5. Then, try again. Invalid number of probe retries. Specify an integer from 0 to 5. Then try again.
400 MonitorTimeoutInvalid Invalid timeout for the probe. Valid values are 1 to 10. Invalid timeout for the probe. Valid values are 1 to 10.
400 MonitorTypeNotSupport Invalid protocol. Valid values are off, HTTP, HTTPS, TCP, UDP, ICMP Ping, and SMTP. Invalid protocol. Valid values are off, HTTP, HTTPS, TCP, UDP, ICMP Ping, and SMTP.
400 OriginPoolNotExist The specified origin pool does not exist or does not belong to your account or website. Check and try again. The specified origin pool does not exist or does not belong to your account or website. Check and try again.
400 LoadBalancerNameConflict The load balancer name or the hostname for the origin pool already exists. Try again with a unique name. The load balancer name or the hostname for the origin pool already exists. Try again with a unique name.
400 LockFailed The system is handling requests you previously submitted. Try again later. The system is handling requests you previously submitted. Try again later.
400 SourceCircleExist The host record of the resource to be operated on is already the source station of another resource, or the source station of the current resource has been added as a host record. To avoid loopback, modify the host record or source station and retry. The host record of the resource to be operated on is already the source station of another resource, or the source station of the current resource has been added as a host record. To avoid loopback, modify the host record or source station and retry.
400 LoadBalancerNotExist The specified load balancer name is invalid or load balancing is not enabled for your website.Make sure that you specify a valid load balancer name and load balancing is enabled. Then, try again. The specified load balancer name is invalid or load balancing is not enabled for your website.Make sure that you specify a valid load balancer name and load balancing is enabled. Then, try again.
400 MissingParameter The specified ArgName is required for this function. When configuring a specific function, the required parameter is missing.
400 CompileRuleError Rule compilation failed, please check the rule information passed in to ensure that the rule is written according to the syntax described in the document. Rule compilation failed. Check the incoming rule configuration. For details, see the rule configuration format described in the interface document.
400 InstanceNotExist The instance does not exist. Check whether the specified instance ID is correct or whether the instance belongs to your account. The instance does not exist. Check whether the specified instance ID is correct or whether the instance belongs to your account.
403 QuotaExceeded The quota is exceeded. The quota is exceeded.
404 SiteNotFound The website does not exist or does not belong to you. The website does not exist or does not belong to you.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.