DescribeNLBListeners - DescribeNLBListeners
Overview
DescribeNLBListeners
Definition
Public Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
Action | string | Corresponding API command name, the current API is DescribeNLBListeners . | Yes |
PublicKey | string | The user's public key can be obtained from Console (opens in a new tab) | Yes |
Signature | string | User signature generated based on public key and API command, see Signature Algorithm | Yes |
Request Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
Region | string | Region. See Region and Zone List | Yes |
ProjectId | string | Project ID. Leave it blank for the default project. Sub-accounts must fill in. Please refer to the GetProjectList API | No |
NLBId | string | The ID of the load balancing instance. If ListenerId is not specified, it describes all listeners under the specified LoadBalancerId. | Yes |
ListenerId | string | Listener's ID | No |
Limit | int | Limit the number of listeners returned | No |
Offset | string | Set the offset of the listener | No |
Response Field
Field Name | Type | Description Information | Required |
---|---|---|---|
RetCode | int | Return status code. If it is 0, it means successful return. If it is not 0, it means failure. | Yes |
Action | string | Operation command name. | Yes |
Message | string | Returns an error message, providing detailed description when RetCode is non-zero. | No |
TotalCount | int | Total Count | Yes |
Listeners | array[Listener] | Returned Listener List | Yes |
Data Model
Listener
Field Name | Type | Description Information | Required |
---|---|---|---|
ListenerId | string | Listener's ID | No |
Name | string | Name of the Listener | No |
Remark | string | Remarks on the Listener | No |
StartPort | int | Start port of the port range | No |
EndPort | int | End port of the port range | No |
Protocol | string | Monitoring protocol, limited to the values: "TCP"/"UDP". | No |
Scheduler | string | Load balancing algorithm, limited values: "RoundRobin"/"SourceHash"/"LeastConn"/"WeightLeastConn "/"WeightRoundRobin " | No |
StickinessTimeout | int | Session keep-alive timeout. Unit: seconds, 0 means session keep-alive is not enabled. | No |
ForwardSrcIPMethod | string | Method of transmitting source IP. Limited values: "" / "None" / "Toa", empty string and None represent closed. | No |
HealthCheckConfig | HealthCheckConfig | Health Check Related Configuration | No |
Targets | array[Target] | Service Node Information | No |
State | string | Listener health status, "Healthy"/"Unhealthy"/"PartialHealth"/"None". | No |
HealthCheckConfig
Field Name | Type | Description Information | Required |
---|---|---|---|
Enabled | boolean | Whether to enable the health check function. | No |
Port | int | Health Check Probe Port Note: Limited value range: [1-65535] | No |
Type | string | Health Check Method Limited values: "Port"/"UDP"/"Ping"/"HTTP" Default value: “Port” | No |
Interval | int | Health Check Interval Time Limited value range: [1-60] in seconds Default is 2s | No |
MinSuccess | int | Minimum Health Check Successes Limited value range: [1-10] Default 3 | No |
MaxFail | int | Maximum Health Check Failures Limited value range: [1-10] Default 3 | No |
ReqMsg | string | Request string for "UDP" check mode Request json string for "HTTP" check mode | No |
ResMsg | string | Expected response string for 'UDP' check mode Response status code for 'HTTP' check mode | No |
Target
Field Name | Type | Description Information | Required |
---|---|---|---|
Region | string | Service Node Location | No |
ResourceType | string | Type of service node | No |
ResourceId | string | Resource ID of the service node. Must be passed when not of IP type. | No |
ResourceName | string | Resource Name of Service Node | No |
VPCId | string | The VPC resource ID of the service node. It is required when the IP type is passed. | No |
SubnetId | string | The subnet resource ID of the service node. Must be passed when the IP type is used. | No |
ResourceIP | string | IP of the service node. Must be provided when the IP type is set. | No |
Port | int | Port of the service node | No |
Weight | int | The weight of the service node. Support for updates. | No |
Enabled | boolean | Is the service node enabled? | No |
Id | string | Service node identification ID Description: No need to pass when adding a service node Must pass when updating service node attributes | No |
State | string | Health 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
}