tencent cloud

Feedback

DescribeDomains

Last updated: 2024-11-27 09:47:16

1. API Description

Domain name for API request: waf.intl.tencentcloudapi.com.

Query detailed information of all user domains

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common Params. The value used for this API: DescribeDomains.
Version Yes String Common Params. The value used for this API: 2018-01-25.
Region Yes String Common Params. For more information, please see the list of regions supported by the product. This API only supports: ap-guangzhou, ap-seoul.
Offset Yes Integer Paging offset, a multiple of limit. The minimum value is 0, and the maximum value is Total/Limit rounded up.
Limit Yes Integer Number of returned domains
Filters.N No Array of FiltersItemNew Filter array. The filter fields are as follows. Edition: instance version, which can be set to sparta-waf or clb-waf; Domain: domain name; DomainId: domain name ID; InstanceName: instance name; InstanceId: instance ID; FlowMode: traffic access mode, which supports only CLB WAF; FlowCheckMode: traffic inspection mode, which supports only CLB WAF; ClsStatus: log switch; Status: WAF switch; BotStatus: BOT switch; ApiStatus: API security switch; Engine: engine mode; UpstreamIP: origin server IP address, which supports only SaaS WAF; UpstreamDomain: origin server domain name, which supports only SaaS WAF; DomainState: domain name status, which supports only SaaS WAF; SgState: security group status, which supports only SaaS WAF; Label: group tag, which supports the filtering of only one tag at a time.

3. Output Parameters

Parameter Name Type Description
Total Integer Total number
Domains Array of DomainInfo Domain list

Note: This field may return null, indicating that no valid values can be obtained.
RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

4. Example

Example1 查询用户所有域名信息

查询用户所有域名信息

Input Example

POST / HTTP/1.1
Host: xxx.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeDomains
<common request parameters>

{
    "Offset": 0,
    "Limit": 20,
    "Filters": []
}

Output Example

