Queries port forwarding rules.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | DescribeNetworkRules |
The operation that you want to perform. Set the value to DescribeNetworkRules. |
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.
|
PageNumber | Integer | Yes | 1 |
The number of the page to return. For example, to query the returned results on the first page, set the value to 1. |
PageSize | Integer | Yes | 10 |
The number of entries to return on each page. |
RegionId | String | No | cn-hangzhou |
The region ID of the instance. Valid values:
|
ForwardProtocol | String | No | tcp |
The forwarding protocol. Valid values:
|
FrontendPort | Integer | No | 80 |
The forwarding port. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
NetworkRules | Array |
Details about a port forwarding rule. |
|
BackendPort | Integer | 80 |
The port of the origin server. |
FrontendPort | Integer | 80 |
The forwarding port. |
InstanceId | String | ddoscoo-cn-mp91j1ao**** |
The ID of the instance. |
IsAutoCreate | Boolean | true |
Indicates whether the port forwarding rule is automatically created. Valid values:
|
Protocol | String | tcp |
The forwarding protocol. Valid values:
|
RealServers | List | ["112. ***. ***.139"] |
The IP addresses of the origin server. |
RequestId | String | 8597F235-FA5E-4FC7-BAD9-E4C0B01BC771 |
The ID of the request. |
TotalCount | Long | 2 |
The total number of returned port forwarding rules. |
Examples
Sample requests
http(s)://[Endpoint]/? Action=DescribeNetworkRules
&InstanceId=ddoscoo-cn-mp91j1ao****
&PageNumber=1
&PageSize=10
&<Common request parameters>
Sample success responses
XML
format
<DescribeNetworkRulesResponse>
<TotalCount>2</TotalCount>
<NetworkRules>
<IsAutoCreate>true</IsAutoCreate>
<InstanceId>ddoscoo-cn-mp91j1ao****</InstanceId>
<BackendPort>80</BackendPort>
<RealServers>112. ***. ***.139</RealServers>
<FrontendPort>80</FrontendPort>
<Protocol>tcp</Protocol>
</NetworkRules>
<NetworkRules>
<IsAutoCreate>false</IsAutoCreate>
<InstanceId>ddoscoo-cn-mp91j1ao****</InstanceId>
<BackendPort>8080</BackendPort>
<RealServers>1.1.1.1</RealServers>
<RealServers>2.2.2.2</RealServers>
<RealServers>3.3.3.3</RealServers>
<FrontendPort>8080</FrontendPort>
<Protocol>tcp</Protocol>
</NetworkRules>
<RequestId>8597F235-FA5E-4FC7-BAD9-E4C0B01BC771</RequestId>
</DescribeNetworkRulesResponse>
JSON
format
{
"TotalCount": 2,
"NetworkRules": [
{
"IsAutoCreate": true,
"InstanceId": "ddoscoo-cn-mp91j1ao****",
"BackendPort": 80,
"RealServers": [
"112. ***. ***.139"
],
"FrontendPort": 80,
"Protocol": "tcp"
},
{
"IsAutoCreate": false,
"InstanceId": "ddoscoo-cn-mp91j1ao****",
"BackendPort": 8080,
"RealServers": [
"1.1.1.1",
"2.2.2.2",
"3.3.3.3"
],
"FrontendPort": 8080,
"Protocol": "tcp"
}
],
"RequestId": "8597F235-FA5E-4FC7-BAD9-E4C0B01BC771"
}
Error codes
For a list of error codes, visit the API Error Center.