# 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  | AccessKey ID, obtained from [Console](https://console.feb.sg/uaccount/api_manage)                                              | **Yes** |
| **Signature**  | string  | User signature generated based on public key and API command, see [Signature Algorithm](/docs/api/summary/signature.md)  | **Yes** |

### Request Parameters

| Parameter Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Region** | string | Region. See [List of Regions and Availability Zones](/docs/api/summary/regionlist) |**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](/docs/api/summary/get_project_list). |**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", no value is passed then no modification |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.  the default value is: true |No|
| **HealthCheckConfig.Type** | string | Health check method. Application type limited value: 'Port'/'HTTP/GRPC', default value: 'Port'. |No|
| **HealthCheckConfig.Domain** | string | (Application-specific) HTTP/GRPC Check Domain |No|
| **HealthCheckConfig.Path** | string | (Application-specific) HTTP/GRPC check path |No|
| **HealthCheckConfig.Method** | string | (Application-specific) HTTP check method |No|
| **HealthCheckConfig.ResponseCode** | string | (Application-specific) HTTP uses 2xx, 3xx format (comma-separated), while gRPC uses numeric codes (comma-separated). |No|
| **HealthCheckConfig.Port** | int | (Application-specific) port. Limited value range: [0-65535], default value 0 |No|
| **HealthCheckConfig.HTTPVersion** | string | (Application-specific) check version . default: HTTP/1.0 |No|
| **HealthCheckConfig.TimeOut** | int | (Application-specific) Timeout, in seconds, must be less than Interval. |No|
| **HealthCheckConfig.Interval** | int | (Application-specific) Interval time, in seconds, must be greater than TimeOut. |No|
| **HealthCheckConfig.UpCounts** | int | (Application-specific) Number of consecutive successful determinations |No|
| **HealthCheckConfig.DownCounts** | int | (Application-specific) Number of consecutive failures to determine |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|
| **TargetProtocol** | string | Backend protocol. Application-specific values: "HTTP, HTTPS, gRPC", default value: "HTTP". |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.feb.sg/?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
&HealthCheckConfig.Method=WRrwHGiX
&HealthCheckConfig.ResponseCode=jvKXXoHy
&HealthCheckConfig.Port=1
&HealthCheckConfig.HTTPVersion=xmdgrNsB
&HealthCheckConfig.TimeOut=1
&HealthCheckConfig.Interval=1
&HealthCheckConfig.UpCounts=7
&HealthCheckConfig.DownCounts=6
&TargetProtocol=wIleKViE
```

### Response Example
    
```json
{
  "Action": "UpdateListenerAttributeResponse",
  "RetCode": 0
}
```





