Modifies the session persistence settings of a port forwarding rule.

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 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: 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 0bcf28g5-d57c-11e7-9bs0-d89d6717dxbc

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/?Action=ModifyNetworkRuleAttribute
&Config={"PersistenceTimeout":900}
&ForwardProtocol=tcp
&FrontendPort=8080
&InstanceId=ddoscoo-cn-mp91j1ao****
&<Common request parameters>

Sample success responses

XML format

<ModifyNetworkRuleAttributeResponse>
      <RequestId>0bcf28g5-d57c-11e7-9bs0-d89d6717dxbc</RequestId>
</ModifyNetworkRuleAttributeResponse>

JSON format

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

Error codes

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