All Products
Search
Document Center

Anti-DDoS:ModifyNetworkRuleAttribute

Last Updated:Oct 23, 2024

Modifies the session persistence and DDoS mitigation policy settings of a port forwarding rule.

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:ModifyNetworkRuleAttributeupdate
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
InstanceIdstringYes

The ID of the instance.

Note You can call the DescribeInstanceIds operation to query the IDs of all instances.
ddoscoo-cn-mp91j1ao****
ForwardProtocolstringYes

The forwarding protocol. Valid values:

  • tcp
  • udp
tcp
FrontendPortintegerYes

The forwarding port.

8080
ConfigstringYes

The detailed settings of the port forwarding rule. This parameter is a JSON string and contains the following fields. The detailed settings of a TCP port forwarding rule contain the following fields.

  • PersistenceTimeout: the timeout period of session persistence. This field is required and of the integer type. Valid values: 30 to 3600. Unit: seconds. Default value: 0, which indicates that session persistence is disabled.
  • Synproxy: specifies whether to enable the false source feature in the DDoS mitigation policy. This field is required and of the string type. Valid values: off and on.
  • NodataConn: specifies whether to enable the empty connection feature in the DDoS mitigation policy. This field is required and of the string type. Valid values: off and on.
  • Sla: the settings of the speed limit for destination feature. This field is required and of the struct type. For more information, see the following description about Sla.
  • Slimit: the settings of the rate limit for source feature. This field is required and of the struct type. For more information, see the following description about Slimit.
  • PayloadLen: the settings of the packet length limit feature. This field is required and of the struct type. For more information, see the following description about PayloadLen.

Sla contains the following fields:

  • Cps: the destination rate limit on new connections in the DDoS mitigation policy. This field is required and of the integer type. Valid values: 100 to 100000.
  • Maxconn: the destination rate limit on concurrent connections in the DDoS mitigation policy. This field is required and of the integer type. Valid values: 1000 to 1000000.
  • CpsEnable: specifies whether to enable Cps. This field is required and of the integer type. Valid values: 0 and 1. Default value: 1. The value 0 indicates that Cps is disabled, and the value 1 indicates that Cps is enabled.
  • MaxconnEnable: specifies whether to enable Maxconn. This field is required and of the integer type. Valid values: 0 and 1. Default value: 1. The value 0 indicates that Maxconn is disabled, and the value 1 indicates that Maxconn is enabled.

Slimit contains the following fields:

  • Cps: the source rate limit on new connections in the DDoS mitigation policy. This field is required and of the integer type. Valid values: 1 to 50000.
  • Maxconn: the source rate limit on concurrent connections in the DDoS mitigation policy. This field is required and of the integer type. Valid values: 1 to 50000.
  • CpsEnable: specifies whether to enable Cps. This field is required and of the integer type. Valid values: 0 and 1. Default value: 1. The value 0 indicates that Cps is disabled, and the value 1 indicates that Cps is enabled.
  • MaxconnEnable: specifies whether to enable Maxconn. This field is required and of the integer type. Valid values: 0 and 1. Default value: 1. The value 0 indicates that Maxconn is disabled, and the value 1 indicates that Maxconn is enabled.
  • CpsMode: specifies whether to enable the source rate limit on new connections. This field is required and of the integer type. Valid values: 1 and 2. The value 1 indicates that the source rate limit is disabled. The value 2 indicates that the system determines whether to enable the source rate limit.

PayloadLen contains the following fields:

  • Min: the minimum packet length in the DDoS mitigation policy. This field is required and of the integer type. Valid values: 0 to 1500.
  • Max: the maximum packet length in the DDoS mitigation policy. This field is required and of the integer type. Valid values: 0 to 1500.
{"PersistenceTimeout":900}

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

0bcf28g5-d57c-11e7-9bs0-d89d6717dxbc

Examples

Sample success responses

JSONformat

{
  "RequestId": "0bcf28g5-d57c-11e7-9bs0-d89d6717dxbc"
}

Error codes

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