All Products
Search
Document Center

Server Load Balancer:UpdateLoadBalancerAttribute

Last Updated:Aug 28, 2026

Updates NLB instance attributes, such as the instance name, cross-zone load balancing, and CPS limit.

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

nlb:UpdateLoadBalancerAttribute

update

*LoadBalancer

acs:nlb:{#regionId}:{#accountId}:loadbalancer/{#LoadBalancerId}

None None

Request parameters

Parameter

Type

Required

Description

Example

LoadBalancerId

string

Yes

The NLB instance ID.

nlb-wb7r6dlwetvt5j****

LoadBalancerName

string

No

The NLB instance name. Must be 2 to 128 characters long and start with a letter. Allowed characters: letters, digits, periods (.), underscores (_), and hyphens (-).

NLB1

CrossZoneEnabled

boolean

No

Whether to enable cross-zone load balancing for the NLB instance. Valid values:

  • true

  • false

false

DryRun

boolean

No

Whether to perform a dry run without executing the request. Valid values:

  • true: performs a dry run only. The system checks for missing parameters, incorrect syntax, and service limits. If validation fails, an error is returned. If validation passes, the DryRunOperation error code is returned.

  • false (default): performs a dry run and executes the request. If validation passes, a 2xx HTTP status code is returned and the operation is performed.

false

ClientToken

string

No

The client token used to ensure idempotence.

Generate the token on the client side. The token must be unique across requests and contain only ASCII characters.

Note

If not specified, the system uses the request ID as the client token. Each request has a unique request ID.

123e4567-e89b-12d3-a456-426655440000

RegionId

string

No

The region ID of the NLB instance.

Call the DescribeRegions operation to query available regions.

cn-beijing

Cps

integer

No

The maximum new connections per second per zone (per virtual IP address). Valid values: 1 to 1000000.

1

Response elements

Element

Type

Description

Example

object

The response parameters.

RequestId

string

The request ID.

7294679F-08DE-16D4-8E5D-1625685DC10B

JobId

string

The ID of the asynchronous task.

aab74cfa-3bc4-48fc-80fc-0101da5a****

Examples

Success response

JSON format

{
  "RequestId": "7294679F-08DE-16D4-8E5D-1625685DC10B",
  "JobId": "aab74cfa-3bc4-48fc-80fc-0101da5a****"
}

Error codes

HTTP status code

Error code

Error message

Description

400 SystemBusy System is busy, please try again later.
400 ResourceInConfiguring.loadbalancer The specified resource of loadbalancer is being configured, please try again later. The specified resource of loadbalancer is being configured, please try again later.
400 DryRunOperation Request validation has been passed with DryRun flag set. Request validation has been passed with DryRun flag set.
400 IllegalParam.loadBalancerName Param loadBalancerName is illegal. The instance name is invalid. Check the parameters.
403 Forbidden.NoPermission Authentication is failed for NoPermission. Authentication is failed for NoPermission.
404 ResourceNotFound.loadBalancer The specified resource of loadbalancer is not found. The specified load balancer resource was not found. Please check the input parameters.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.