Queries the firewall rules of a simple application server.


You can call the ListFirewallRules operation to query the firewall rule details of a specified simple application server, including the port range, firewall rule ID, and transport layer protocol.

QPS limits

The queries per second (QPS) limit for a single user for the API operation is 10 calls per minute. If the number of calls to the API operation per minute exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. For more information, see QPS limit.

Request parameters

Parameter Type Required Example Description
InstanceId String Yes ace0706b2ac4454d984295a94213****

The ID of the simple application server.

RegionId String Yes cn-hangzhou

The region ID of the simple application server.

PageSize Integer No 10

The number of entries to return on each page.

Maximum value: 100.

Default value: 10.

PageNumber Integer No 1

The number of the page to return.

Pages start from page 1.

Default value: 1.

Action String Yes ListFirewallRules

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

Response parameters

Parameter Type Example Description
TotalCount Integer 4

The total number of firewall rules.

RequestId String 20758A-585D-4A41-A9B2-28DA8F4F534F

The ID of the request.

PageSize Integer 10

The number of entries returned per page.

PageNumber Integer 1

The page number of the returned page.

FirewallRules Array of FirewallRule

Details about the firewall rules.

Remark String The default port of the test-MySQL server

The remarks of the firewall rule.

Port String 3306

The port range.

RuleId String eeea34d9867b4d55a4ff8d5fcfbd****

The ID of the firewall rule.

RuleProtocol String TCP

The transport layer protocol. Valid values:

  • TCP
  • UDP


Sample requests

&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK

        <Remark>The default port of the test-MySQL server</Remark>

JSON format

HTTP/1.1 200 OK

  "TotalCount" : 4,
  "RequestId" : "20758A-585D-4A41-A9B2-28DA8F4F534F",
  "PageSize" : 10,
  "PageNumber" : 1,
  "FirewallRules" : [ {
    "RuleId" : "d7e1b0a8e93a4f6db07528c4f4f7****",
    "Port" : "80",
    "RuleProtocol" : "TCP"
  }, {
    "RuleId" : "8e351c1efcbe4265918ea0098061****",
    "Port" : "443",
    "RuleProtocol" : "TCP"
  }, {
    "RuleId" : "fe2459c7060b4adc90bd996bad9a****",
    "Port" : "22",
    "RuleProtocol" : "TCP"
  }, {
    "RuleId" : "eeea34d9867b4d55a4ff8d5fcfbd****",
    "Port" : "3306",
    "RuleProtocol" : "TCP",
    "Remark" : "The default port of the test-MySQL server"
  } ]

Error codes

HTTP status code Error code Error message Description
400 RegionIdNotMatchHost The parameter regionId does not match the endpoint host. The error message returned because the specified RegionId parameter does not match the service address that you selected.
403 InvalidParam The specified parameter value is invalid. The error message returned because a specified parameter is invalid.
404 InvalidInstanceId.NotFound The specified InstanceId does not exist. The error message returned because the specified InstanceId parameter is invalid.
500 InternalError An error occurred while processing your request. The error message returned because an internal error has occurred. Try again later. If the problem persists, submit a ticket.

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