{
    "Response": {
        "RequestId": "93efef98-b938-4ae7-bad3-19fc70b7b9a7",
        "Total": 2,
        "Domains": [
            {
                "AppId": 1256704386,
                "Domain": "zhenhas1020.qcloudwaf.com",
                "DomainId": "waf-ApUwCv4q",
                "InstanceId": "waf_2k0il2fm02vqm7z3",
                "InstanceName": "cd-Default1",
                "Edition": "clb-waf",
                "Region": "cd",
                "CreateTime": "2024-10-28T16:52:33+08:00",
                "Cname": "dae1cae7d48ec31c7727a86a5c1a2a62.qcloudzygj.com",
                "ClsStatus": 0,
                "PostCLSStatus": 0,
                "PostCKafkaStatus": 0,
                "FlowMode": 1,
                "Status": 1,
                "Mode": 1,
                "State": 0,
                "Engine": 20,
                "Ipv6Status": 0,
                "BotStatus": 2,
                "ApiStatus": 0,
                "Level": 3,
                "CdcClusters": "cls-dasjh2a2t5",
                "RsList": [
                    "1.14.1.0/24"
                ],
                "CCList": [
                    "1.14.3.0/24"
                ],
                "Ports": [
                    {
                        "NginxServerId": 257856,
                        "Port": "80",
                        "Protocol": "http",
                        "UpstreamPort": "80",
                        "UpstreamProtocol": "http"
                    }
                ],
                "LoadBalancerSet": [
                    {
                        "ListenerId": "lbl-d823da3",
                        "ListenerName": "listener 80",
                        "LoadBalancerId": "lb-nda52sau",
                        "LoadBalancerName": "cd lb",
                        "Protocol": "HTTP",
                        "Region": "cd",
                        "Vip": "26.153.3.235",
                        "Vport": 80,
                        "Zone": "ap-chengdu-1",
                        "NumericalVpcId": 23654,
                        "LoadBalancerType": "OPEN",
                        "LoadBalancerDomain": "lb-nda52sau-vo1x4syum7jtqz5n.clb.ap-guangzhou.tencentclb.com"
                    }
                ],
                "AlbType": "clb",
                "SgState": 0,
                "CloudType": "public",
                "Note": "clb domain",
                "AccessStatus": 1,
                "Labels": [
                    "clb domain"
                ]
            },
            {
                "AppId": 1256704386,
                "Domain": "zhenhuasaas1020.qcloudwaf.com",
                "DomainId": "11c88f0f292a5fd4a3002344271367b2",
                "InstanceId": "waf_2kzh5tma0v0jpotj",
                "InstanceName": "cd-Default",
                "Edition": "sparta-waf",
                "Region": "cd",
                "CreateTime": "2024-10-21T14:41:50+08:00",
                "Cname": "88fa6f44eee830c8e1e3b3c5ecba6af7.qcloudzygj.com",
                "ClsStatus": 1,
                "PostCLSStatus": 0,
                "PostCKafkaStatus": 0,
                "FlowMode": 0,
                "Status": 1,
                "Mode": 1,
                "State": 0,
                "Engine": 1,
                "Ipv6Status": 0,
                "BotStatus": 0,
                "ApiStatus": 0,
                "Level": 3,
                "RsList": [
                    "1.14.1.0/24"
                ],
                "CCList": [
                    "1.14.8.0/24"
                ],
                "Ports": [
                    {
                        "NginxServerId": 329025,
                        "Port": "80",
                        "Protocol": "http",
                        "UpstreamPort": "80",
                        "UpstreamProtocol": "http"
                    }
                ],
                "LoadBalancerSet": [
                    {
                        "ListenerId": "default",
                        "ListenerName": "default",
                        "LoadBalancerId": "default.cd",
                        "LoadBalancerName": "default.clb",
                        "Protocol": "HTTP",
                        "Region": "cd",
                        "Vip": "8.8.8.8",
                        "Vport": 80,
                        "Zone": "cd",
                        "NumericalVpcId": -1,
                        "LoadBalancerType": "OPEN",
                        "LoadBalancerDomain": "default.cd"
                    }
                ],
                "SgState": 1,
                "SgDetail": "ok",
                "CloudType": "public",
                "Note": "saas domain",
                "SrcList": [
                    "87.29.132.9"
                ],
                "SgID": "sg-asn32ag1",
                "AccessStatus": 1,
                "Labels": [
                    "saas domain"
                ]
            }
        ]
    }
}

Example2 查询用户SAASWAF某个实例的域名信息

查询用户SAASWAF某个实例的域名信息

Input Example

POST / HTTP/1.1
Host: waf.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeDomains
<common request parameters>

{
    "Offset": 0,
    "Limit": 20,
    "Filters": [
        {
            "Name": "Edition",
            "Values": [
                "sparta_waf"
            ],
            "ExactMatch": true
        },
        {
            "Name": "InstanceId",
            "Values": [
                "waf_2kw60jgy0908e8j3"
            ],
            "ExactMatch": true
        }
    ]
}

Output Example

