You can call this operation to perform queries on the attributes of layer 4 forwarding rules, including session persistence and anti-DDoS protection settings.

Request parameters

Name Type Required Description
Listeners String Yes The array of listeners that you want to query represented as a JSON string. For more information, see Listener.
Table 1. Listener
Name Type Required Description
InstanceId String Yes The ID of the Anti-DDoS Pro instance.
Protocol String Yes The listener protocol.
FrontendPort Integer Yes The port for front-end (client to Anti-DDoS Pro) connections. Valid values: 0-65535.
BackendPort Integer No The port for back-end (Anti-DDoS Pro to origin server) connections. Valid values: 0-65535.
RealServers JSON array No The IP addresses of the origin servers.
IsAutoCreate Boolean No Indicates whether the listener is automatically created. If true, the listener cannot be deleted or modified.

Response parameters

Name Type Description
Total Integer The total number of result records.
Listeners String The array of listeners represented as a JSON string. For more information, see Listener.
RequestId String The GUID generated by Alibaba Cloud for the request.
Table 2. Listener
Name Type Description
InstanceId String The ID of the Anti-DDoS Pro instance.
Protocol String The listener protocol.
FrontendPort Integer The port for front-end (client to Anti-DDoS Pro) connections. Valid values: 0-65535.
Config TcpConfig The TCP configuration. For more information, see TcpConfig.
Table 3. TcpConfig
Name Type Description
PersistenceTimeout Integer The session timeout. Unit: seconds. Default value: 0. A value of 0 indicates that session persistence is disabled.
Synproxy String The false sources feature of anti-DDoS protection. Valid values: off and on.
NodataConn String The null session connections feature of anti-DDoS protection. Valid values: off and on.
Sla Sla The connection limit on destination IPs. For more information, see Sla.
Slimit Slimit The connection limit on source IPs. For more information, see Slimit.
PayloadLen PayloadLen The limit on the payload size of each packet. For more information, see PayloadLen.
Table 4. Sla
Name Type Description
Cps Integer The maximum number of new connections per second to a single destination IP and port. Valid values: 100-100,000.
Maxconn Integer The maximum number of concurrent connections to a single destination IP and port. Valid values: 1,000-1,000,000.
CpsEnable Integer Indicates whether Cps is enabled. Valid values:
  • 0: Disabled
  • 1 (Default): Enabled
MaxconnEnable Integer Indicates whether Maxconnection is enabled. Valid values:
  • 0: Disabled
  • 1 (Default): Enabled
Table 5. Slimit
Name Type Description
Cps Integer The maximum number of new connections per second from a single source IP. Valid values: 100-100,000.
Maxconn Integer The maximum number of concurrent connections from a single source IP. Valid values: 1,000-1,000,000.
CpsEnable Integer Indicates whether Cps is enabled. Valid values:
  • 0: Disabled
  • 1 (Default): Enabled
MaxconnEnable Integer Indicates whether Maxconnection is enabled. Valid values:
  • 0: Disabled
  • 1 (Default): Enabled
Table 6. PayloadLen
Name Type Description
Min Integer The minimum payload size of a packet.
Max Integer The maximum payload size of a packet.

Examples

Sample requests
{
  "Listeners": "[{\"InstanceId\":\"0bcf28g5-d57c-11e7-9bs0-d89d6717dxbc\",\"Protocol\":\"tcp\",\"FrontendPort\":80}]"
}
Sample responses
{
  "Total": 1,
  "Listeners": [
    {
      "InstanceId": "0bcf28g5-d57c-11e7-9bs0-d89d6717dxbc",
      "Protocol": "tcp",
      "FrontendPort": 80,
      "Config": {
        "PersistenceTimeout": 80,
        "Synproxy": "off",
		"NodataConn": "on",
        "Sla": {
          "Cps": 10,
          "Maxconn": 10,
		  "CpsEnable": 1,
		  "MaxconnEnable": 1
        },
        "Slimit": {
          "Cps": 10,
          "Maxconn": 10,
		  "CpsEnable": 1,
		  "MaxconnEnable": 1
        },
        "PayloadLen": {
          "Min": 1,
          "Max": 2
        }
      }
    }
  ],
  "RequestId": "0bcf28g5-d57c-11e7-9bs0-d89d6717dxbc"
}