هذه الصفحة غير متوفرة حاليًا بلغتك المحلية. نحن نعمل جاهدين على إضافة المزيد من اللغات. شاكرين تفهمك ودعمك المستمر لنا.

Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Updating a Listener

Updated on 2025-02-25 GMT+08:00

Function

This API is used to update a listener, such as listener name, description, associated backend server groups, and server certificates.

Constraints

  • If the provisioning status of the associated load balancer is not ACTIVE, the listener cannot be updated.
  • Only users with the ELB administrator permissions can specify the value of connection_limit.
  • The default_pool_id parameter has the following constraints:
    • Its value cannot be the ID of any backend server group of other listeners.
    • Its value cannot be the ID of any backend server group associated with the forwarding policies set for other listeners.
  • The relationships between the protocol used by the listener and the protocol of the backend server group are as follows:
    • When the protocol used by the listener is TCP, the protocol of the backend server group must be TCP.
    • When the protocol used by the listener is UDP, the protocol of the backend server group must be UDP.
    • When the protocol used by the listener is HTTP or TERMINATED_HTTPS, the protocol of the backend server group must be HTTP.

URI

PUT /v2.0/lbaas/listeners/{listener_id}

Table 1 Parameter description

Parameter

Mandatory

Type

Description

listener_id

Yes

String

Specifies the listener ID.

Request

Table 2 Parameter description

Parameter

Mandatory

Type

Description

listener

Yes

Object

Specifies the listener. For details, see Table 3.

Table 3 listener parameter description

Parameter

Mandatory

Type

Description

name

No

String

Specifies the listener name.

The value contains a maximum of 255 characters.

description

No

String

Provides supplementary information about the listener.

The value contains a maximum of 255 characters.

connection_limit

No

Integer

Specifies the maximum number of connections.

The value ranges from -1 to 2147483647.

This parameter is reserved. Only users with the ELB administrator permissions can specify this field.

http2_enable

No

Boolean

Specifies whether to use HTTP/2.

The value can be true or false.

  • true: HTTP/2 is used.
  • false: HTTP/2 is not used.

This parameter is valid only when the protocol used by the listener is set to TERMINATED_HTTPS.

default_pool_id

No

String

Specifies the ID of the associated backend server group.

If a request does not match the forwarding policy, the request is forwarded to the default backend server group for processing. If the value is null, the listener has no default backend server group.

This parameter has the following constraints:
  • Its value cannot be the ID of any backend server group of other listeners.
  • Its value cannot be the ID of any backend server group associated with the forwarding policies set for other listeners.
The relationships between the protocol used by the listener and the protocol of the backend server group are as follows:
  • When the protocol used by the listener is TCP, the protocol of the backend server group must be TCP.
  • When the protocol used by the listener is UDP, the protocol of the backend server group must be UDP.
  • When the protocol used by the listener is HTTP or TERMINATED_HTTPS, the protocol of the backend server group must be HTTP.

admin_state_up

No

Boolean

Specifies the administrative status of the listener.

This parameter is reserved, and the default value is true.

default_tls_container_ref

No

String

Specifies the ID of the server certificate used by the listener.

The value contains a maximum of 128 characters.

NOTE:

This parameter is valid only when protocol is set to TERMINATED_HTTPS.

client_ca_tls_container_ref

No

String

Specifies the ID of the CA certificate used by the listener.

The value contains a maximum of 128 characters.

NOTE:

This parameter is valid only when protocol is set to TERMINATED_HTTPS.

sni_container_refs

No

Array

Lists the IDs of SNI certificates (server certificates with domain names) used by the listener.

If the parameter value is an empty list, the SNI feature is disabled.

NOTE:

This parameter is valid only when protocol is set to TERMINATED_HTTPS.

tls_ciphers_policy

No

String

Specifies the security policy used by the listener. This parameter is valid only when the protocol used by the listener is set to TERMINATED_HTTPS.

The value can be tls-1-0-inherit, tls-1-0, tls-1-1, tls-1-2, or tls-1-2-strict, and the default value is tls-1-0. For details of cipher suites for each security policy, see Table 4.

Table 4 tls_ciphers_policy parameter description

Security Policy

TLS Version

Cipher Suite

tls-1-0-inherit

TLS 1.2 TLS 1.1 TLS 1.0

ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:AES128-GCM-SHA256:AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:AES128-SHA256:AES256-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:AES128-SHA:AES256-SHA:DHE-DSS-AES128-SHA:CAMELLIA128-SHA:EDH-RSA-DES-CBC3-SHA:DES-CBC3-SHA:ECDHE-RSA-RC4-SHA:RC4-SHA:DHE-RSA-AES256-SHA:DHE-DSS-AES256-SHA:DHE-RSA-CAMELLIA256-SHA:DHE-DSS-CAMELLIA256-SHA:CAMELLIA256-SHA:EDH-DSS-DES-CBC3-SHA:DHE-RSA-CAMELLIA128-SHA:DHE-DSS-CAMELLIA128-SHA

tls-1-0

