You can call this operation to create layer 4 forwarding rules.

Request parameters

Name Type Required Description
Listeners String Yes The array of listeners that you want to create 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 that you want to change settings for.
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 Yes The port for back-end (Anti-DDoS Pro to origin server) connections. Valid values: 0-65535.
RealServers JSON array Yes The IP addresses of the origin servers.

Response parameters

Name Type Description
RequestId String The GUID generated by Alibaba Cloud for the request.

Examples

Sample requests
{
  "Listeners": "[{\"InstanceId\":\"0bcf28g5-d57c-11e7-9bs0-d89d6717dxbc\",\"Protocol\":\"tcp\",\"FrontendPort\":80,\"BackendPort\":5,\"RealServers\":[\"1.1.1.1\",\"2.2.2.2\"]}]"
}
Sample responses
{
  "RequestId": "0bcf28g5-d57c-11e7-9bs0-d89d6717dxbc"
}