Queries the configuration of a specific domain name.

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 DescribeDomain

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

Domain String Yes www.example.com

The domain name that is added to WAF.

InstanceId String Yes waf_elasticity-cn-0xldbqt****

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
Domain Struct

The configuration of the domain name.

ClusterType Integer 0

The type of the cluster to which the WAF instance belongs. Valid values:

  • 0: shared cluster. This is the default value.
  • 1: exclusive cluster.
Cname String xxxxxx.yundunwaf3.com

The CNAME that is assigned by the WAF instance to the domain name.

ConnectionTime Integer 5

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

Http2Port List [443]

The HTTP/2 port.

HttpPort List [80]

The HTTP port.

HttpToUserIp Integer 0

Indicates whether the HTTP back-to-origin feature is enabled. If this feature is enabled, the WAF instance uses HTTP to forward HTTPS requests to origin servers. By default, the requests are forwarded over port 80. Valid values:

  • 0: disabled. This is the default value.
  • 1: enabled.
HttpsPort List [443]

The HTTPS port.

HttpsRedirect Integer 0

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

  • 0: disabled. This is the default value.
  • 1: enabled.
IsAccessProduct Integer 0

Indicates whether a Layer 7 proxy is configured, which is used to filter inbound traffic before the traffic is sent to the WAF instance. The supported Layer 7 proxies include Anti-DDoS Pro, Anti-DDoS Premium, and CDN. Valid values:

  • 0: No Layer 7 proxies are configured.
  • 1: A Layer 7 proxy is configured.
LoadBalancing Integer 0

The load balancing algorithm that is used to forward requests to origin servers. Valid values:

  • 0: IP hash
  • 1: round-robin
LogHeaders Array

The field that is used to mark the requests that are forwarded by the WAF instance. The field is a key-value pair.

k String wafmark

The key of the field.

v String test

The value of the field.

ReadTime Integer 120

The read timeout period for the WAF exclusive cluster.

ResourceGroupId String rg-atstuj3rtop****

The ID of the resource group.

SourceIps List [1.1.1.1,2.2.2.2]

The IP addresses of origin servers.

Version Long 0

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

WriteTime Integer 120

The write timeout period for the WAF exclusive cluster.

RequestId String D7861F61-5B61-46CE-A47C-6B19160D5EB0

The ID of the request.

Examples

Sample requests

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

Sample success responses

XML format

<DescribeDomainResponse>
	  <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>
		    <LogHeaders>
			      <k>wafmark</k>
			      <v>test</v>
		    </LogHeaders>
		    <ResourceGroupId>rg-atstuj3rtop****</ResourceGroupId>
		    <ReadTime>120</ReadTime>
	  </Domain>
	  <RequestId>D7861F61-5B61-46CE-A47C-6B19160D5EB0</RequestId>
</DescribeDomainResponse>

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
        ],
        "LogHeaders": {
            "k": "wafmark",
            "v": "test"
        },
        "ResourceGroupId": "rg-atstuj3rtop****",
        "ReadTime": 120
    },
    "RequestId": "D7861F61-5B61-46CE-A47C-6B19160D5EB0"
}

Error codes

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