Deletes a port forwarding rule. You can only delete one port forwarding rule at a time.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes DeleteNetworkRule

The operation that you want to perform. Set the value to DeleteNetworkRule.

NetworkRule String Yes [{"InstanceId":"ddoscoo-cn-mp91j1ao****","Protocol":"tcp","FrontendPort":8080}]

Details about the port forwarding rule. This parameter is a JSON string. The fields in the value are described as follows:

  • InstanceId: the ID of the instance. This field is required and must be of the STRING type.
  • Protocol: the forwarding protocol. This field is required and must be of the STRING type. Valid values: tcp and udp.
  • FrontendPort: the forwarding port. This field is required and must be of the INTEGER type.
RegionId String No cn-hangzhou

The region ID of the instance. Valid values:

  • cn-hangzhou: mainland China, which indicates an Anti-DDoS Pro instance
  • ap-southeast-1: outside mainland China, which indicates an Anti-DDoS Premium instance

Response parameters

Parameter Type Example Description
RequestId String 49AD2F34-694A-4024-9B0E-DDCFC59CCC13

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/? Action=DeleteNetworkRule
&NetworkRule=[{"InstanceId":"ddoscoo-cn-mp91j1ao****","Protocol":"tcp","FrontendPort":8080}]
&<Common request parameters>

Sample success responses

XML format

<DeleteNetworkRuleResponse>
      <RequestId>49AD2F34-694A-4024-9B0E-DDCFC59CCC13</RequestId>
</DeleteNetworkRuleResponse>

JSON format

{
    "RequestId": "49AD2F34-694A-4024-9B0E-DDCFC59CCC13"
}

Error codes

For a list of error codes, visit the API Error Center.