Queries the forwarding rules of a website.

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 DescribeWebRules

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

PageSize Integer Yes 10

The number of entries to return on each page. Maximum value: 10.

RegionId String No cn-hangzhou

The region ID of the instance. Valid values:

  • cn-hangzhou: mainland China, which indicates an Anti-DDoS Pro instance
  • ap-southeast-1: outside mainland China, which indicates an Anti-DDoS Premium instance
ResourceGroupId String No default

The ID of the resource group to which the instance belongs in Resource Management. This parameter is empty by default, which indicates that the instance belongs to the default resource group.

Domain String No www.aliyun.com

The domain name of the website.

Note A forwarding rule must be configured for the domain name. You can call the DescribeDomains operation to query all domain names.
QueryDomainPattern String No fuzzy

The matching mode. Valid values:

  • fuzzy: fuzzy match, which is selected by default
  • exact: exact match
PageNumber Integer No 1

The number of the page to return. For example, to query the returned results on the first page, set the value to 1.

InstanceIds.N RepeatList No ddoscoo-cn-mp91j1ao****

The ID of instance N.

Note You can call the DescribeInstanceIds operation to query the IDs of all instances.

Response parameters

Parameter Type Example Description
RequestId String 89E69DD6-C5DD-4636-9AD6-CCF6BEAB59AC

The ID of the request.

TotalCount Long 1

The total number of returned forwarding rules.

WebRules Array

Details about a forwarding rule.

BlackList List [1. ***. ***.1]

The IP addresses in the blacklist for a domain name.

CcEnabled Boolean true

Indicates whether the Frequency Control policy is enabled. Valid values:

  • true
  • false
CcRuleEnabled Boolean false

Indicates whether the Custom Rule switch of the Frequency Control policy is turned on. Valid values:

  • true
  • false
CcTemplate String default

The mode of the Frequency Control policy. Valid values:

  • default: Normal
  • gf_under_attack: Emergency
  • gf_sos_verify: Strict
  • gf_sos_enhance: Super Strict
CertName String testcert

The name of the SSL certificate.

Cname String 64687s1jf898****.aliyunddos0001.com

The CNAME record of the forwarding rule.

Domain String www.aliyun.com

The domain name of the website.

Http2Enable Boolean true

Indicates whether HTTP/2 is enabled. Valid values:

  • true
  • false
ProxyTypes Array

Details about the protocol.

ProxyPorts List 80

The port of the origin server.

ProxyType String http

The type of the protocol. Valid values:

  • http
  • https
  • websocket
  • websockets
RealServers Array

Details about the address of the origin server.

RealServer String 1.***. ***.1

The address of the origin server.

RsType Integer 0

The address type of the origin server. Valid values:

  • 0: IP address
  • 1: domain name
SslCiphers String default

The type of the cipher suite. Valid values:

  • default: default cipher suites, which only include strong cipher suites
  • all: all cipher suites, which include strong and weak cipher suites
  • strong: strong cipher suites
SslProtocols String tls1.0

The version of the TLS protocol. Valid values:

  • tls1.0: TLS 1.0 or later
  • tls1.1: TLS 1.1 or later
  • tls1.2: TLS 1.2 or later
WhiteList List [1. ***. ***.1]

The IP addresses in the whitelist for a domain name.

Examples

Sample requests

http(s)://[Endpoint]/? Action=DescribeWebRules
&PageSize=10
&<Common request parameters>

Sample success responses

XML format

<DescribeWebRulesResponse>
      <TotalCount>1</TotalCount>
      <WebRules>
            <CcEnabled>true</CcEnabled>
            <SslProtocols>tls1.0</SslProtocols>
            <ProxyTypes>
                  <ProxyPorts>443</ProxyPorts>
                  <ProxyType>https</ProxyType>
            </ProxyTypes>
            <ProxyTypes>
                  <ProxyPorts>80</ProxyPorts>
                  <ProxyType>http</ProxyType>
            </ProxyTypes>
            <RealServers>
                  <RealServer>1. ***. ***.1</RealServer>
                  <RsType>0</RsType>
            </RealServers>
            <CcRuleEnabled>false</CcRuleEnabled>
            <SslCiphers>default</SslCiphers>
            <CertName></CertName>
            <Domain>www.aliyun.com</Domain>
            <Http2Enable>false</Http2Enable>
            <Cname>64687s1jf898****.aliyunddos0001.com</Cname>
            <CcTemplate>default</CcTemplate>
      </WebRules>
      <RequestId>89E69DD6-C5DD-4636-9AD6-CCF6BEAB59AC</RequestId>
</DescribeWebRulesResponse>

JSON format

{
    "TotalCount": 1,
    "WebRules": [
        {
            "CcEnabled": true,
            "SslProtocols": "tls1.0",
            "ProxyTypes": [
                {
                    "ProxyPorts": [
                        443
                    ],
                    "ProxyType": "https"
                },
                {
                    "ProxyPorts": [
                        80
                    ],
                    "ProxyType": "http"
                }
            ],
            "RealServers": [
                {
                    "RealServer": "1. ***. ***.1",
                    "RsType": 0
                }
            ],
            "CcRuleEnabled": false,
            "SslCiphers": "default",
            "CertName": "",
            "Domain": "www.aliyun.com",
            "Http2Enable": false,
            "Cname": "64687s1jf898****.aliyunddos0001.com",
            "CcTemplate": "default"
        }
    ],
    "RequestId": "89E69DD6-C5DD-4636-9AD6-CCF6BEAB59AC"
}

Error codes

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