Basic Network(UNet)

Obtain Firewall Information - DescribeFirewall


Obtain Firewall Group Information

💡 Use Case One: Obtain information about a specific firewall. Use Case Two: Obtain information about the firewall bound to a specific resource. Use Case Three: Obtain information about all firewalls under a project.


Public Parameters

Parameter NameTypeDescription InformationRequired
ActionstringCorresponding API command name, the current API is DescribeFirewall.Yes
PublicKeystringThe user's public key can be obtained from Console (opens in a new tab)Yes
SignaturestringUser signature generated based on public key and API command, see Signature AlgorithmYes

Request Parameters

Parameter NameTypeDescription InformationRequired
ProjectIdstringProject ID. If not filled in, the default project is used, sub-accounts must be filled in.No
FWIdstringFirewall ID, default is to return all firewallsNo
ResourceTypestringResource type bound to the firewall, only needed when retrieving firewall information corresponding to the resource. Enumeration values are: "unatgw", NAT Gateway; "uhost", UHost; "upm", Physical Cloud Host; "hadoophost", Hadoop Node; "fortresshost", Bastion Host; "udhost", UDSet Host; "udockhost", Container; "dbaudit", Database Audit; "uni", Virtual Network Interface; "cube", Cube Container Instance; "ulb", ULB Instance.No
ResourceIdstringResource ID of the bound firewall group.No
LimitintReturn data length, default is 20, maximum is 10000000No
OffsetintList start position offset, default is 0No

Response Field

Field NameTypeDescription InformationRequired
RetCodeintReturn status code. If it is 0, it means successful return. If it is not 0, it means failure.Yes
ActionstringOperation command name.Yes
MessagestringReturns an error message, providing detailed description when RetCode is non-zero.No
DataSetarray[FirewallDataSet]Obtained detailed information of the firewall group, see FirewallDataSetNo
TotalCountintNumber of Firewall ResourcesNo

Data Model


Field NameTypeDescription InformationRequired
FWIdstringFirewall IDYes
GroupIdstringSecurity Group ID (To be deprecated soon)Yes
NamestringFirewall NameNo
TagstringFirewall Business GroupNo
RemarkstringFirewall RemarksNo
ResourceCountintNumber of Resources Bound to FirewallNo
CreateTimeintFirewall group creation time, in Unix Timestamp formatNo
TypestringFirewall group type, enumeration values are: "user defined", user-defined firewall; "recommend web", default Web firewall; "recommend non web", default non-Web firewall.No
Rulearray[FirewallRuleSet]The list of rules in the firewall group, see FirewallRuleSet.No


Field NameTypeDescription InformationRequired
SrcIPstringSource AddressNo
ProtocolTypestringProtocol TypeNo
DstPortstringTarget PortNo
RuleActionstringFirewall ActionNo
RemarkstringFirewall Rule RemarksNo


Request Example

Response Example

  "Action": "DescribeFirewallResponse",
  "DataSet": [
      "CreateTime": 1508472648,
      "FWId": "firewall-XXXX",
      "GroupId": "25575",
      "Name": "non web service recommendation:tcp 22,3389",
      "Remark": "open tcp port:22,3389 and icmp",
      "ResourceCount": 0,
      "Rule": [
          "DstPort": "22",
          "Priority": "HIGH",
          "ProtocolType": "TCP",
          "RuleAction": "ACCEPT",
          "SrcIP": ""
          "DstPort": "3389",
          "Priority": "HIGH",
          "ProtocolType": "TCP",
          "RuleAction": "ACCEPT",
          "SrcIP": ""
          "DstPort": "",
          "Priority": "HIGH",
          "ProtocolType": "ICMP",
          "RuleAction": "ACCEPT",
          "SrcIP": ""
      "Tag": "Default",
      "Type": "recommend non web"
  "RetCode": 0,
  "TotalCount": 4
  • Company
  • ContactUs
  • Blog
Copyright © 2024 SurferCloud All Rights Reserved
  • Contact our sales to help your business.
  • Contact our sales to help your business.