tencent cloud

ModifyListener

下载
聚焦模式
字号
最后更新时间: 2026-09-14 20:55:39

1. API Description

Domain name for API request: ga2.intl.tencentcloudapi.com.

Modify a listener

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common Params. The value used for this API: ModifyListener.
Version Yes String Common Params. The value used for this API: 2025-01-15.
Region No String Common Params. This parameter is not required.
GlobalAcceleratorId Yes String

Global acceleration instance ID.

ListenerId Yes String

Listener ID.

Name No String

Name.

Parameter format: starting with a letter or Chinese characters, 2–128 characters in length, supporting letters, digits, Chinese characters, . - _

Description No String

Description. Maximum length cannot exceed 100 bytes.

IdleTimeout No Integer

Connection idle wait time.

1. For HTTP/HTTPS listener, the supported range is 1-60. 2. For TCP listener, the supported range is 10-900. 3. For UDP listener, the supported range is 10-20.

ClientAffinity No String

Whether to enable session persistence.

Enumeration values:

  • Open: on.
  • Close: off.

TCP/UDP listeners support modification of this parameter.

ClientAffinityTime No Integer

Session persistence duration.

Value range: [60, 3600]

RequestTimeout No Integer

Request timeout.

Value range: [1, 180]

This parameter can be modified only for HTTPS listeners.

XForwardedForRealIp No Boolean

Whether to enable the layer 7 method of obtaining the client IP.

This parameter modification is supported only for HTTPS/HTTP listeners.

CertificationType No String

Parsing method.

Enumeration values:

  • UNIDIRECTIONAL: two-way.
  • MUTUAL: one-way.

Only HTTPS/HTTP listeners support modifying this parameter.

CipherPolicyId No String

Encryption algorithm kit.

Input limits: support selecting tls_policy_1.0-2', 'tls_policy_1.1-2', 'tls_policy_1.2', 'tls_policy_1.2_strict', 'tls_policy_1.2_strict-1.3'.

Only HTTPS listeners support modifying this parameter.

ServerCertificates.N No Array of String

Server certificate.

Input limit: currently only support importing one cert; to use multiple certs, use the cert api CreateListenerAdditionalCert to add other certs.

Only HTTPS listeners support modification of this parameter.

ClientCaCertificates.N No Array of String

Client certificate.

Input limitations: 1. Currently only support importing one certificate; to use multiple certificates, use the certificate api CreateListenerAdditionalCert to add other certificates. 2. The certificate must be a CA certificate.

Only HTTPS listeners support modification of this parameter, and mutual authentication must be enabled.

GetRealIpType No String

Method of obtaining the source IP.

Input parameter limits: support selecting 'ProxyProtocol', 'Close', 'ProxyProtocolV2', 'TOA'.

Only TCP listeners support modification of this parameter.

3. Output Parameters

Parameter Name Type Description
TaskId String

Task ID.

RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

4. Example

Example1 Modifying a Listener

Input Example

POST / HTTP/1.1
Host: ga2.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ModifyListener
<Common request parameters>

{
    "GlobalAcceleratorId": "ga-xxxxxxx",
    "ListenerId": "lsr-xxxxxx",
    "Name": "Port Range Test"
}

Output Example

{
    "Response": {
        "RequestId": "30b391b1-6086-4118-a314-4a2b78111fbd",
        "TaskId": "099c31b3-82bd-4b1a-bbd1-0ad614b4f54c"
    }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
InvalidParameter.ApplicationLayerListenerCannotCarryParameters Layer-7 listeners do not support carrying the parameter %(value)s.
InvalidParameter.HttpListenerCannotCarryParameters Http listeners do not support carrying the parameter %(value)s.
InvalidParameter.HttpsListenerCanCarryParameters
InvalidParameter.InputMustExistOne The in-progress request must have one of the %(value)s input parameters.
InvalidParameter.TcpListenerCarryParameters
InvalidParameter.TransportLayerListenerCannotCarryParameters Layer-4 listeners do not support carrying the parameter %(value)s.
InvalidParameterValue.InstanceMismatch The instance object %(value)s has a mismatched relationship.
InvalidParameterValue.InstanceName Instance name must start with an uppercase/lowercase character or Chinese character, and support digits, periods, hyphens, and underscores.
InvalidParameterValue.LengthRange
InvalidParameterValue.Malformed Parameter value %(value)s of %(parameter)s is invalid. A correct and complete value is in the form of %(template)s.
InvalidParameterValue.Range The value %(value)s of the parameter %(parameter)s must be within the range %(value_range)s.
InvalidParameterValue.TooLong Parameter value %(value)s length cannot be greater than %(max_size)s.
MissingParameter Parameters are missing.
UnsupportedOperation.CertificateNotCa
UnsupportedOperation.CurrentAccountNotAllowed The current account does not support this operation.
UnsupportedOperation.HttpVersionInconsistent The maximum HTTP protocol version of the listener and terminal node group should be consistent.
UnsupportedOperation.InstanceNotRunning The instance is not in the running state. The current operation is not supported.
UnsupportedOperation.OnlyTcpListenerSupportToa For TCP listeners only, client IP can be obtained through TOA.
UnsupportedOperation.TOAFeatureNotEnabled The TOA feature is not enabled for the current global acceleration instance. Contact Tencent Cloud customer service to submit a request.
UnsupportedOperation.UdpListenerNotSupportProxyProtocol
UnsupportedOperation.UnlawfulCertificate

帮助和支持

本页内容是否解决了您的问题?

填写满意度调查问卷,共创更好文档体验。

文档反馈