All Products
Search
Document Center

Simple Application Server:ListFirewallRules

Last Updated:Nov 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.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
swas-open:ListFirewallRulesget
  • FirewallRule
    acs:swas-open:{#regionId}:{#accountId}:firewallrule/*
    none
none

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
Tagarray<object>No

The tags of the firewall rule.

objectNo

The tag of the firewall rule.

KeystringNo

The tag key. A tag key must be 1 to 64 characters in length. You can add up to 20 tags.

TestKey
ValuestringNo

The tag value. A tag value must be 1 to 64 characters in length. You can add up to 20 tags.

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
FirewallRulesarray<object>

Details of the firewall rules.

FirewallRuleobject
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
Tagsarray<object>

The tags of the firewall rule.

tagobject

The tag of the firewall rule.

Keystring

The tag key.

TestKey
Valuestring

The tag value.

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 changedView Change Details
2023-05-25API Description Update. The Error code has changed. The response structure of the API has changedView Change Details