You can call this operation to query the configuration information of a specified domain.

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 Boolean No DescribeDomain

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

Domain String No www.example.com

The domain name that has been added to WAF.

InstanceId String No waf_elasticity-cn-0xldbqtm005

The ID of the WAF instance.

Note You can call the DescribeInstanceInfo operation to query the ID of the WAF instance.

Response parameters

Parameter Type Example Description
RequestId String D7861F61-5B61-46CE-A47C-6B19160D5EB0

The ID of the request.

Domain Struct

The configuration information of the specified domain.

SourceIps String ["1.1.1.1", "2.2.2.2"]

The IP address or domain of the origin server to which the specified domain points.

HttpToUserIp Integer  0

Indicates whether the HTTP back-to-origin feature is enabled. If this feature is enabled, the WAF instance can use HTTP to forward HTTPS requests to the origin server. By default, port 80 is used to forward the requests to the origin server. Valid values:

  • 0: disabled (default)
  • 1: yes
HttpsRedirect Integer  0

Indicates whether the WAF instance redirects HTTP requests as HTTPS requests. Valid values:

  • 0: no (default)
  • 1: yes
Http2Port String [443]

The HTTP 2.0 port.

HttpPort String [80]

The HTTP port.

Note If a value is specified for this parameter, the HTTP protocol is enabled.
LoadBalancing Integer  0

The load balancing algorithm that is used when WAF forwards the requests to the origin. Valid values:

  • 0: IP hash
  • 1: Round robin
Cname String xxxxxx.yundunwaf3.com

The CNAME record assigned by the WAF instance to the specified domain.

IsAccessProduct Integer  0

Indicates whether a layer-7 proxy, such as Anti-DDoS Pro or CDN, has been configured for the specified domain to filter the incoming traffic before forwarding the traffic to WAF. Valid values:

  • 0: no
  • 1: true
HttpsPort String [443]

The HTTPS port.

Note If a value is specified for this parameter, the HTTPS protocol is enabled.
Version Long 0

The system data identifier that is used to control optimistic locking.

LogHeaders String [{"k":"wafmark","v":"test"}]

The key-value pair that is used to mark the traffic that flows through WAF to the domain.

Set the parameter in this format: [{"k":"_key_","v":"_value_"}]. Set _key_ to a custom request header field. Set _value_ to a field value.

Note If a request header contains the specified field, WAF overwrites the original field value with the specified value.
ClusterType Integer  0

The type of the WAF cluster. Valid values:

  • 0: shared cluster (default)
  • 1: exclusive cluster
ConnectionTime Integer 5

The connection timeout for WAF exclusive clusters. Unit: seconds.

ReadTime Integer 120

The read timeout of a WAF exclusive cluster. Unit: seconds.

WriteTime Integer 120

The timeout period for a WAF exclusive cluster write connection. Unit: seconds.

Samples

Sample request

http(s)://[Endpoint]/? Action=DescribeDomain
&Domain=www.example.com
&InstanceId=waf_elasticity-cn-0xldbqtm005
&<Common request parameters>

Sample success responses

XML format

<Domain>
    <HttpPort>80</HttpPort>
    <HttpToUserIp>0</HttpToUserIp>
    <WriteTime>120</WriteTime>
    <IsAccessProduct>0</IsAccessProduct>
    <Http2Port>443</Http2Port>
    <Version>0</Version>
    <HttpsRedirect>0</HttpsRedirect>
    <SourceIps>1.1.1.1</SourceIps>
    <SourceIps>2.2.2.2</SourceIps>
    <ConnectionTime>5</ConnectionTime>
    <Cname>xxxxxx.yundunwaf3.com</Cname>
    <LoadBalancing>0</LoadBalancing>
    <HttpsPort>443</HttpsPort>
    <ReadTime>120</ReadTime>
</Domain>
<RequestId>D7861F61-5B61-46CE-A47C-6B19160D5EB0</RequestId>

JSON format

{
    "Domain":{
        "HttpPort":[80],
        "HttpToUserIp":0,
        "WriteTime":120,
        "IsAccessProduct":0,
        "Http2Port":[443],
        "Version":0,
        "HttpsRedirect":0,
        "SourceIps":["1.1.1.1","2.2.2.2"],
        "ConnectionTime":5,
        "Cname":"xxxxxx.yundunwaf3.com",
        "LoadBalancing":0,
        "HttpsPort":[443],
        "ReadTime":120
    },
    "RequestId":"D7861F61-5B61-46CE-A47C-6B19160D5EB0"
}

Error codes.

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