查询域名详细配置

最近更新时间:2025-05-29 01:15:24

我的收藏

1. 接口描述

接口请求域名: cdn.tencentcloudapi.com 。

DescribeDomainsConfig 用于查询内容分发网络加速域名(含境内、境外)的所有配置信息。

默认接口请求频率限制:20次/秒。

推荐使用 API Explorer
点击调试
API Explorer 提供了在线调用、签名验证、SDK 代码生成和快速检索接口等能力。您可查看每次调用的请求内容和返回结果以及自动生成 SDK 调用示例。

2. 输入参数

以下请求参数列表仅列出了接口请求参数和部分公共参数,完整公共参数列表见 公共请求参数

参数名称 必选 类型 描述
Action String 公共参数,本接口取值:DescribeDomainsConfig。
Version String 公共参数,本接口取值:2018-06-06。
Region String 公共参数,本接口不需要传递此参数。
Offset Integer 分页查询偏移量,默认为 0
示例值:0
Limit Integer 分页查询限制数目,默认为 100,最大可设置为 100
示例值:1
Filters.N Array of DomainFilter 查询条件过滤器,复杂类型
Sort Sort 排序规则

3. 输出参数

参数名称 类型 描述
Domains Array of DetailDomain 域名列表
TotalNumber Integer 符合查询条件的域名总数
用于分页查询
示例值:201
RequestId String 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。

4. 示例

示例1 查询域名详细配置

输入示例

POST / HTTP/1.1
Host: cdn.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeDomainsConfig
<公共请求参数>

{
    "Offset": 0,
    "Limit": 1,
    "Filters": [
        {
            "Name": "domainType",
            "Value": [
                "cname"
            ]
        }
    ]
}

输出示例

