Docs
api
Network Load Balance(NLB)
CreateNLBListener

CreateNLBListener - CreateNLBListener

Overview

Create NLB Listener

Definition

Public Parameters

Parameter NameTypeDescription InformationRequired
ActionstringCorresponding API command name, the current API is CreateNLBListener.Yes
PublicKeystringThe user’s public key can be obtained from ConsoleYes
SignaturestringUser signature generated based on public key and API command, see Signature AlgorithmYes

Request Parameters

Parameter NameTypeDescription InformationRequired
RegionstringRegion. See Region and Zone ListYes
ProjectIdstringProject ID. Leave it blank for the default project. Sub-accounts must fill in. Please refer to the GetProjectList APINo
NLBIdstringID of the Network Load BalanceYes
NamestringName of the listener
Character length limit: [1-255]
Special characters allowed: -_.
Default value: listener
No
RemarkstringRemarks for the listener
Character length limit: [0-255]
No
StartPortintStart port of the port range
Limited value: [1-65535]
Default value 1
No
EndPortintEnd port of the port range
Limited value: [1-65535]
The value is not less than the start port
Default value 65535
No
ProtocolstringMonitoring Protocol
Limited values: “TCP”/“UDP”.
No
SchedulerstringLoad Balancing Algorithm
Limited values: “RoundRobin”/“SourceHash”/“LeastConn”/“WeightLeastConn ”/“WeightRoundRobin”
Default value “RoundRobin”
No
StickinessTimeoutintSession keep-alive timeout. Unit: seconds
Limited value range: [60-900], 0 means session keep-alive is not enabled
Default value 60
No
HealthCheckConfig.EnabledbooleanWhether to enable the health check function. Temporarily does not support closing, default is true.No
HealthCheckConfig.PortintHealth Check Detection Port Description: Limited Value Range: [1-65535]No
HealthCheckConfig.TypestringHealth Check Method Limited Values: “Port”/“UDP”/“Ping”/“HTTP” Default Value: “PortNo
HealthCheckConfig.ReqMsgstringRequest string for UDP check modeNo
HealthCheckConfig.ResMsgstringExpected response string for “UDP” check modeNo
ForwardSrcIPMethodstringMethod of Passing Source IP
Limited values: "" / “None” / “Toa”, both empty string and None represent turning off.
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
ListenerIdstringListener’s IDYes

Example

Request Example

https://api.dezai.com/?Action=CreateNLBListener
&Region=cn-zj
&Zone=cn-zj-01
&ProjectId=MARULUOv
&NLBId=GNvXptgc
&Name=LtMcdpyQ
&Remark=urkacxDK
&StartPort=5
&EndPort=4
&Protocol=vfTQAfIi
&Scheduler=mYCNnjfx
&StickinessTimeout=7
&HealthCheckConfig=WHmazuVn
&HealthCheckConfig.Port=7
&HealthCheckConfig.Type=OTsPFkqI
&HealthCheckConfig.Interval=3
&HealthCheckConfig.MinSuccess=8
&HealthCheckConfig.MaxFail=5
&HealthCheckConfig.ReqMsg=AQIXJQZS
&HealthCheckConfig.ResMsg=bBBpmaEy
&ForwardSrcIPMethod=aRYJWQFx

Response Example

{
  "Action": "CreateNLBListenerResponse",
  "ListenerId": "WVmnGcQN",
  "RetCode": 0
}