Update Application Load Balancer Listener Properties - UpdateListenerAttribute
Overview
Update the properties of an application load balancer listener
Definition
Public Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
Action | string | Corresponding API command name, the current API is UpdateListenerAttribute . | Yes |
PublicKey | string | The user's public key can be obtained from Console (opens in a new tab) | Yes |
Signature | string | User signature generated based on public key and API command, see Signature Algorithm | Yes |
Request Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
Region | string | Region. See List of Regions and Availability Zones | Yes |
ProjectId | string | Project ID. If not filled in, the default project is used, sub-accounts must be filled in. Please refer to the GetProjectList interface. | Yes |
LoadBalancerId | string | ID of the Load Balancing Instance | Yes |
ListenerId | string | Listener's ID | Yes |
Name | string | The name of the listener. Character length limit: [1-255]; special characters are limited to: -_. | No |
Remark | string | Description of the listener. Character limit: [0-255] | No |
Certificates.N | string | Default certificate ID for (application-specific) servers. Only HTTPS listeners are supported. | No |
SecurityPolicyId | string | (Application-specific) Security policy group ID. Only HTTPS listening supports binding. "Default" means binding to the native policy. | No |
IdleTimeout | int | Connection idle timeout period. Unit: seconds. Application type limited value range: [1-86400] | No |
Scheduler | string | Load Balancing Algorithm. Application-specific limited values: "Roundrobin"/"Source"/"WeightRoundrobin"/"Leastconn"/"Backup". | No |
StickinessConfig.Enabled | boolean | Whether to enable the session persistence feature. Application load balancing instances are based on Cookies, while network load balancing is based on the source IP. This ensures that within the corresponding idle timeout period, the same source IP is delivered to the same service node. The default value is: false | No |
StickinessConfig.Type | string | (Application-specific) Cookie processing method. Limited enumeration values: "ServerInsert" / "UserDefined", the default value is: "ServerInsert". | No |
StickinessConfig.CookieName | string | (Application-specific) Custom Cookie. Effective when StickinessType is set to "UserDefined"; character length limit: [0-255] | No |
HealthCheckConfig.Enabled | boolean | Whether to enable the health check function. Temporarily does not support shutting down; the default value is: true | No |
HealthCheckConfig.Type | string | Health check method. Application type limited values: "Port"/"HTTP"; Default value: "Port". | No |
HealthCheckConfig.Domain | string | (Application-specific) HTTP Check Domain | No |
HealthCheckConfig.Path | string | (Application-specific) HTTP Check Path | No |
CompressionEnabled | boolean | (Application-specific) Whether to enable data compression function. Currently, only gzip is supported to compress specific file types. | No |
HTTP2Enabled | boolean | (Application-specific) Whether to enable the HTTP/2 feature. Only HTTPS listening supports enabling. | No |
RedirectEnabled | boolean | (Application-specific) Whether to enable HTTP redirection to HTTPS. Only HTTP listening supports enabling. | No |
RedirectPort | int | (Application-specific) Redirect port. Limited value range: [1-65535] | No |
Response Field
Field Name | Type | Description Information | Required |
---|---|---|---|
RetCode | int | Return status code. If it is 0, it means successful return. If it is not 0, it means failure. | Yes |
Action | string | Operation command name. | Yes |
Message | string | Returns an error message, providing detailed description when RetCode is non-zero. | No |
Example
Request Example
https://api.ucloud-global.com/?Action=UpdateListenerAttribute
&Region=cn-zj
&Zone=cn-zj-01
&ProjectId=QFtIfkUc
&LoadBalancerId=ivxKvLBP
&ListenerId=EfOUwEZT
&Name=iudDulUa
&Remark=msPPNPop
&Certificates.n=fYidutAc
&SecurityPolicyId=EzzcCUpN
&IdleTimeout=4
&Scheduler=UkrfRIia
&StickinessConfig.Enabled=false
&StickinessConfig.Type=wkuTDkaQ
&StickinessConfig.CookieName=fdKPdCYA
&HealthCheckConfig.Enabled=true
&HealthCheckConfig.Type=zUCAytpD
&HealthCheckConfig.Domain=scoABRTY
&HealthCheckConfig.Path=XZxPniqI
&CompressionEnabled=true
&HTTP2Enabled=true
&RedirectEnabled=false
&RedirectPort=5
Response Example
{
"Action": "UpdateListenerAttributeResponse",
"RetCode": 0
}