All Products
Search
Document Center

Simple Application Server:ListFirewallRules

Last Updated:Mar 04, 2024

Queries the firewall rules of a simple application server.

Operation description

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

QPS limit

You can call this API operation up to 10 times per minute per account. Requests that exceed this limit are dropped and you may experience service interruptions. We recommend that you take note of this limit when you call this operation. For more information, see QPS limits.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
InstanceIdstringYes

The ID of the simple application server.

ace0706b2ac4454d984295a94213****
RegionIdstringYes

The region ID of the simple application server.

cn-hangzhou
PageSizeintegerNo

The number of entries per page.

Maximum value: 100.

Default value: 10.

10
PageNumberintegerNo

The page number.

Pages start from page 1.

Default value: 1.

1
Tagobject []No

The tags of the firewall rule.

KeystringNo

The key of tag N to be added to the firewall rule. Valid values of N: 1 to 20.

TestKey
ValuestringNo

The value of tag N to be added to the firewall rule. Valid values of N: 1 to 20.

TestValue
FirewallRuleIdstringNo

The ID of the firewall rule.

1a16263ab0f541288312a15fa64280de

Response parameters

ParameterTypeDescriptionExample
object
TotalCountinteger

The total number of entries returned.

4
RequestIdstring

The request ID.

20758A-585D-4A41-A9B2-28DA8F4F534F
PageSizeinteger

The number of entries per page.

10
PageNumberinteger

The page number.

1
FirewallRulesobject []

The array of firewall rules.

Remarkstring

The remarks of the firewall rule.

TEST
Portstring

The port range.

3306
RuleIdstring

The ID of the firewall rule.

eeea34d9867b4d55a4ff8d5fcfbd****
RuleProtocolstring

The transport layer protocol. Valid values:

  • TCP
  • UDP
  • TCP+UDP
TCP
Policystring

The firewall policy. Valid values:

  • accept: Access is allowed.
  • drop: Access is refused.
accept
Tagsobject []

The tags of the firewall rule.

Keystring

The key of tag N to be added to the firewall rule. Valid values of N: 1 to 20.

TestKey
Valuestring

The value of tag N to be added to the firewall rule. Valid values of N: 1 to 20.

TestValue
SourceCidrIpstring

The source CIDR block.

0.0.0.0/0

Examples

Sample success responses

JSONformat

{
  "TotalCount": 4,
  "RequestId": "20758A-585D-4A41-A9B2-28DA8F4F534F",
  "PageSize": 10,
  "PageNumber": 1,
  "FirewallRules": [
    {
      "Remark": "TEST",
      "Port": "3306",
      "RuleId": "eeea34d9867b4d55a4ff8d5fcfbd****",
      "RuleProtocol": "TCP",
      "Policy": "accept",
      "Tags": [
        {
          "Key": "TestKey",
          "Value": "TestValue"
        }
      ],
      "SourceCidrIp": "0.0.0.0/0"
    }
  ]
}

Error codes

HTTP status codeError codeError message
400RegionIdNotMatchHostThe parameter regionId does not match the endpoint host.
403InvalidParamThe specified parameter value is invalid.
404InvalidInstanceId.NotFoundThe specified InstanceId does not exist.
500InternalErrorAn error occurred while processing your request.

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

Change history

Change timeSummary of changesOperation
2024-02-20The Error code has changed. The request parameters of the API has changed. The response structure of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
    delete Error Codes: 403
    delete Error Codes: 404
    delete Error Codes: 500
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: Tag
    Added Input Parameters: FirewallRuleId
Output ParametersThe response structure of the API has changed.
2023-05-25API Description Update. The Error code has changed. The response structure of the API has changedsee changesets
Change itemChange content
API DescriptionAPI Description Update.
Error CodesThe Error code has changed.
    delete Error Codes: 400
    delete Error Codes: 403
    delete Error Codes: 404
    delete Error Codes: 500
Output ParametersThe response structure of the API has changed.