{
    "Response": {
        "RequestId": "7c152eaf-a4a4-4fc2-8204-c586ad91e8ec",
        "Domains": [
            {
                "AccessControl": {
                    "AccessControlRules": [],
                    "ReturnCode": 403,
                    "Switch": "off"
                },
                "AccessPort": [
                    80,
                    8080,
                    443
                ],
                "Advance": "on",
                "AdvanceSet": [
                    {
                        "Name": "edge",
                        "Value": "on"
                    },
                    {
                        "Name": "last",
                        "Value": "on"
                    },
                    {
                        "Name": "full",
                        "Value": "on"
                    },
                    {
                        "Name": "quic",
                        "Value": "on"
                    },
                    {
                        "Name": "staging",
                        "Value": "off"
                    },
                    {
                        "Name": "tes_staging",
                        "Value": "off"
                    },
                    {
                        "Name": "overdue_offline_https",
                        "Value": "off"
                    },
                    {
                        "Name": "overdue_offline_apk",
                        "Value": "off"
                    },
                    {
                        "Name": "overdue_offline_quic",
                        "Value": "off"
                    },
                    {
                        "Name": "overdue_offline_single_area",
                        "Value": "off"
                    }
                ],
                "AdvancedAuthentication": {
                    "Switch": "off",
                    "TypeA": null,
                    "TypeB": null,
                    "TypeC": null,
                    "TypeD": null,
                    "TypeE": null,
                    "TypeF": null
                },
                "AppId": 12345,
                "Area": "mainland",
                "Authentication": {
                    "AuthAlgorithm": "md5",
                    "Switch": "off",
                    "TypeA": null,
                    "TypeB": null,
                    "TypeC": null,
                    "TypeD": null
                },
                "AwsPrivateAccess": {
                    "AccessKey": null,
                    "Bucket": null,
                    "Region": null,
                    "SecretKey": null,
                    "Switch": "off"
                },
                "BandwidthAlert": {
                    "AlertPercentage": 80,
                    "AlertSwitch": "off",
                    "BpsThreshold": 10000000000,
                    "CounterMeasure": "RETURN_404",
                    "LastTriggerTime": null,
                    "LastTriggerTimeOverseas": null,
                    "Metric": "bandwidth",
                    "StatisticItems": [],
                    "Switch": "off"
                },
                "Cache": {
                    "AdvancedCache": null,
                    "RuleCache": null,
                    "SimpleCache": {
                        "CacheRules": [
                            {
                                "CacheContents": [
                                    "/data"
                                ],
                                "CacheTime": 2592000,
                                "CacheType": "all"
                            },
                            {
                                "CacheContents": [
                                    "php",
                                    "jsp",
                                    "asp",
                                    "aspx"
                                ],
                                "CacheTime": 0,
                                "CacheType": "file"
                            }
                        ],
                        "CompareMaxAge": "off",
                        "FollowOrigin": "off",
                        "IgnoreCacheControl": "off",
                        "IgnoreSetCookie": "off",
                        "Revalidate": {
                            "Path": "/data",
                            "Switch": "off"
                        }
                    }
                },
                "CacheKey": {
                    "CacheTag": {
                        "Switch": "off",
                        "Value": null
                    },
                    "Cookie": {
                        "Switch": "off",
                        "Value": ""
                    },
                    "FullUrlCache": "on",
                    "Header": {
                        "Switch": "off",
                        "Value": ""
                    },
                    "IgnoreCase": "off",
                    "KeyRules": [],
                    "QueryString": {
                        "Action": null,
                        "Reorder": "off",
                        "Switch": "off",
                        "Value": ""
                    },
                    "Scheme": {
                        "Switch": "off"
                    }
                },
                "Cname": "qq.com.cdntest.cdn.dnsv1.com",
                "Compatibility": {
                    "Code": 0
                },
                "Compression": {
                    "CompressionRules": [
                        {
                            "Algorithms": [
                                "gzip"
                            ],
                            "Compress": true,
                            "FileExtensions": [
                                "js",
                                "html",
                                "css",
                                "xml",
                                "json",
                                "shtml",
                                "htm"
                            ],
                            "MaxLength": 2097152,
                            "MinLength": 256,
                            "RulePaths": [],
                            "RuleType": null
                        }
                    ],
                    "Switch": "on"
                },
                "CreateTime": "2024-12-18 14:29:28",
                "Disable": "normal",
                "Domain": "qq.com",
                "DownstreamCapping": {
                    "CappingRules": [],
                    "Switch": "off"
                },
                "ErrorPage": {
                    "PageRules": [],
                    "Switch": "off"
                },
                "FollowRedirect": {
                    "RedirectConfig": {
                        "FollowRedirectBackupHost": "",
                        "FollowRedirectHost": "",
                        "Switch": "off"
                    },
                    "Switch": "off"
                },
                "ForceRedirect": {
                    "CarryHeaders": "off",
                    "RedirectStatusCode": 302,
                    "RedirectType": "http",
                    "Switch": "off"
                },
                "Https": {
                    "CertInfo": null,
                    "ClientCertInfo": null,
                    "Hsts": {
                        "IncludeSubDomains": "off",
                        "MaxAge": 0,
                        "Switch": "off"
                    },
                    "Http2": "off",
                    "OcspStapling": "off",
                    "Spdy": "off",
                    "Switch": "off",
                    "TlsVersion": [
                        "TLSv1",
                        "TLSv1.1",
                        "TLSv1.2",
                        "TLSv1.3"
                    ],
                    "VerifyClient": "off",
                    "SslStatus": "closed"
                },
                "HttpsBilling": {
                    "Switch": "off"
                },
                "HwPrivateAccess": {
                    "AccessKey": null,
                    "Bucket": null,
                    "SecretKey": null,
                    "Switch": "off"
                },
                "ImageOptimization": {
                    "AvifAdapter": {
                        "FallbackFormats": [],
                        "Switch": "off"
                    },
                    "GuetzliAdapter": {
                        "Switch": "off"
                    },
                    "TpgAdapter": {
                        "Switch": "off"
                    },
                    "WebpAdapter": {
                        "Switch": "off"
                    }
                },
                "IpFilter": {
                    "FilterRules": [],
                    "FilterType": "blacklist",
                    "Filters": [],
                    "ReturnCode": 514,
                    "Switch": "off"
                },
                "IpFreqLimit": {
                    "Qps": null,
                    "Switch": "off"
                },
                "Ipv6": {
                    "Switch": "on"
                },
                "Ipv6Access": {
                    "Switch": "off"
                },
                "MaxAge": {
                    "MaxAgeCodeRule": null,
                    "MaxAgeRules": [],
                    "Switch": "off"
                },
                "OfflineCache": {
                    "Switch": "off"
                },
                "Origin": {
                    "AdvanceHttps": {
                        "CertInfo": null,
                        "Cipher": "DEFAULT",
                        "CustomTlsStatus": "off",
                        "OriginCertInfo": null,
                        "TlsVersion": [
                            "TLSv1",
                            "TLSv1.1",
                            "TLSv1.2",
                            "TLSv1.3"
                        ],
                        "VerifyOriginType": "off"
                    },
                    "BackupOriginType": null,
                    "BackupOrigins": [],
                    "BackupServerName": null,
                    "BasePath": null,
                    "CosPrivateAccess": "off",
                    "OriginCompany": null,
                    "OriginPullProtocol": "http",
                    "OriginType": "domain",
                    "Origins": [
                        "httpbin.org"
                    ],
                    "PathBasedOrigin": [],
                    "PathRules": [],
                    "ServerName": "qq.com",
                    "Sni": {
                        "ServerName": null,
                        "Switch": "off"
                    }
                },
                "OriginAuthentication": {
                    "Switch": "off",
                    "TypeA": null
                },
                "OriginCombine": {
                    "Switch": "off"
                },
                "OriginPullOptimization": {
                    "Switch": "off",
                    "OptimizationType": ""
                },
                "OriginPullTimeout": {
                    "ConnectTimeout": 5,
                    "ReceiveTimeout": 10
                },
                "OssPrivateAccess": {
                    "AccessKey": null,
                    "Bucket": null,
                    "Region": null,
                    "SecretKey": null,
                    "Switch": "off"
                },
                "OthersPrivateAccess": {
                    "AccessKey": null,
                    "Bucket": null,
                    "Region": null,
                    "SecretKey": null,
                    "Switch": "off"
                },
                "ParamFilter": {
                    "FilterRules": [],
                    "Switch": "off"
                },
                "ParentHost": "",
                "PostMaxSize": {
                    "MaxSize": 33554432,
                    "Switch": "off"
                },
                "ProjectId": 0,
                "QnPrivateAccess": {
                    "AccessKey": "",
                    "SecretKey": "",
                    "Switch": "off"
                },
                "Quic": {
                    "Switch": "off"
                },
                "RangeOriginPull": {
                    "RangeRules": [],
                    "Switch": "on"
                },
                "Readonly": "normal",
                "Referer": {
                    "RefererRules": [],
                    "Switch": "off"
                },
                "RemoteAuthentication": {
                    "RemoteAuthenticationRules": null,
                    "Server": null,
                    "Switch": "off"
                },
                "RequestHeader": {
                    "HeaderRules": [
                        {
                            "HeaderMode": "add",
                            "HeaderName": "Tencent-Acceleration-Domain-Name",
                            "HeaderValue": "$host",
                            "RulePaths": [
                                "/data"
                            ],
                            "RuleType": "all"
                        }
                    ],
                    "Switch": "on"
                },
                "ResourceId": "cdn-clrsr",
                "ResponseHeader": {
                    "HeaderRules": [],
                    "Switch": "off"
                },
                "ResponseHeaderCache": {
                    "Switch": "on"
                },
                "RuleEngine": {
                    "Content": null,
                    "Switch": "off"
                },
                "SecurityConfig": {
                    "Switch": "off"
                },
                "Seo": {
                    "Switch": "off"
                },
                "ServiceType": "web",
                "ShareCname": {
                    "Cname": null,
                    "Switch": "off"
                },
                "SpecificConfig": {
                    "Mainland": null,
                    "Overseas": null
                },
                "Status": "online",
                "StatusCodeCache": {
                    "CacheRules": [
                        {
                            "CacheTime": 10,
                            "StatusCode": "404"
                        }
                    ],
                    "Switch": "on"
                },
                "Tag": null,
                "UpdateTime": "2024-12-18 14:31:34",
                "UrlRedirect": {
                    "PathRules": [],
                    "Switch": "off"
                },
                "UserAgentFilter": {
                    "FilterRules": [],
                    "Switch": "off"
                },
                "VideoSeek": {
                    "Switch": "off"
                },
                "WebSocket": {
                    "Switch": "off",
                    "Timeout": 30
                }
            }
        ],
        "TotalNumber": 1
    }
}

