All Products
Search
Document Center

Server Load Balancer:UpdateListenerAttribute

Last Updated:Mar 13, 2024

Updates the attributes of a listener, such as the name and the idle connection timeout period.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
nlb:UpdateListenerAttributeWrite
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ListenerIdstringYes

The ID of the listener.

lsn-bp1bpn0kn908w4nbw****
ListenerDescriptionstringNo

Enter a name for the listener.

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

tcpssl_443
ServerGroupIdstringNo

The ID of the server group.

sgp-ppdpc14gdm3x4o****
SecurityPolicyIdstringNo

The ID of the security policy.

Note This parameter takes effect only for listeners that use SSL over TCP.
tls_cipher_policy_1_1
CertificateIdsarrayNo

The server certificates.

stringNo

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

Note This parameter takes effect only for listeners that use SSL over TCP.
12315790212_166f8204689_1714763408_70998****
CaCertificateIdsarrayNo

The CA certificates. Only one CA certificate is supported.

Note This parameter takes effect only for listeners that use SSL over TCP.
stringNo

The list of CA certificates. You can specify only one CA certificate.

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

Specifies whether to enable mutual authentication. Valid values:

  • true: yes
  • false (default): no
false
IdleTimeoutintegerNo

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

900
DryRunbooleanNo

Specifies whether only to precheck the request. Valid values:

  • true: prechecks the request but does not update the configurations of the listener. 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.
false
ClientTokenstringNo

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 different 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.
123e4567-e89b-12d3-a456-426655440000
RegionIdstringNo

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

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

cn-hangzhou
ProxyProtocolEnabledbooleanNo

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

  • true: yes
  • false: no
false
SecSensorEnabledbooleanNo

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

  • true: yes
  • false: no
false
AlpnEnabledbooleanNo

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

  • true: yes
  • false: no
false
AlpnPolicystringNo

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 This parameter is required if AlpnEnabled is set to true.
ALPN
CpsintegerNo

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 is unlimited.

10000
MssintegerNo

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

344
ProxyProtocolV2ConfigobjectNo

Specifies that the Proxy protocol passes the VpcId, PrivateLinkEpId, and PrivateLinkEpsId parameters to backend servers.

Ppv2VpcIdEnabledbooleanNo

Specifies whether to use the Proxy protocol to pass the VpcId parameter to backend servers. Valid values:

  • true
  • false
false
Ppv2PrivateLinkEpIdEnabledbooleanNo

Specifies whether to use the Proxy protocol to pass the PrivateLinkEpId parameter to backend servers. Valid values:

  • true
  • false
false
Ppv2PrivateLinkEpsIdEnabledbooleanNo

Specifies whether to use the Proxy protocol to pass the PrivateLinkEpsId parameter to backend servers. Valid values:

  • true
  • false
false

Response parameters

ParameterTypeDescriptionExample
object

Updates listener configurations.

RequestIdstring

The ID of the request.

CEF72CEB-54B6-4AE8-B225-F876FF7BA984
JobIdstring

The ID of the asynchronous task.

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

Examples

Sample success responses

JSONformat

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

Error codes

HTTP status codeError codeError messageDescription
400Mismatch.VpcIdThe VpcId is mismatched for %s and %s.The VpcId is mismatched for %s and %s.
400Conflict.PortThe Port [%s] is conflict.The specified port conflicts with an existing port
400ResourceNotFound.CertificateThe specified resource %s is not found.-
400IncorrectStatus.listenerThe status of listener [%s] is incorrect.The current operation cannot be performed on the listener as its status is unavailable. Please check if the listener is currently undergoing any other operations.
400IdempotenceSignatureMismatchThe idempotence token of request is same with the prev one, but the signature is different.The requested idempotent token is the same as the previous one, but the signature is different.
400DryRunOperationRequest validation has been passed with DryRun flag set.Request validation has been passed with DryRun flag set.
400ResourceAlreadyAssociated.CertificateThe specified resource %s is already associated.-
403Forbidden.NoPermissionAuthentication is failed for NoPermission.Authentication is failed for NoPermission.
404ResourceNotFound.listenerThe specified resource %s is not found.-

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-02-29The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 400 change
    Error Codes 404 change
    delete Error Codes: 403
2024-02-22The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 400 change
    Error Codes 404 change
    delete Error Codes: 403
2024-02-04The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 400 change
    delete Error Codes: 403
    delete Error Codes: 404
2024-01-30The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
    delete Error Codes: 403
    delete Error Codes: 404
2024-01-29The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 400 change
    Error Codes 404 change
    delete Error Codes: 403
2024-01-24The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 400 change
    delete Error Codes: 403
    delete Error Codes: 404
2023-12-18The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 400 change
    delete Error Codes: 403
    delete Error Codes: 404
2023-11-27The Error code has changed. The request parameters of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
    delete Error Codes: 403
    delete Error Codes: 404
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: ProxyProtocolV2Config
2023-09-26The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 400 change
    delete Error Codes: 403
    Added Error Codes: 404
2023-09-05The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 400 change
    Error Codes 403 change
2023-08-22The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Added Error Codes: 400
    Added Error Codes: 403
2023-04-04The internal configuration of the API is changed, but the call is not affectedsee changesets
Change itemChange content
The internal configuration of the API is changed, but the call is not affected.