全部文档
当前文档

暂无内容

如果没有找到您期望的内容,请尝试其他搜索词

文档中心

查询域名详细配置信息

最近更新时间:2022-03-17 17:10:29

GetDomainConfigs

描述

本接口用于获取指定加速域名的详细配置信息。

请求语法

本接口请求需要包含指定目录/2019-06-01/domain/GetDomainConfigs、公共请求header和该接口所特有的请求参数,具体请求语句参照下文请求示例。

请求参数

参数名 必选 类型及范围 说明
DomainId String 域名ID
ConfigList String 需要查询的配置,多个配置用逗号(半角)分隔。不填代表查询所有,具体参数说明见下表

ConfigList

参数名 类型及范围 说明 返回参数名
cache_expired String 缓存策略 CacheRuleConfig
ip String IP防盗链配置 IpProtectionConfig
http_header String 设置http头 HttpHeadersConfig
ignore_query_string String 过滤参数 IgnoreQueryStringConfig
referer String Refer防盗链功能 ReferProtectionConfig
src_host String 设置回源host BackOriginHostConfig
video_seek String 设置拖拽 VideoSeekConfig
certificate String 设置服务证书 CertificateConfig
request_auth String 时间戳+共享密钥防盗链配置 RequestAuthConfig
http2_option String 设置HTTP 2.0 Http2OptionConfig
force_redirect String 设置强制跳转 ForceRedirectConfig
page_compress String 设置Gzip压缩 PageCompressConfig
Br_compress String 设置Br压缩 BrCompressConfig
error_page String 自定义错误页面 ErrorPageConfig

page_compress

参数名 必选 类型及范围 说明
CompressType String 压缩方式类型,取值:GZIP:GZIP压缩;默认为GZIP
FileType String Content-Type值;支持传入多个,多个取值间用,分割; 默认为所有支持的18个Content-Type值
FileSize String 压缩文件大小范围,单位Byte,输入格式实例:1024-2048; 默认为1024-31457280
底层参数限制:最小长度:1024 byte,最大长度:31457280 byte

Br_compress

参数名 必选 类型及范围 说明
CompressType String 压缩方式类型,取值:BR:BR压缩; 默认为BR
FileType String Content-Type值;支持传入多个,多个取值间用,分割; 默认为所有支持的18个Content-Type值
FileSize String 压缩文件大小范围,单位Byte,输入格式实例:1024-2048; 默认为1024-31457280
底层参数限制:最小长度:1024 byte,最大长度:31457280 byte

返回参数

参数名 类型及范围 说明
DomainConfigs String 对应的配置数据,参考上面ConfigList的请求参数名和返回参数名的对应关系

示例

请求示例

GET方式:

GET /2019-06-01/domain/GetDomainConfigs?DomainId=2D07ANU 1.1
Host: cdn.api.ksyun.com
X-Amz-Date: date
Authorization:authorization string
x-action: GetDomainConfigs
x-version: 2019-06-01

POST方式:

POST  /2019-06-01/domain/GetDomainConfigs 1.1
Host: cdn.api.ksyun.com
X-Amz-Date: date
Authorization:authorization string
x-action: GetDomainConfigs
x-version: 2019-06-01
Content-Type: application/json

{
    "DomainId":"2D07ANU"
}

返回示例