5. 开发者资源

腾讯云 API 平台

腾讯云 API 平台 是综合 API 文档、错误码、API Explorer 及 SDK 等资源的统一查询平台,方便您从同一入口查询及使用腾讯云提供的所有 API 服务。

API Inspector

用户可通过 API Inspector 查看控制台每一步操作关联的 API 调用情况,并自动生成各语言版本的 API 代码,也可前往 API Explorer 进行在线调试。

SDK

云 API 3.0 提供了配套的开发工具集(SDK),支持多种编程语言,能更方便的调用 API。

命令行工具

6. 错误码

以下仅列出了接口业务逻辑相关的错误码,其他错误码详见 公共错误码

错误码 描述
InternalError.CamSystemError 内部鉴权系统错误。
InternalError.CdnConfigError 域名配置更新失败。
InternalError.CdnDbError 内部数据错误,请联系腾讯云工程师进一步排查。
InternalError.CdnQuerySystemError 内部查询错误,请重试或联系客服人员解决。
InternalError.CdnSystemError 系统错误,请联系腾讯云工程师进一步排查。
InternalError.Error 内部服务错误,请联系腾讯云工程师进一步排查。
InternalError.ProxyServer 内部服务错误,请联系腾讯云工程师进一步排查。
InternalError.RouteError 内部服务错误,请联系腾讯云工程师进一步排查。
InvalidParameter.CDNStatusInvalidDomain 域名状态不合法。
InvalidParameter.CdnCertNoCertInfo 证书无效,请确认后重试。
InvalidParameter.CdnInterfaceError 内部接口错误,请联系腾讯云工程师进一步排查。
InvalidParameter.CdnParamError 参数错误,请参考文档中示例参数填充。
InvalidParameter.CdnStatInvalidProjectId 项目ID错误,请确认后重试。
InvalidParameter.CdnStatTooManyDomains 查询的域名数量超过限制。
ResourceNotFound.CdnHostNotExists 未查询到该域名,请确认域名是否正确。
ResourceNotFound.CdnUserNotExists 未开通CDN服务,请开通后使用此接口。
UnauthorizedOperation.CdnCamUnauthorized 子账号未配置cam策略。
UnauthorizedOperation.CdnHostUnauthorized CDN子账号加速域名未授权。
UnauthorizedOperation.CdnProjectUnauthorized 子账号项目未授权。
UnauthorizedOperation.CdnTagUnauthorized 子账号标签未授权。
UnauthorizedOperation.CdnUserAuthFail CDN用户认证失败。
UnauthorizedOperation.CdnUserAuthWait CDN用户待认证。
UnauthorizedOperation.CdnUserIsSuspended 加速服务已停服,请重启加速服务后重试。
UnauthorizedOperation.OpNoAuth 暂不支持此操作,请联系腾讯云工程师处理。
UnauthorizedOperation.OperationTooOften 操作超出调用频次限制。