For the complete documentation index, see llms.txt. This page is also available as Markdown.

CreateListener

1. API Description

This API (CreateListener) is used to create TCP, UDP, or TCPSSL listeners in a load balancer.

2. Input Parameters

The following request parameter list only provides API request parameters.

Parameter Name
Required
Type
Description

loadBalancerId

Yes

String

Load balance instance ID.

listenerName

Yes

String

Listener name.

This parameter can contain up to 64 characters. Only letters, numbers, - and periods (.) are supported.

portList

Yes

Array of Integer

Listening ports.

Value range: 0~65535 .

Example value: [" 6569 "]

clientToken

Yes

String

Used to ensure the idempotency of the request.

protocol

Yes

String

Listening protocols.

Available values:

TCP UDP

backendProtocol

Yes

String

Backend forwarding protocol.

Available values:

TCP UDP

scheduler

No

String

Scheduling algorithm.

Available values:

wrr (default): Weighted round robin, the higher the weight value of the backend server, the higher the probability of being polled. rr : Round robin, distribute external requests to backend servers in the order of access.

kind

No

Forwarding modes.

Available values:

FNAT (Global Network Address Translation) DR (Direct Routing)

Default value: DR

healthCheck

No

Information on the health check.

notify

No

Alarm.

3. Output Parameters

Parameter Name
Type
Description

requestId

String

The unique request ID, which is returned for each request.

RequestId is required for locating a problem.

listenerId

String

The listener ID.

4. Code Example

Create a listener.

5. Developer Resources

Zenlayer Cloud API 2.0 integrates SDKs,to make it easier for you to call APIs. More programming languages will be supported.

6. Error Codes

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

HTTP Status Code

Error Code

Description

Last updated