All Products
Search
Document Center

Anti-DDoS:DescribeNetworkRuleAttributes

Last Updated:Oct 23, 2024

Queries the mitigation settings of the port forwarding rule for a non-website service. The mitigation settings include session persistence and DDoS mitigation policies.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
yundun-ddoscoo:DescribeNetworkRuleAttributesget
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
NetworkRulesstringYes

The details of the port forwarding rule. This parameter is a JSON string. The string contains the following fields:

  • 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.
[{"InstanceId":"ddoscoo-cn-mp91j1ao****","Protocol":"tcp","FrontendPort":8080}]

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

F9F2F77D-307C-4F15-8D02-AB5957EEBF97
NetworkRuleAttributesarray<object>

An array that consists of the mitigation settings of the port forwarding rule for a non-website service. The mitigation settings include session persistence and DDoS mitigation policies.

NetworkRuleAttributeobject
FrontendPortinteger

The forwarding port.

8080
InstanceIdstring

The ID of the instance.

ddoscoo-cn-mp91j1ao****
Protocolstring

The forwarding protocol. Valid values:

  • tcp
  • udp
tcp
Configobject

The mitigation settings of the port forwarding rule.

NodataConnstring

The status of the Empty Connection switch. Valid values:

  • on: The switch is turned on.
  • off: The switch is turned off.
off
Synproxystring

The status of the False Source switch. Valid values:

  • on: The switch is turned on.
  • off: The switch is turned off.
off
PersistenceTimeoutinteger

The timeout period of session persistence. Valid values: 30 to 3600. Unit: seconds. Default value: 0, which indicates that session persistence is disabled.

0
Slaobject

The settings of the Speed Limit for Destination policy.

MaxconnEnableinteger

The status of the Destination Concurrent Connection Rate Limit switch. Valid values:

  • 0: The switch is turned off.
  • 1: The switch is turned on.
0
CpsEnableinteger

The status of the Destination New Connection Rate Limit switch. Valid values:

  • 0: The switch is turned off.
  • 1: The switch is turned on.
1
Cpsinteger

The maximum number of new connections per second that can be established over the port of the destination instance. Valid values: 100 to 100000.

100000
Maxconninteger

The maximum number of concurrent connections that can be established over the port of the destination instance. Valid values: 1000 to 1000000.

1000000
Slimitobject

The settings of the Speed Limit for Source policy.

MaxconnEnableinteger

The status of the Source Concurrent Connection Rate Limit switch. Valid values:

  • 0: The switch is turned off.
  • 1: The switch is turned on.
0
CpsEnableinteger

The status of the Source New Connection Rate Limit switch. Valid values:

  • 0: The switch is turned off.
  • 1: The switch is turned on.
0
Cpsinteger

The maximum number of new connections per second that can be initiated from a source IP address. Valid values: 1 to 500000.

0
Ppslong

The packets per second (pps) limit for a source IP address. Valid values: 1 to 100000. Unit: packets/s. Default value: 0, which indicates that the pps for a source IP address is unlimited.

0
Bpslong

The bandwidth limit for a source IP address. Valid values: 1024 to 268435456. Unit: bytes/s. Default value: 0, which indicates that the bandwidth for a source IP address is unlimited.

0
Maxconninteger

The maximum number of concurrent connections initiated from a source IP address. Valid values: 1 to 500000.

0
CpsModeinteger

The mode of the Source New Connection Rate Limit switch. Valid values:

  • 1: the manual mode
  • 2: the automatic mode
1
PayloadLenobject

The settings of the Packet Length Limit policy.

Mininteger

The minimum length of a packet. Valid values: 0 to 6000. Unit: bytes.

0
Maxinteger

The maximum length of a packet. Valid values: 0 to 6000. Unit: bytes.

6000
Ccobject

The protection policy applied when the number of connections initiated from a source IP address frequently exceeds the limit.

Sblackarray<object>

The protection policy that a source IP address is added to the blacklist when the number of connections initiated from the IP address frequently exceeds the limit.

SblackItemobject
Typeinteger

The type of the limit that causes a source IP address to be added to the blacklist. Valid values:

  • 1: Source New Connection Rate Limit
  • 2: Source Concurrent Connection Rate Limit
  • 3: PPS Limit for Source
  • 4: Bandwidth Limit for Source
1
Duringinteger

The interval at which checks are performed. Set the value to 60. Unit: seconds.

60
Expiresinteger

The validity period of the IP address in the blacklist. Valid values: 60 to 604800. Unit: seconds.

600
Cntinteger

The threshold that the number of connections initiated from a source IP address can exceed the limit. Set the value to 5. If the number of connections initiated from a source IP address exceeds the limit five times during the check, the source IP address is added to the blacklist.

5

Examples

Sample success responses

JSONformat

{
  "RequestId": "F9F2F77D-307C-4F15-8D02-AB5957EEBF97",
  "NetworkRuleAttributes": [
    {
      "FrontendPort": 8080,
      "InstanceId": "ddoscoo-cn-mp91j1ao****",
      "Protocol": "tcp",
      "Config": {
        "NodataConn": "off",
        "Synproxy": "off",
        "PersistenceTimeout": 0,
        "Sla": {
          "MaxconnEnable": 0,
          "CpsEnable": 1,
          "Cps": 100000,
          "Maxconn": 1000000
        },
        "Slimit": {
          "MaxconnEnable": 0,
          "CpsEnable": 0,
          "Cps": 0,
          "Pps": 0,
          "Bps": 0,
          "Maxconn": 0,
          "CpsMode": 1
        },
        "PayloadLen": {
          "Min": 0,
          "Max": 6000
        },
        "Cc": {
          "Sblack": [
            {
              "Type": 1,
              "During": 60,
              "Expires": 600,
              "Cnt": 5
            }
          ]
        }
      }
    }
  ]
}

Error codes

For a list of error codes, visit the Service error codes.