All Products
Search
Document Center

Alibaba Cloud DNS:DescribeResolverRules

Last Updated:Dec 02, 2025

Retrieves a list of forwarding rules.

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

pvtz:DescribeResolverRules

list

*Rule

acs:pvtz::{#accountId}:rule/*

None

None

Request parameters

Parameter

Type

Required

Description

Example

Keyword

string

No

The keyword for the name of the forwarding rule. The search is case-insensitive and supports fuzzy match.

test

Lang

string

No

The language of the response. Valid values:

  • zh: Chinese.

  • en: English.

Default value: en.

en

PageNumber

integer

No

The number of the page to return. The start value is 1. Default value: 1.

1

PageSize

integer

No

The number of entries to return on each page. The maximum value is 100. Default value: 20.

20

NeedDetailAttributes

boolean

No

Specifies whether to return the list of virtual private clouds (VPCs) that are associated with the forwarding rule. Valid values:

  • true: returns the list.

  • false: does not return the list.

Default value: false.

true

EndpointId

string

No

The ID of the outbound endpoint.

hr****

Response elements

Element

Type

Description

Example

object

PageSize

integer

The number of entries returned on each page.

10

RequestId

string

The unique request ID.

A10E03D7-808C-422D-9144-F8586C2E2297

PageNumber

integer

The page number of the returned page.

1

TotalPages

integer

The total number of pages.

1

TotalItems

integer

The total number of entries.

1

Rules

array<object>

The list of forwarding rules.

object

The information about the forwarding rule.

Type

string

The type of the forwarding rule. Currently, only forwarding to an external IP address is supported. Valid value:

OUTBOUND: Forwards DNS requests to an external IP address.

OUTBOUND

UpdateTime

string

The time when the rule was last updated.

2020-07-13 10:51:44

ForwardIps

array<object>

The IP addresses and ports of the destination servers in an external DNS system. DNS query traffic is forwarded to these servers.

object

The IP address and port of the destination server.

Ip

string

The destination IP address.

172.16.XX.XX

Port

integer

The port of the destination IP address.

80

EndpointName

string

The name of the endpoint.

Endpoint-test

CreateTime

string

The time when the rule was created.

2020-07-13 10:51:44

ZoneName

string

The domain name (zone) for which DNS requests are forwarded.

example.com

UpdateTimestamp

integer

The UNIX timestamp when the rule was last updated.

1594608704000

BindVpcs

array<object>

The list of associated VPCs.

object

The VPC information.

VpcName

string

The name of the VPC.

vpc-name-test

VpcId

string

The unique ID of the VPC.

vpc-0jl96awrjt75ezglc****

VpcType

string

The type of the VPC. Valid values:

  • STANDARD: a standard VPC.

  • EDS: an Elastic Desktop Service (EDS) workspace VPC.

STANDARD

RegionName

string

The name of the region where the VPC resides.

China (Ulanqab)

RegionId

string

The ID of the region where the VPC resides.

cn-wulanchabu

VpcUserId

string

The user ID (UID) of the account to which the VPC belongs.

141339776561****

EndpointId

string

The ID of the endpoint.

hr****

Name

string

The name of the forwarding rule.

forwarding-rule-test

Id

string

The ID of the forwarding rule.

hr****

CreateTimestamp

integer

The UNIX timestamp when the rule was created.

1594608704000

BindEdgeDnsClusters

array<object>

object

ClusterId

string

ClusterName

string

ClusterUserId

integer

Examples

Success response

JSON format

{
  "PageSize": 10,
  "RequestId": "A10E03D7-808C-422D-9144-F8586C2E2297",
  "PageNumber": 1,
  "TotalPages": 1,
  "TotalItems": 1,
  "Rules": [
    {
      "Type": "OUTBOUND",
      "UpdateTime": "2020-07-13 10:51:44",
      "ForwardIps": [
        {
          "Ip": "172.16.XX.XX",
          "Port": 80
        }
      ],
      "EndpointName": "终端节点-test",
      "CreateTime": "2020-07-13 10:51:44",
      "ZoneName": "example.com",
      "UpdateTimestamp": 1594608704000,
      "BindVpcs": [
        {
          "VpcName": "vpc-name-test",
          "VpcId": "vpc-0jl96awrjt75ezglc****",
          "VpcType": "STANDARD",
          "RegionName": "China (Ulanqab)",
          "RegionId": "cn-wulanchabu",
          "VpcUserId": "141339776561****"
        }
      ],
      "EndpointId": "hr****",
      "Name": "转发规则-test",
      "Id": "hr****",
      "CreateTimestamp": 1594608704000,
      "BindEdgeDnsClusters": [
        {
          "ClusterId": "",
          "ClusterName": "",
          "ClusterUserId": 0
        }
      ]
    }
  ]
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.