Updates the configurations of a listener on 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 UpdateListenerAttribute

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

ListenerId String Yes lsn-bp1bpn0kn908w4nbw****

The listener ID.

ListenerDescription String No tcpssl_443

The name of the listener.

The name must be 2 to 256 characters in length, and can contain letters, digits, commas (,), periods (.), semicolons (;), forward slashes (/), at signs (@), underscores (_), and hyphens (-).

ServerGroupId String No sgp-ppdpc14gdm3x4o****

The server group ID.

SecurityPolicyId String No tls_cipher_policy_1_1

The security policy ID.

Note This parameter takes effect only for listeners that use SSL over TCP.
CertificateIds.N String No 12315790212_166f8204689_1714763408_70998****

The server certificates. You can specify only one server certificate.

Note This parameter takes effect only for listeners that use SSL over TCP.
CaCertificateIds.N String No 139a00604ad-cn-east-hangzh****

The certificate authority (CA) certificates. You can specify only one CA certificate.

Note This parameter takes effect only for listeners that use SSL over TCP.
CaEnabled Boolean No false

Specifies whether to enable mutual authentication. Valid values:

  • true
  • false (default)
IdleTimeout Integer No 900

The timeout period of idle connections. Unit: seconds. Valid values: 1 to 900.

DryRun Boolean No false

Specifies whether to perform only a dry run, without performing the actual request. Valid values:

  • true: performs only a dry run. The system checks the request for potential issues, including missing parameter values, incorrect request syntax, and service limits. If the request fails the dry run, an error message is returned. If the request passes the dry run, the DryRunOperation error code is returned.
  • false (default): performs a dry run and performs the actual request. If the request passes the dry run, a 2xx HTTP 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 token, but you must make sure that the token is unique among all requests. The token can contain only ASCII characters.

Note If you do not specify this parameter, the system automatically uses the request ID as the client token. The request ID may be different for each request.
RegionId String No cn-hangzhou

The region ID of the NLB instance.

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

ProxyProtocolEnabled Boolean No false

Specifies whether to use Proxy Protocol to pass client IP addresses to backend servers. Valid values:

  • true
  • false
SecSensorEnabled Boolean No false

Specifies whether to enable fine-grained monitoring. Valid values:

  • true
  • false
AlpnEnabled Boolean No false

Specifies whether to enable Application-Layer Protocol Negotiation (ALPN). Valid values:

  • true
  • false
AlpnPolicy String No HTTP1Only

The ALPN policy. Valid values:

  • HTTP1Only: uses only HTTP 1.x. The priority of HTTP 1.1 is higher than the priority of HTTP 1.0.
  • HTTP2Only: uses only HTTP 2.0.
  • HTTP2Optional: preferentially uses HTTP 1.x over HTTP 2.0. The priority of HTTP 1.1 is higher than the priority of HTTP 1.0, and the priority of HTTP 1.0 is higher than the priority of HTTP 2.0.
  • HTTP2Preferred: preferentially uses HTTP 2.0 over HTTP 1.x. The priority of HTTP 2.0 is higher than the priority of HTTP 1.1, and the priority of HTTP 1.1 is higher than the priority of HTTP 1.0.
Note If you enable ALPN, you must specify this parameter.
Cps Integer No 10000

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

Mss Integer No 344

The maximum size of a TCP segment. Unit: bytes. Valid values: 0 to 1500. 0 specifies that the maximum segment size remains unchanged. This parameter is supported only by TCP listeners and listeners that use SSL over TCP.

Response parameters

Parameter Type Example Description
RequestId String CEF72CEB-54B6-4AE8-B225-F876FF7BA984

The request ID.

JobId String 72dcd26b-f12d-4c27-b3af-18f6aed5****

The ID of the asynchronous task.

Examples

Sample requests

http(s)://[Endpoint]/?Action=UpdateListenerAttribute
&ListenerId=lsn-bp1bpn0kn908w4nbw****
&ListenerDescription=tcpssl_443
&ServerGroupId=sgp-ppdpc14gdm3x4o****
&SecurityPolicyId=tls_cipher_policy_1_1
&CertificateIds=["12315790212_166f8204689_1714763408_70998****"]
&CaCertificateIds=["139a00604ad-cn-east-hangzh****"]
&CaEnabled=false
&IdleTimeout=900
&DryRun=false
&ClientToken=123e4567-e89b-12d3-a456-426655440000
&RegionId=cn-hangzhou
&ProxyProtocolEnabled=false
&SecSensorEnabled=false
&AlpnEnabled=false
&AlpnPolicy=HTTP1Only
&Cps=10000
&Mss=344
&Common request parameters

Sample success responses

XML format

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

<UpdateListenerAttributeResponse>
    <RequestId>CEF72CEB-54B6-4AE8-B225-F876FF7BA984</RequestId>
    <JobId>72dcd26b-f12d-4c27-b3af-18f6aed5****</JobId>
</UpdateListenerAttributeResponse>

JSON format

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

{
  "RequestId" : "CEF72CEB-54B6-4AE8-B225-F876FF7BA984",
  "JobId" : "72dcd26b-f12d-4c27-b3af-18f6aed5****"
}

Error codes

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