{
    "Response": {
        "RequestId": "91334a5a-1d24-42b9-998e-57e1490f9608",
        "Total": 2,
        "Domains": [
            {
                "AppId": 1256702383,
                "Domain": "randygz2.qcloudwaf.com",
                "DomainId": "7d58ebf3db7e5f7e8f91eb017c6a7b31",
                "InstanceId": "waf_2kw60jgy0908e8j3",
                "InstanceName": "广州双栈集群企业版",
                "Edition": "sparta-waf",
                "Region": "gz",
                "CreateTime": "2024-07-18T10:46:12+08:00",
                "Cname": "dae1cae7d48ec31c7727a86a8cda2a62.qcloudzygj.com",
                "ClsStatus": 1,
                "PostCLSStatus": 0,
                "PostCKafkaStatus": 0,
                "FlowMode": 0,
                "Status": 1,
                "Mode": 1,
                "State": 0,
                "Engine": 1,
                "Ipv6Status": 1,
                "BotStatus": 2,
                "ApiStatus": 0,
                "Level": 3,
                "RsList": [
                    "134.175.221.0/24",
                    "2402:4e00:1020:1707::/64"
                ],
                "CCList": [
                    "134.175.225.0/24"
                ],
                "Ports": [
                    {
                        "NginxServerId": 231056,
                        "Port": "80",
                        "Protocol": "http",
                        "UpstreamPort": "80",
                        "UpstreamProtocol": "http"
                    },
                    {
                        "NginxServerId": 321607,
                        "Port": "443",
                        "Protocol": "https",
                        "UpstreamPort": "80",
                        "UpstreamProtocol": "http"
                    }
                ],
                "LoadBalancerSet": [],
                "SgState": 2,
                "SgDetail": "ok",
                "Note": "randy domain",
                "SrcList": [
                    "114.132.246.237"
                ],
                "UpstreamDomainList": [
                    "xiaochegnxu.upstream.com"
                ],
                "SgID": "sg-7dme0v73",
                "AccessStatus": 1,
                "Labels": [
                    "randy domain"
                ]
            },
            {
                "AppId": 1256704386,
                "Domain": "xiaochengxu.qcloudwaf.com",
                "DomainId": "42059f9a9905519d8f9e72a823891544",
                "InstanceId": "waf_2kw60jgy0908e8j3",
                "InstanceName": "广州双栈集群企业版",
                "Edition": "sparta-waf",
                "Region": "gz",
                "CreateTime": "2024-07-08T17:42:42+08:00",
                "Cname": "3323d11c0772e26ca3c68548b9cd069f.qcloudzygj.com",
                "ClsStatus": 1,
                "PostCLSStatus": 0,
                "PostCKafkaStatus": 0,
                "FlowMode": 0,
                "Status": 1,
                "Mode": 1,
                "State": 1,
                "Engine": 1,
                "Ipv6Status": 0,
                "BotStatus": 2,
                "ApiStatus": 0,
                "Level": 3,
                "RsList": [
                    "134.175.221.0/24"
                ],
                "CCList": [
                    "134.175.225.0/24"
                ],
                "Ports": [
                    {
                        "NginxServerId": 257856,
                        "Port": "80",
                        "Protocol": "http",
                        "UpstreamPort": "80",
                        "UpstreamProtocol": "http"
                    }
                ],
                "LoadBalancerSet": [],
                "SgState": 1,
                "SgDetail": "fail",
                "Note": "xiaochengxu",
                "SrcList": [
                    "124.221.148.62"
                ],
                "UpstreamDomainList": [
                    "xiaochegnxu.upstream.com"
                ],
                "SgID": "sg-7dme0v73",
                "AccessStatus": 1,
                "Labels": [
                    "xiaochengxu"
                ]
            }
        ]
    }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
AuthFailure CAM signature/authentication error.
DryRunOperation DryRun operation means the request will be successful, but the DryRun parameter is passed.
FailedOperation Operation failed.
InternalError Internal error.
InvalidParameter Parameter error.
InvalidParameter.InvalidCertificate Invalid certificate content.
InvalidParameter.QueryCertBySSLIDFailed Failed to query certificate by ID.
InvalidParameterValue Invalid parameter value.
LimitExceeded The quota limit is exceeded.
MissingParameter Parameters are missing
OperationDenied Operation denied.
RequestLimitExceeded Too frequent requests
ResourceInUse Resources are occupied.
ResourceInsufficient Insufficient resources.
ResourceNotFound Resources do not exist.
ResourceUnavailable Resources are unavailable.
ResourcesSoldOut Resources are sold out.
UnauthorizedOperation Unauthorized operation.
UnknownParameter Unknown parameter.
UnsupportedOperation The operation is not supported.