TLS 1.2 TLS 1.1 TLS 1.0

ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:AES128-GCM-SHA256:AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:AES128-SHA256:AES256-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES128-SHA:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:AES128-SHA:AES256-SHA

tls-1-1

TLS 1.2 TLS 1.1

tls-1-2

TLS 1.2

tls-1-2-strict

TLS 1.2

ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:AES128-GCM-SHA256:AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:AES128-SHA256:AES256-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384

Response

Table 5 Response parameters

Parameter

Type

Description

listener

Object

Specifies the listener. For details, see Table 6.

Table 6 listeners parameter description

Parameter

Type

Description

id

String

Specifies the listener ID.

tenant_id

String

Specifies the ID of the project where the listener is used.

project_id

String

Specifies the ID of the project to which the listener belongs. This parameter has the same meaning as tenant_id.

name

String

Specifies the listener name.

description

String

Provides supplementary information about the listener.

protocol

String

Specifies the protocol used by the listener.

The value can be TCP, HTTP, UDP, or TERMINATED_HTTPS.

protocol_port

Integer

Specifies the port used by the listener.

The port number ranges from 1 to 65535.

loadbalancers

Array

Specifies the ID of the associated load balancer. For details, see Table 6.

connection_limit

Integer

Specifies the maximum number of connections.

The value ranges from -1 to 2147483647. The default value is -1, indicating that there is no restriction on the maximum number of connections.

This parameter is reserved.

admin_state_up

Boolean

Specifies the administrative status of the listener.

This parameter is reserved. The value can be true or false.

  • true: The load balancer is enabled.
  • false: The load balancer is disabled.

http2_enable

Boolean

Specifies whether to use HTTP/2.

The value can be true or false.

  • true: HTTP/2 is used.
  • false: HTTP/2 is not used.

This parameter is valid only when the protocol used by the listener is set to TERMINATED_HTTPS.

default_pool_id

String

Specifies the ID of the associated backend server group.

If a request does not match the forwarding policy, the request is forwarded to the default backend server group for processing. If the value is null, the listener has no default backend server group.

default_tls_container_ref

String

Specifies the ID of the server certificate used by the listener. For details, see Certificate.

This parameter is mandatory when protocol is set to TERMINATED_HTTPS.

client_ca_tls_container_ref

String

Specifies the ID of the CA certificate used by the listener. For details, see Certificate.

sni_container_refs

Array

Lists the IDs of SNI certificates (server certificates with domain names) used by the listener.

If the parameter value is an empty list, the SNI feature is disabled.

tags

Array

Tags the listener.

created_at

String

Specifies the time when the listener was created. The UTC time is in YYYY-MM-DDTHH:MM:SS format.

updated_at

String

Specifies the time when the listener was updated. The UTC time is in YYYY-MM-DDTHH:MM:SS format.

tls_ciphers_policy

String

Specifies the security policy used by the listener. This parameter is valid only when the protocol used by the listener is set to TERMINATED_HTTPS.

The value can be tls-1-0-inherit, tls-1-0, tls-1-1, tls-1-2, or tls-1-2-strict, and the default value is tls-1-0. For details of cipher suites for each security policy, see Table 3.

Table 7 loadbalancers parameter description

Parameter

Type

Description

id

String

Specifies the ID of the associated load balancer.

Example Request

  • Example request: Updating a listener
    PUT https://{Endpoint}/v2.0/lbaas/listeners/f622c150-72f5-4263-a47a-e5003c652aa3
    
    {  
        "listener": {  
            "description": "my listener",  
            "name": "listener-jy-test2", 
            "default_pool_id": "c61310de-9a06-4f0c-850c-6f4797b9984c", 
            "default_tls_container_ref": "23b58a961a4d4c95be585e98046e657a", 
            "client_ca_tls_container_ref": "417a0976969f497db8cbb083bff343ba"
        }  
    }

Example Response

  • Example response
    {
        "listener": {
            "client_ca_tls_container_ref": "417a0976969f497db8cbb083bff343ba",
            "protocol": "TERMINATED_HTTPS",
            "description": "my listener",
            "default_tls_container_ref": "23b58a961a4d4c95be585e98046e657a",
            "admin_state_up": true,
            "http2_enable": false,
            "loadbalancers": [
                {
                    "id": "165b6a38-5278-4569-b747-b2ee65ea84a4"
                }
            ],
            "tenant_id": "601240b9c5c94059b63d484c92cfe308",
            "project_id": "601240b9c5c94059b63d484c92cfe308",
            "sni_container_refs": [],
            "connection_limit": -1,
            "protocol_port": 443,
            "tags": [],
            "default_pool_id": "c61310de-9a06-4f0c-850c-6f4797b9984c",
            "id": "f622c150-72f5-4263-a47a-e5003c652aa3",
            "name": "listener-jy-test2",
     
            "created_at": "2018-07-25T01:54:13", 
            "updated_at": "2018-07-25T01:54:14"
      
        }
    }

Status Code

For details, see Status Codes.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback