Modifies the session persistence settings of a port forwarding rule.


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 ModifyNetworkRuleAttribute

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

Config String Yes {"PersistenceTimeout":900}

The session persistence settings of the port forwarding rule. This parameter is a JSON string. The field in the value is described as follows:

  • PersistenceTimeout: The timeout period of session persistence. This field is required and must be of the INTEGER type. Valid values: 30 to 3600. Unit: seconds. Default value: 0, which indicates that session persistence is disabled.
ForwardProtocol String Yes tcp

The forwarding protocol. Valid values:

  • tcp
  • udp
FrontendPort Integer Yes 8080

The forwarding port.

InstanceId String Yes ddoscoo-cn-mp91j1ao****

The ID of the instance.

Note You can call the DescribeInstanceIds operation to query the IDs of all instances.
RegionId String No cn-hangzhou

The region ID of the instance. Valid values:

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

Response parameters

Parameter Type Example Description
RequestId String 0bcf28g5-d57c-11e7-9bs0-d89d6717dxbc

The ID of the request.


Sample requests

&<Common request parameters>

Sample success responses

XML format


JSON format

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

Error codes

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