{
    "CacheRuleConfig": {
        "CacheRules": [
            {
                "CacheRuleType": "directory",
                "Value": "/XXX/",
                "CacheTime": 11,
                "RespectOrigin": "on",
                "CacheEnable": "on"
            },
            {
                "CacheRuleType": "exact",
                "Value": "/XXX/XXX.TXT",
                "CacheEnable": "off"
            },
            {
                "CacheRuleType": "global",
                "CacheTime": 2592000,
                "RespectOrigin": "off",
                "CacheEnable": "on"
            }
        ]
    },
    "IpProtectionConfig": {
        "Enable": "on",
        "IpType": "block",
        "IpList": "2.1.1.1,3.1.1.1,103.200.110.0-103.200.110.254,10.10.10.0/24,1::1,6001:8:0:23:8:800:200:417A/127"
    },
    "HttpHeadersConfig": {
        "HttpHeaderRules": [
            {
                "HttpHeaderRuleType": "",
                "HeaderKey": "haha",
                "HeaderValue": "666"
            },
            {
                "HttpHeaderRuleType": "",
                "HeaderKey": "heihei",
                "HeaderValue": "777"
            }
        ]
    },
    "PageCompressConfig": {
        "Enable": "on",
        "CompressType": "BR",
        "FileType": "application/atom+xml,application/javascript,application/x-javascript,application/xhtml+xml,application/xml,application/xml+rss,application/xml-dtd,text/css,text/htm,text/html,text/javascript,text/js,text/json,text/plain,text/xml,application/json,application/x-font-ttf,image/svg+xml",
        "FileSize": "1024-31457280"
    },
    "IgnoreQueryStringConfig": {
        "Enable": "off"
    },
    "BackOriginConfig": {
        "Enable": ""
    },
    "ReferProtectionConfig": {
        "Enable": "on",
        "ReferType": "block",
        "ReferList": "www.test.com,www.baidu.com",
        "AllowEmpty": "on"
    },
    "BackOriginHostConfig": {
        "BackOriginHost": "www.test.com"
    },
    "VideoSeekConfig": {
        "Enable": "on"
    },
    "OriginAdvancedConfig": {
        "OriginPolicy": "rr",
        "OriginProtocol": "http",
        "OriginPort": "80",
        "OriginHeaderRules": [],
        "EnableFollow302": "off",
        "EnableIgnoreQueryString": "off",
        "EnableFragmentBackSource": "off",
        "MainOriginRule": {
            "OriginType": "ipaddr",
            "Origin": "99.9.9.9",
            "OriginHost": "www.test.com"
        },
        "BackupOriginRule": {
            "BackupOriginType": "domain",
            "BackupOrigin": "wcdn-20220304.baidu.com"
        },
        "EnableBackupOrigin": "on",
        "OriginNormalAuthEnable": "off",
        "OriginTOSAuthEnable": "off"
    },
    "TestUrlConfig": {
        "TestUrl": ""
    },
    "CertificateConfig": {
        "Enable": "on",
        "CertificateId": "12766"
    },
    "RequestAuthConfig": {
        "Enable": "on",
        "AuthType": "typeA",
        "Key1": "aohdsaodfhsahfsadyf",
        "ExpirationTime": 666,
        "ConditionalConfigs": []
    },
    "Http2OptionConfig": {
        "Enable": "off"
    },
    "ForceRedirectConfig": {
        "RedirectType": "off"
    },
    "ErrorPageConfig": {
        "ErrorPages": [
            {
                "ErrorHttpCode": "404",
                "CustomPageUrl": "https://www.test.com/error404.html"
            },
            {
                "ErrorHttpCode": "403",
                "CustomPageUrl": "https://www.test.com/error403.html"
            }
        ]
    },
    "BackOriginBaseConfig": {
        "OriginType": "ipaddr",
        "Origin": "99.9.9.9",
        "OriginProtocol": "http"
    },
    "UaProtectionConfig": {
        "Enable": "off"
    },
    "CacheKeyConfig": {
        "Enable": "off"
    },
    "ErrorCodeCacheRuleConfig": {
        "ErrorCodeRules": []
    },
    "ConditionalHttpHeadersConfig": {
        "ConditionalRules": []
    },
    "GlobalAccessControlConfig": {
        "ControlRules": [
            {
                "ControlRangeType": "directory",
                "ControlRangeValue": "/api/",
                "ControlRuleType": "TypeA",
                "ControlRuleValue": "8/30,20/60",
                "ForbidDuration": 300,
                "AccessStatisticsDuration": 300
            },
            {
                "ControlRangeType": "exact",
                "ControlRangeValue": "/file/1.jpg",
                "ControlRuleType": "TypeB",
                "ControlRuleValue": "60",
                "ForbidDuration": 200,
                "AccessStatisticsDuration": 300
            }
        ]
    }
}

错误码

为了帮您快速定位问题,WCDN将错误码集中归类,请到【使用须知】查看详情。

文档导读
纯净模式常规模式

纯净模式

点击可全屏预览文档内容
文档反馈