Docs
api
Load Balance(ULB)
UpdateListenerAttribute

Update Application Load Balancer Listener Properties - UpdateListenerAttribute

Overview

Update the properties of an application load balancer listener

Definition

Public Parameters

Parameter NameTypeDescription InformationRequired
ActionstringCorresponding API command name, the current API is UpdateListenerAttribute.Yes
PublicKeystringThe user's public key can be obtained from Console (opens in a new tab)Yes
SignaturestringUser signature generated based on public key and API command, see Signature AlgorithmYes

Request Parameters

Parameter NameTypeDescription InformationRequired
RegionstringRegion. See List of Regions and Availability ZonesYes
ProjectIdstringProject ID. If not filled in, the default project is used, sub-accounts must be filled in. Please refer to the GetProjectList interface.Yes
LoadBalancerIdstringID of the Load Balancing InstanceYes
ListenerIdstringListener's IDYes
NamestringThe name of the listener. Character length limit: [1-255]; special characters are limited to: -_.No
RemarkstringDescription of the listener. Character limit: [0-255]No
Certificates.NstringDefault certificate ID for (application-specific) servers. Only HTTPS listeners are supported.No
SecurityPolicyIdstring(Application-specific) Security policy group ID. Only HTTPS listening supports binding. "Default" means binding to the native policy.No
IdleTimeoutintConnection idle timeout period. Unit: seconds. Application type limited value range: [1-86400]No
SchedulerstringLoad Balancing Algorithm. Application-specific limited values: "Roundrobin"/"Source"/"WeightRoundrobin"/"Leastconn"/"Backup".No
StickinessConfig.EnabledbooleanWhether 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: falseNo
StickinessConfig.Typestring(Application-specific) Cookie processing method. Limited enumeration values: "ServerInsert" / "UserDefined", the default value is: "ServerInsert".No
StickinessConfig.CookieNamestring(Application-specific) Custom Cookie. Effective when StickinessType is set to "UserDefined"; character length limit: [0-255]No
HealthCheckConfig.EnabledbooleanWhether to enable the health check function. Temporarily does not support shutting down; the default value is: trueNo
HealthCheckConfig.TypestringHealth check method. Application type limited values: "Port"/"HTTP"; Default value: "Port".No
HealthCheckConfig.Domainstring(Application-specific) HTTP Check DomainNo
HealthCheckConfig.Pathstring(Application-specific) HTTP Check PathNo
CompressionEnabledboolean(Application-specific) Whether to enable data compression function. Currently, only gzip is supported to compress specific file types.No
HTTP2Enabledboolean(Application-specific) Whether to enable the HTTP/2 feature. Only HTTPS listening supports enabling.No
RedirectEnabledboolean(Application-specific) Whether to enable HTTP redirection to HTTPS. Only HTTP listening supports enabling.No
RedirectPortint(Application-specific) Redirect port. Limited value range: [1-65535]No

Response Field

Field NameTypeDescription InformationRequired
RetCodeintReturn status code. If it is 0, it means successful return. If it is not 0, it means failure.Yes
ActionstringOperation command name.Yes
MessagestringReturns 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
}