UpdateListenerAttribute
Updates the configurations of a listener, such as the name and default actions.
Operation description
The UpdateListenerAttribute operation is asynchronous. After you call this operation, the system returns a request ID, but the listener configurations are not immediately updated. The update task continues to run in the background. You can call the GetListenerAttribute operation to query the update status of the listener configurations:
If the listener is in the Configuring state, the listener configurations are being updated.
If the listener is in the Running state, the listener configurations are updated.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
alb:UpdateListenerAttribute |
update |
*LoadBalancer
*SecurityPolicy
*ServerGroup
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ListenerId |
string |
Yes |
The ID of the listener on the application load balancing instance. |
lsn-o4u54y73wq7b****** |
| ClientToken |
string |
No |
The client token that is used to ensure the idempotence of the request. You can generate a parameter value on your client to ensure that the value is unique across different requests. The client token supports only ASCII characters. Note
If you do not specify this parameter, the system automatically uses the RequestId of the API request as the ClientToken. The RequestId of each API request is unique. |
5A2CFF0E-5718-45B5-9D4D-70B****** |
| DryRun |
boolean |
No |
Specifies whether to perform a dry run. Valid values:
|
false |
| ListenerDescription |
string |
No |
The custom name of the listener. The name must be 2 to 256 characters in length, and can contain letters, digits, Chinese characters, commas (,), periods (.), semicolons (;), forward slashes (/), at signs (@), underscores (_), and hyphens (-). |
HTTP_80 |
| RequestTimeout |
integer |
No |
Specifies the request timeout period. Unit: seconds. Valid values: 1 to 600. If no response is received from the backend server within the timeout period, load balancing stops waiting and returns an HTTP 504 error code to the client. |
60 |
| IdleTimeout |
integer |
No |
Specifies the idle connection timeout period. Unit: seconds. Valid values: 1 to 600. If no access request is received within the timeout period, load balancing temporarily breaks the current connection and establishes a new connection when the next request arrives. |
15 |
| GzipEnabled |
boolean |
No |
Specifies whether to enable Gzip compression to compress specific file types. Valid values:
|
true |
| Http2Enabled |
boolean |
No |
Specifies whether to enable HTTP/2. Valid values:
Note
This parameter is supported only by HTTPS listeners. |
true |
| SecurityPolicyId |
string |
No |
The security policy. System security policies and custom security policies are supported. Note
This parameter is supported only by HTTPS listeners. |
tls_cipher_policy_1_0 |
| CaEnabled |
boolean |
No |
Specifies whether to enable mutual authentication. Valid values:
|
false |
| XForwardedForConfig |
object |
No |
The configurations of X-Forwarded-For attributes. |
|
| XForwardedForClientCertClientVerifyAlias |
string |
No |
The custom header name. This parameter takes effect only when XForwardedForClientCertClientVerifyEnabled is set to true. The name must be 1 to 40 characters in length, and can contain lowercase letters, hyphens (-), underscores (_), and digits. Note
This parameter is supported only by HTTPS listeners. |
test_client-verify-alias_123456 |
| XForwardedForClientCertClientVerifyEnabled |
boolean |
No |
Specifies whether to use the
Note
This parameter is supported only by HTTPS listeners. |
false |
| XForwardedForClientCertFingerprintAlias |
string |
No |
The custom header name. This parameter takes effect only when XForwardedForClientCertFingerprintEnabled is set to true. The name must be 1 to 40 characters in length, and can contain lowercase letters, hyphens (-), underscores (_), and digits. Note
This parameter is supported only by HTTPS listeners. |
test_finger-print-alias_123456 |
| XForwardedForClientCertFingerprintEnabled |
boolean |
No |
Specifies whether to use the
Note
This parameter is supported only by HTTPS listeners. |
false |
| XForwardedForClientCertIssuerDNAlias |
string |
No |
The custom header name. This parameter takes effect only when XForwardedForClientCertIssuerDNEnabled is set to true. The name must be 1 to 40 characters in length, and can contain lowercase letters, hyphens (-), underscores (_), and digits. Note
This parameter is supported only by HTTPS listeners. |
test_issue-dn-alias_123456 |
| XForwardedForClientCertIssuerDNEnabled |
boolean |
No |
Specifies whether to use the
Note
This parameter is supported only by HTTPS listeners. |
false |
| XForwardedForClientCertSubjectDNAlias |
string |
No |
The custom header name. This parameter takes effect only when XForwardedForClientCertSubjectDNEnabled is set to true. The name must be 1 to 40 characters in length, and can contain lowercase letters, hyphens (-), underscores (_), and digits. Note
This parameter is supported only by HTTPS listeners. |
test_subject-dn-alias_123456 |
| XForwardedForClientCertSubjectDNEnabled |
boolean |
No |
Specifies whether to use the
Note
This parameter is supported only by HTTPS listeners. |
false |
| XForwardedForClientSrcPortEnabled |
boolean |
No |
Specifies whether to use the
Note
This parameter is supported by HTTP and HTTPS listeners. |
false |
| XForwardedForEnabled |
boolean |
No |
Specifies whether to use the
Note
|
true |
| XForwardedForProcessingMode |
string |
No |
The processing mode of the
Note
|
append |
| XForwardedForProtoEnabled |
boolean |
No |
Specifies whether to use the
Note
This parameter is supported by HTTP, HTTPS, and QUIC listeners. |
false |
| XForwardedForSLBIdEnabled |
boolean |
No |
Specifies whether to use the
Note
This parameter is supported by HTTP, HTTPS, and QUIC listeners. |
false |
| XForwardedForSLBPortEnabled |
boolean |
No |
Specifies whether to use the
Note
This parameter is supported by HTTP, HTTPS, and QUIC listeners. |
false |
| XForwardedForClientSourceIpsEnabled |
boolean |
No |
Specifies whether to allow ALB to obtain the real IP address of the client from the X-Forwarded-For header. Valid values:
Note
This parameter is supported by HTTP and HTTPS listeners. |
false |
| XForwardedForClientSourceIpsTrusted |
string |
No |
The trusted proxy IP addresses. Load balancing traverses the |
10.1.1.0/24 |
| XForwardedForHostEnabled |
boolean |
No |
Specifies whether to use the
Note
This parameter is supported by HTTP, HTTPS, and QUIC listeners. |
false |
| QuicConfig |
object |
No |
The configurations for associating a QUIC listener. |
|
| QuicListenerId |
string |
No |
The ID of the QUIC listener to be associated. This parameter is required when QuicUpgradeEnabled is set to true. This parameter is supported only by HTTPS listeners. Note
The original listener and the associated QUIC listener must belong to the same ALB instance, and the QUIC listener must not have been associated before. |
lsn-333 |
| QuicUpgradeEnabled |
boolean |
No |
Specifies whether to enable QUIC upgrade. Valid values:
Note
This parameter is supported only by HTTPS listeners. |
false |
| Certificates |
array<object> |
No |
The list of certificates. |
|
|
object |
No |
The certificate structure. |
||
| CertificateId |
string |
No |
The ID of the default certificate. You can add only one default server certificate. Note
|
123157****** |
| CaCertificates |
array<object> |
No |
The list of CA certificates. You can add only one CA certificate. |
|
|
object |
No |
The CA certificate structure. |
||
| CertificateId |
string |
No |
The ID of the CA certificate. Note
This parameter is required when CaEnabled is set to true. |
123359****** |
| DefaultActions |
array<object> |
No |
The list of default rule actions. |
|
|
array<object> |
No |
The default rule action structure. |
||
| ForwardGroupConfig |
object |
No |
The configuration for the forwarding action. This parameter is required and takes effect only when Type is set to ForwardGroup. You can specify up to 20 forwarding action configurations. |
|
| ServerGroupTuples |
array<object> |
Yes |
The list of destination server group tuples for forwarding. |
|
|
object |
No |
The structure of the destination server group tuple for forwarding. |
||
| ServerGroupId |
string |
Yes |
The ID of the destination server group to which requests are forwarded. |
sgp-i5qt20****** |
| Type |
string |
Yes |
The action type. You can specify only one action type. Valid values: ForwardGroup: forwards requests to multiple server groups. |
ForwardGroup |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response data structure. |
||
| JobId |
string |
The ID of the asynchronous task. |
72dcd26b-f12d-4c27-b3af-18f6aed5**** |
| RequestId |
string |
The request ID. |
365F4154-92F6-4AE4-92F8-7FF****** |
Examples
Success response
JSON format
{
"JobId": "72dcd26b-f12d-4c27-b3af-18f6aed5****",
"RequestId": "365F4154-92F6-4AE4-92F8-7FF******"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | IncorrectStatus.LoadBalancer | The status of %s [%s] is incorrect. | The current status of the instance does not support this operation. |
| 400 | IncorrectBusinessStatus.LoadBalancer | The business status of %s [%s] is incorrect. | |
| 400 | IncorrectStatus.Listener | The status of %s [%s] is incorrect. | This operation is not supported in the listener's current state. |
| 400 | OperationDenied.CrossLoadBalancerQUICListener | The operation is not allowed because of %s. | The operation is not allowed because of %s. |
| 400 | ResourceAlreadyAssociated.Listener | The specified resource %s is already associated. | The specified resource %s is already associated. |
| 400 | OperationDenied.GRPCServerGroup | The operation is not allowed because of %s. | The operation is denied because a listener bound to this gRPC server group does not have HTTP/2.0 enabled. |
| 400 | ResourceAlreadyAssociated.Certificate | The specified resource %s is already associated. | The specified certificate is already associated. |
| 400 | ResourceQuotaExceeded.SecurityPolicyAttachedNum | The quota of %s is exceeded for resource %s, usage %s/%s. | The quota of %s is exceeded for resource %s. Usage: %s/%s. |
| 400 | ResourceQuotaExceeded.ServerGroupAttachedNum | The quota of %s is exceeded for resource %s, usage %s/%s. | The number of associations allowed for the server group exceeds the quota limit. |
| 400 | ResourceQuotaExceeded.LoadBalancerServersNum | The quota of %s is exceeded for resource %s, usage %s/%s. | The number of backend servers has exceeded the quota limit. |
| 400 | ResourceQuotaExceeded.ServerAddedNum | The quota of %s is exceeded for resource %s, usage %s/%s. | The number of servers added to the server group exceeds the quota limit. |
| 400 | OperationDenied.ServerGroupProtocolNotSupport | The operation is not allowed because of ServerGroupProtocolNotSupport. | The operation is not allowed because the server group protocol is not supported. |
| 400 | UnsupportedFeature.FullTraceHttps | The feature of FullTraceHttps is not supported for current instance. | The current instance edition does not support the end-to-end HTTPS feature. |
| 400 | ResourceInConfiguring.Listener | The specified resource of %s is being configured, please try again later. | The specified resource of %s is being configured, please try again later. |
| 400 | Mismatch.VpcId | The %s is mismatched for %s and %s. | The %s is mismatched for %s and %s. |
| 400 | InvalidParameter | Invalid parameter, please check the parameter input. | At least one parameter is invalid. Check your input. |
| 400 | OperationDenied.CACertificateCorrupted | The CA certificate is corrupted. | CA certificate is corrupted |
| 403 | Forbidden.LoadBalancer | Authentication is failed for %s. | Authentication is failed for %s. |
| 404 | ResourceNotFound.Listener | The specified resource %s is not found. | The listener does not exist. |
| 404 | ResourceNotFound.ServerGroup | The specified resource %s is not found. | The backend server group does not exist. |
| 404 | ResourceNotFound.SecurityPolicy | The specified resource %s is not found. | The specified resource %s is not found. |
| 404 | ResourceNotFound.Certificate | The specified resource %s is not found. | The specified resource %s is not found. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.