Queries forwarding rules.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes DescribeResolverRules

The operation that you want to perform. Set the value to DescribeResolverRules.

Keyword String No test

The keyword used to filter forwarding rules in %keyword% mode.

Lang String No en

The language.

PageNumber Integer No 1

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

PageSize Integer No 20

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

NeedDetailAttributes Boolean No true

Specifies whether to return additional information. Default value: false.

  • If you set this parameter to true, additional information, such as the list of virtual private clouds (VPCs) that are associated with the queried forwarding rules, is returned.
  • If you set this parameter to false, no additional information is returned.
EndpointId String No hra2**

The ID of the outbound endpoint.

Response parameters

Parameter Type Example Description
PageSize Integer 10

The number of entries returned per page.

RequestId String A10E03D7-808C-422D-9144-F8586C2E2297

The ID of the request.

PageNumber Integer 1

The page number of the returned page.

TotalPages Integer 1

The total number of pages.

TotalItems Integer 1

The total number of entries.

Rules Array of Rule

The information about each forwarding rule returned.

Type String OUTBOUND

The type of the forwarding rule. Valid value:

  • OUTBOUND: forwards Domain Name System (DNS) traffic to one or more external IP addresses.
UpdateTime String 2020-07-13 10:51:44

The time when the forwarding rule was last modified.

ForwardIps Array of ForwardIp

The information about each destination external server.

Ip String 172.16.xx.xx

The IP address.

Port Integer 8080

The port number.

EndpointName String Endpoint-test

The name of the endpoint.

CreateTime String 2020-07-13 10:51:44

The time when the forwarding rule was created.

ZoneName String example.com

The domain name that requires DNS traffic forwarding.

UpdateTimestamp Long 1594608704000

The timestamp when the forwarding rule was last modified. The timestamp follows the UNIX time format. It is the number of seconds that have elapsed since 00:00:00 Thursday, January 1, 1970.

BindVpcs Array of Vpc

The information about each associated VPC.

VpcName String vpc-name-test

The name of the VPC.

VpcId String vpc-8vbl8mpum-vpc-id

The ID of the VPC.

RegionName String Hangzhou-test

The name of the region.

RegionId String cn-hangzhou

The ID of the region.

EndpointId String hra0**

The ID of the endpoint.

Name String Forwarding rule-test

The name of the forwarding rule.

Id String hra1**

The ID of the forwarding rule.

CreateTimestamp Long 1594608704000

The timestamp when the forwarding rule was created. The timestamp follows the UNIX time format. It is the number of seconds that have elapsed since 00:00:00 Thursday, January 1, 1970.

Examples

Sample request

http(s)://pvtz.aliyuncs.com/?Action=DescribeResolverRules
&Keyword=test
&Lang=en
&PageNumber=1
&PageSize=20
&NeedDetailAttributes=true
&EndpointId=hra2**
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<DescribeResolverRulesResponse>
    <PageSize>10</PageSize>
    <RequestId>A10E03D7-808C-422D-9144-F8586C2E2297</RequestId>
    <PageNumber>1</PageNumber>
    <TotalPages>1</TotalPages>
    <TotalItems>1</TotalItems>
    <Rules>
        <Type>OUTBOUND</Type>
        <UpdateTime>2020-07-13 10:51:44</UpdateTime>
        <ForwardIps>
            <Ip>172.16.xx.xx</Ip>
            <Port>8080</Port>
        </ForwardIps>
        <EndpointName>Endpoint-test</EndpointName>
        <CreateTime>2020-07-13 10:51:44</CreateTime>
        <ZoneName>example.com</ZoneName>
        <UpdateTimestamp>1594608704000</UpdateTimestamp>
        <BindVpcs>
            <VpcName>vpc-name-test</VpcName>
            <VpcId>vpc-8vbl8mpum-vpc-id</VpcId>
            <RegionName>Hangzhou-test</RegionName>
            <RegionId>cn-hangzhou</RegionId>
        </BindVpcs>
        <EndpointId>hra0**</EndpointId>
        <Name>Forwarding rule-test</Name>
        <Id>hra1**</Id>
        <CreateTimestamp>1594608704000</CreateTimestamp>
    </Rules>
</DescribeResolverRulesResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "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" : 8080
    } ],
    "EndpointName" : "Endpoint-test",
    "CreateTime" : "2020-07-13 10:51:44",
    "ZoneName" : "example.com",
    "UpdateTimestamp" : 1594608704000,
    "BindVpcs" : [ {
      "VpcName" : "vpc-name-test",
      "VpcId" : "vpc-8vbl8mpum-vpc-id",
      "RegionName" : "Hangzhou-test",
      "RegionId" : "cn-hangzhou"
    } ],
    "EndpointId" : "hra0**",
    "Name" : "Forwarding rule-test",
    "Id" : "hra1**",
    "CreateTimestamp" : 1594608704000
  } ]
}

Error codes

For a list of error codes, visit the API Error Center.