docs
api
Network Load Balance(NLB)
DescribeNLBListeners

DescribeNLBListeners - DescribeNLBListeners

Overview

DescribeNLBListeners

Definition

Public Parameters

Parameter NameTypeDescription InformationRequired
ActionstringCorresponding API command name, the current API is DescribeNLBListeners.Yes
PublicKeystringThe user's public key can be obtained from Console (opens in a new tab)Yes
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
NLBIdstringThe ID of the load balancing instance. If ListenerId is not specified, it describes all listeners under the specified LoadBalancerId.Yes
ListenerIdstringListener's IDNo
LimitintLimit the number of listeners returnedNo
OffsetstringSet the offset of the listenerNo

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
TotalCountintTotal CountYes
Listenersarray[Listener]Returned Listener ListYes

Data Model

Listener

Field NameTypeDescription InformationRequired
ListenerIdstringListener's IDNo
NamestringName of the ListenerNo
RemarkstringRemarks on the ListenerNo
StartPortintStart port of the port rangeNo
EndPortintEnd port of the port rangeNo
ProtocolstringMonitoring protocol, limited to the values: "TCP"/"UDP".No
SchedulerstringLoad balancing algorithm, limited values: "RoundRobin"/"SourceHash"/"LeastConn"/"WeightLeastConn "/"WeightRoundRobin "No
StickinessTimeoutintSession keep-alive timeout. Unit: seconds, 0 means session keep-alive is not enabled.No
ForwardSrcIPMethodstringMethod of transmitting source IP. Limited values: "" / "None" / "Toa", empty string and None represent closed.No
HealthCheckConfigHealthCheckConfigHealth Check Related ConfigurationNo
Targetsarray[Target]Service Node InformationNo
StatestringListener health status, "Healthy"/"Unhealthy"/"PartialHealth"/"None".No

HealthCheckConfig

Field NameTypeDescription InformationRequired
EnabledbooleanWhether to enable the health check function.No
PortintHealth Check Probe Port
Note:
Limited value range: [1-65535]
No
TypestringHealth Check Method
Limited values: "Port"/"UDP"/"Ping"/"HTTP"
Default value: “Port”
No
IntervalintHealth Check Interval Time
Limited value range: [1-60] in seconds
Default is 2s
No
MinSuccessintMinimum Health Check Successes
Limited value range: [1-10]
Default 3
No
MaxFailintMaximum Health Check Failures
Limited value range: [1-10]
Default 3
No
ReqMsgstringRequest string for "UDP" check mode
Request json string for "HTTP" check mode
No
ResMsgstringExpected response string for 'UDP' check mode
Response status code for 'HTTP' check mode
No

Target

Field NameTypeDescription InformationRequired
RegionstringService Node LocationNo
ResourceTypestringType of service nodeNo
ResourceIdstringResource ID of the service node. Must be passed when not of IP type.No
ResourceNamestringResource Name of Service NodeNo
VPCIdstringThe VPC resource ID of the service node. It is required when the IP type is passed.No
SubnetIdstringThe subnet resource ID of the service node. Must be passed when the IP type is used.No
ResourceIPstringIP of the service node. Must be provided when the IP type is set.No
PortintPort of the service nodeNo
WeightintThe weight of the service node. Support for updates.No
EnabledbooleanIs the service node enabled?No
IdstringService node identification ID
Description:
No need to pass when adding a service node
Must pass when updating service node attributes
No
StatestringHealth check status of the service node
Note:
Displayed when describing service node information
Limited enumeration values: "Healthy"/"Unhealthy".
No

Example

Request Example

https://api.surfercloud.com/?Action=DescribeNLBListeners
&Region=cn-zj
&Zone=cn-zj-01
&ProjectId=zTqiQROM
&NLBId=OxYTDxqj
&ListenerId=htQOHAjL
&Limit=6
&Offset=vXMpaXtW

Response Example

{
  "Action": "DescribeNLBListenersResponse",
  "Listeners": [
    {
      "EndPort": 3,
      "HealthCheckConfig": {},
      "IdleTimeout": 1,
      "ListenerId": "rkBmVaIv",
      "Name": "zEwDggfG",
      "Protocol": "eFyjvUkt",
      "Remark": "jNzTwrej",
      "Scheduler": "LLIVlwrh",
      "StartPort": 8,
      "State": "lPggUqwU",
      "StickinessTimeout": 1,
      "Targets": [
        {
          "Id": "WsMDEgKl",
          "Port": 1,
          "ResourceIP": "mNwgTlSs",
          "ResourceId": "yXhLvcOl",
          "ResourceName": "GZrvlkxA",
          "ResourceType": "PrqlPfMT",
          "State": "UVUgJQac",
          "SubnetId": "uopkZCvB",
          "VPCId": "hALclZIH",
          "Weight": 9
        }
      ]
    }
  ],
  "RetCode": 0,
  "TotalCount": 4
}
  • Company
  • ContactUs
  • Blog
Copyright © 2024 SurferCloud All Rights Reserved