Modifies the status and name of a Network Load Balancer (NLB) instance.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes UpdateLoadBalancerAttribute

The operation that you want to perform. Set the value to UpdateLoadBalancerAttribute.

LoadBalancerId String Yes nlb-wb7r6dlwetvt5j****

The ID of the NLB instance.

LoadBalancerName String No NLB1

The name of the NLB instance.

The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter.

CrossZoneEnabled Boolean No false

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

  • true: yes
  • false: no
DryRun Boolean No false

Specifies whether only to precheck this request. Valid values:

  • true: prechecks the request but does not modify the name or status of the NLB instance. The system prechecks the required parameters, request syntax, and limits. If the request fails the precheck, an error message is returned. If the request passes the precheck, the DryRunOperation error code is returned.
  • false (default): sends the request. If the request passes the precheck, an HTTP 2xx status code is returned and the operation is performed.
ClientToken String No 123e4567-e89b-12d3-a456-426655440000

The client token that is used to ensure the idempotence of the request.

You can use the client to generate the value, but you must ensure that it is unique among all requests. ClientToken can contain only ASCII characters.

Note If you do not set this parameter, ClientToken is set to the value of RequestId. The value of RequestId of each API request may be different.
RegionId String No cn-beijing

The ID of the region where the NLB instance is deployed.

You can call the DescribeRegions operation to query the most recent region list.

Cps Integer No 1

The maximum number of connections that can be created per second on the NLB instance. Valid values: 1 to 1000000.

Response parameters

Parameter Type Example Description
RequestId String 7294679F-08DE-16D4-8E5D-1625685DC10B

The ID of the request.

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

The ID of the asynchronous task.

Examples

Sample requests

http(s)://[Endpoint]/?Action=UpdateLoadBalancerAttribute
&LoadBalancerId=nlb-wb7r6dlwetvt5j****
&LoadBalancerName=NLB1
&CrossZoneEnabled=false
&DryRun=false
&ClientToken=123e4567-e89b-12d3-a456-426655440000
&RegionId=cn-beijing
&Cps=1
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<UpdateLoadBalancerAttributeResponse>
    <RequestId>7294679F-08DE-16D4-8E5D-1625685DC10B</RequestId>
    <JobId>aab74cfa-3bc4-48fc-80fc-0101da5a****</JobId>
</UpdateLoadBalancerAttributeResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

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

Error codes

For a list of error codes, visit the API Error Center.