DescribeDnsFirewallPolicy

Updated at:

Queries the DNS firewall ACL list.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

yundun-cloudfirewall:DescribeDnsFirewallPolicy

get

*DnsFirewallPolicy

acs:yundun-cloudfirewall::{#accountId}:dnsfirewallpolicy/{#AclUuid}

None None

Request parameters

Parameter

Type

Required

Description

Example

SourceIp

string

No

The source IP address of the requester.

140.205.118.XXX

Lang

string

No

The language of the request and response. Valid values:

  • zh: Chinese

  • en: English

zh

CurrentPage

string

Yes

The page number of the current page for a paging query. Default value: 1.

1

PageSize

string

Yes

The number of entries to return in the current query.

10

Source

string

No

The source address in the access control policy of the DNS border firewall. Fuzzy match is supported.

Note

Source can be a single CIDR block or an address book name.

192.0.XX.XX/24

Destination

string

No

The destination address in the access control policy of the DNS border firewall. Fuzzy match is supported.

Note

Destination can be a single CIDR block, a domain name, or an address book name.

10.2.XX.XX/24

Description

string

No

The description of the DNS border firewall policy.

test

AclAction

string

No

The action that Cloud Firewall performs on the traffic in the access control policy of the DNS border firewall. Valid values:

  • accept: Allow

  • drop: Deny

  • log: Monitor

Note

If you do not specify this parameter, all actions are queried.

accept

Release

string

No

The status of the access control policy. By default, the policy is enabled after it is created. Valid values:

  • true: Enabled

  • false: Disabled

true

AclUuid

string

No

The unique ID of the firewall rule.

b6c8f905-2eb6-442a-ba35-9416e****

IpVersion

string

No

The IP address version. Valid values:

  • 4: IPv4

  • 6: IPv6

Valid values:

  • 4 :

    IPv4

  • 6 :

    IPv6

4

Response elements

Element

Type

Description

Example

object

PageNo

string

The current page number.

1

PageSize

string

The number of entries to return in the current query.

10

RequestId

string

The ID of the request.

0A4ACDE9-9F9F-56C1-B3B7-60971BA1****

TotalCount

string

The total number of returned entries.

10

Policys

array<object>

The information about the access control policy of the DNS firewall.

object

The information about the access control policy of the DNS firewall.

Direction

string

The traffic direction of the access control policy. Valid values:

  • in: inbound traffic

  • out: outbound traffic

in

DestinationGroupType

string

The type of the destination address book in the access control policy. Valid values:

  • ip: IP address book, which contains one or more CIDR blocks

  • domain: domain name address book, which contains one or more domain names

ip

HitLastTime

integer

The latest hit UNIX timestamp. The value is a UNIX timestamp in seconds.

1579261141

Destination

string

The destination address in the access control policy of the DNS border firewall. Valid values:

  • If DestinationType is set to net, the value of Destination is the destination CIDR block.

  • If DestinationType is set to domain, the value of Destination is the destination domain name.

  • If DestinationType is set to group, the value of Destination is the name of the destination address book.

x.x.x.x/32

SourceType

string

The type of the source address in the access control policy of the DNS border firewall. Valid values:

  • net: source CIDR block

  • group: source address book

net

AclUuid

string

The unique ID of the access control policy.

01281255-d220-4db1-8f4f-c4df221a****

Priority

integer

The priority of the access control policy. A smaller value indicates a higher priority.

110

Source

string

The source address in the access control policy. Valid values:

  • If SourceType is set to net, the source address is a CIDR block. Example: 192.0.XX.XX/24.

  • If SourceType is set to group, the source address is the name of the source address book. Example: db_group.

  • If SourceType is set to location, the source address is an area. For more information about the specific area positional encoding, see AddControlPolicy. Example: ["BJ11", "ZB"].

192.0.XX.XX/24

DestinationType

string

The type of the destination address in the access control policy. Valid values:

  • net: destination CIDR block

  • group: destination address book

  • domain: destination domain name

  • location: destination region

net

HitTimes

integer

The number of hits for the access control policy.

100

IpVersion

integer

The IP address version. Valid values:

  • 4: IPv4

  • 6: IPv6

6

Description

string

The description of the access control policy of the DNS border firewall.

test

SourceGroupType

string

The type of the source address book in the access control policy. Valid values:

  • ip: IP address book, which contains one or more CIDR blocks.

  • tag: ECS tag-based address book, which contains the IP addresses of one or more ECS tags.

  • domain: domain name address book, which contains one or more domain names.

  • threat: threat intelligence address book, which contains one or more malicious IP addresses or domain names.

  • backsrc: back-to-origin address book, which contains the back-to-origin IP addresses of one or more Anti-DDoS or WAF instances.

ip

AclAction

string

The action that Cloud Firewall performs on the traffic in the access control policy. Valid values:

  • accept: Allow

  • drop: Deny

  • log: Monitor

accept

Release

string

The status of the access control policy. By default, the policy is enabled after it is created. Valid values:

  • true: Enabled

  • false: Disabled

true

DestinationAddrs

array

The list of addresses in the destination address book.

string

The list of addresses in the destination address book.

192.0.XX.XX/24

SourceAddrs

array

The source addresses.

string

The source addresses.

10.2.XX.XX/24

Examples

Success response

JSON format

{
  "PageNo": "1",
  "PageSize": "10",
  "RequestId": "0A4ACDE9-9F9F-56C1-B3B7-60971BA1****",
  "TotalCount": "10",
  "Policys": [
    {
      "Direction": "in",
      "DestinationGroupType": "ip",
      "HitLastTime": 1579261141,
      "Destination": "x.x.x.x/32",
      "SourceType": "net",
      "AclUuid": "01281255-d220-4db1-8f4f-c4df221a****",
      "Priority": 110,
      "Source": "192.0.XX.XX/24",
      "DestinationType": "net",
      "HitTimes": 100,
      "IpVersion": 6,
      "Description": "test",
      "SourceGroupType": "ip",
      "AclAction": "accept",
      "Release": "true",
      "DestinationAddrs": [
        "192.0.XX.XX/24\n"
      ],
      "SourceAddrs": [
        "10.2.XX.XX/24\n"
      ]
    }
  ]
}

Error codes

HTTP status code

Error code

Error message

Description

400 ErrorParametersUid The aliUid parameter is invalid. The aliUid parameter is invalid.
400 ErrorDBSelect An error occurred while querying database. An error occurred while querying database.
400 ErrorParameterIpVersion The IP version is invalid. The IP version is invalid.
400 ErrorParametersSource The source is invalid. The source is invalid.
400 ErrorParametersAction The action is invalid. The action is invalid.
400 ErrorParametersNewOrder The newOrder is invalid. The newOrder is invalid.
400 ErrorParametersPageSizeOrNo Either pageSize or pageNo is invalid. Either pageSize or pageNo is invalid.
400 ErrorMarshalJSON An error occurred while encoding JSON. An error occurred while encoding JSON.
400 ErrorParametersDestination The Destination parameter is invalid. The Destination parameter is invalid.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.