Updates the attributes of a listener, such as the name and the default action.
Operation description
UpdateListenerAttribute is an asynchronous operation. After a request is sent, the system returns a request ID and runs the task in the background. You can call the GetListenerAttribute operation to query the status of the task.
- If a listener is in the Configuring state, the configuration of the listener is being modified.
- If a listener is in the Running state, the configuration of the listener is modified.
Debugging
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.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
alb:UpdateListenerAttribute | update |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
ListenerId | string | Yes | The ID of the Application Load Balancer (ALB) instance. | lsr-bp1bpn0kn908w4nbw**** |
ClientToken | string | No | 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.
| 5A2CFF0E-5718-45B5-9D4D-70B3FF3898 |
DryRun | boolean | No | Specifies whether to perform only a dry run, without performing the actual request. Valid values:
| false |
ListenerDescription | string | No | The name of the listener. The name must be 2 to 256 characters in length, and can contain letters, digits, and the following special characters: , . ; / @ _ -. | HTTP_80 |
RequestTimeout | integer | No | The timeout period of a request. Unit: seconds. Valid values: 1 to 180. If no response is received from the backend server within the specified timeout period, ALB returns an | 3 |
IdleTimeout | integer | No | The timeout period of an idle connection. Unit: seconds. Valid values: 1 to 60. If no request is received within the specified timeout period, ALB closes the current connection. When another request is received, ALB establishes a new connection. | 15 |
GzipEnabled | boolean | No | Specifies whether to enable GZIP compression for specific types of files. Valid values:
| true |
Http2Enabled | boolean | No | Specifies whether to enable HTTP/2. Valid values:
Note
This parameter is available only when you create an HTTPS listener.
| true |
SecurityPolicyId | string | No | The security policy ID. System security policies and custom security policies are supported. Note
This parameter is available only when you create an HTTPS listener.
| tls_cipher_policy_1_0 |
CaEnabled | boolean | No | Specifies whether to enable mutual authentication. Valid values:
| false |
XForwardedForConfig | object | No | The configurations of the X-Forwarded-For header. | |
XForwardedForClientCertClientVerifyAlias | string | No | The name of the custom header. The header takes effect only when you set XForwardedForClientCertClientVerifyEnabled to true. The name must be 1 to 40 characters in length. The name can contain lowercase letters, digits, hyphens (-), and underscores (-). Note
Only HTTPS listeners support this parameter.
| test_client-verify-alias_123456 |
XForwardedForClientCertClientVerifyEnabled | boolean | No | Specifies whether to use the
Note
Only HTTPS listeners support this parameter.
| false |
XForwardedForClientCertFingerprintAlias | string | No | The name of the custom header. The header takes effect only when you set XForwardedForClientCertFingerprintEnabled to true. The name must be 1 to 40 characters in length. The name can contain lowercase letters, digits, hyphens (-), and underscores (-). Note
Only HTTPS listeners support this parameter.
| test_finger-print-alias_123456 |
XForwardedForClientCertFingerprintEnabled | boolean | No | Specifies whether to use the
Note
Only HTTPS listeners support this parameter.
| false |
XForwardedForClientCertIssuerDNAlias | string | No | The name of the custom header. The header takes effect only when you set XForwardedForClientCertIssuerDNEnabled to true. The name must be 1 to 40 characters in length. The name can contain lowercase letters, digits, hyphens (-), and underscores (-). Note
Only HTTPS listeners support this parameter.
| test_issue-dn-alias_123456 |
XForwardedForClientCertIssuerDNEnabled | boolean | No | Specifies whether to use the
Note
Only HTTPS listeners support this parameter.
| false |
XForwardedForClientCertSubjectDNAlias | string | No | The name of the custom header. This parameter is valid only if the XForwardedForClientCertSubjectDNEnabled parameter is set to true.**** The name must be 1 to 40 characters in length, The name can contain lowercase letters, digits, hyphens (-), and underscores (-). Note
Only HTTPS listeners support this parameter.
| test_subject-dn-alias_123456 |
XForwardedForClientCertSubjectDNEnabled | boolean | No | Specifies whether to use the
Note
Only HTTPS listeners support this parameter.
| false |
XForwardedForClientSrcPortEnabled | boolean | No | Specifies whether to use the
Note
HTTP and HTTPS listeners support this parameter.
| false |
XForwardedForEnabled | boolean | No | Specifies whether to use the
Note
HTTP and HTTPS listeners support this parameter.
| true |
XForwardedForProtoEnabled | boolean | No | Specifies whether to use the
Note
HTTP, HTTPS, and QUIC listeners support this parameter.
| false |
XForwardedForSLBIdEnabled | boolean | No | Specifies whether to use the
Note
HTTP, HTTPS, and QUIC listeners support this parameter.
| false |
XForwardedForSLBPortEnabled | boolean | No | Specifies whether to use the
Note
HTTP, HTTPS, and QUIC listeners support this parameter.
| false |
XForwardedForClientSourceIpsEnabled | boolean | No | Specifies whether to use the X-Forwarded-For header to preserve client IP addresses. Valid values:
Note
HTTP and HTTPS listeners support this parameter.
| false |
XForwardedForClientSourceIpsTrusted | string | No | The trusted proxy IP address. ALB instances traverse the IP addresses in the | 10.1.1.0/24 |
QuicConfig | object | No | The configuration information when the listener is associated with a QUIC listener. | |
QuicListenerId | string | No | The QUIC listener ID. This parameter is required if QuicUpgradeEnabled is set to true. Only HTTPS listeners support this parameter. Note
You must add the HTTPS listener and the QUIC listener to the same ALB instance. In addition, make sure that the QUIC listener has never been associated with another listener.
| lsn-333 |
QuicUpgradeEnabled | boolean | No | Specifies whether to enable QUIC upgrade. Valid values:
Note
Only HTTPS listeners support this parameter.
| false |
Certificates | array<object> | No | The details about the certificates. | |
object | No | The certificate. | ||
CertificateId | string | No | The ID of the certificate. Only server certificates are supported. You can specify at most 20 certificate IDs. | 12315790212_166f8204689_1714763408_70998**** |
CaCertificates | array<object> | No | The information about the CA certificate. | |
object | No | The CA certificate. | ||
CertificateId | string | No | The ID of the CA certificate. You can specify only one CA certificate. Note
This parameter is required if CaEnabled is set to true.
| 123359****** |
DefaultActions | array<object> | No | The actions of the default forwarding rule. | |
object | No | The action of the default forwarding rule. | ||
ForwardGroupConfig | object | No | The forwarding action. This parameter takes effect only when you set Type to ForwardGroup. You can specify at most 20 actions. | |
ServerGroupTuples | array<object> | Yes | The server groups to which requests are forwarded. | |
object | No | The server group to which requests are forwarded. | ||
ServerGroupId | string | Yes | The ID of the server group to which requests are forwarded. | rsp-cige6j5e7p**** |
Type | string | Yes | The action type. You can specify only one type. Set the value to ForwardGroup, which specifies that requests are forwarded to multiple server groups. | ForwardGroup |
Response parameters
Examples
Sample success responses
JSON
format
{
"JobId": "72dcd26b-f12d-4c27-b3af-18f6aed5****",
"RequestId": "365F4154-92F6-4AE4-92F8-7FF34B540710"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | IncorrectStatus.LoadBalancer | The status of %s [%s] is incorrect. | The status of %s [%s] is incorrect. |
400 | IncorrectBusinessStatus.LoadBalancer | The business status of %s [%s] is incorrect. | The business status of %s [%s] is incorrect. |
400 | IncorrectStatus.Listener | The status of %s [%s] is incorrect. | The status of %s [%s] is incorrect. |
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 not allowed because of %s. |
400 | ResourceAlreadyAssociated.Certificate | The specified resource %s is already associated. | The specified resource %s 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 quota of %s is exceeded for resource %s, usage %s/%s. |
400 | ResourceQuotaExceeded.LoadBalancerServersNum | 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.ServerAddedNum | 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 | 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. | - |
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. | Invalid parameter, please check the parameter input. |
403 | Forbidden.LoadBalancer | Authentication is failed for %s. | Authentication is failed for %s. |
404 | ResourceNotFound.Listener | The specified resource %s is not found. | The specified resource %s is not found. |
404 | ResourceNotFound.ServerGroup | The specified resource %s is not found. | The specified resource %s is not found. |
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. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-01-29 | The Error code has changed | View Change Details |
2024-01-24 | The Error code has changed | View Change Details |
2023-11-06 | The Error code has changed | View Change Details |