本接口用于获取指定加速域名的详细配置信息。
本接口请求需要包含指定目录/2016-09-01/domain/GetDomainConfigs、公共请求header和该接口所特有的请求参数,具体请求语句参照下文请求示例。
参数名 | 必选 | 类型及范围 | 说明 |
---|---|---|---|
DomainId | 是 | String | 域名ID |
ConfigList | 否 | String | 需要查询的配置,多个配置用逗号(半角)分隔。不填代表查询所有,具体参数说明见下表 |
参数名 | 类型及范围 | 说明 | 返回参数名 |
---|---|---|---|
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 |
参数名 | 必选 | 类型及范围 | 说明 |
---|---|---|---|
CompressType | 否 | String | 压缩方式类型,取值:GZIP:GZIP压缩;默认为GZIP |
FileType | 否 | String | Content-Type值;支持传入多个,多个取值间用,分割; 默认为所有支持的18个Content-Type值 |
FileSize | 否 | String | 压缩文件大小范围,单位Byte,输入格式实例:1024-2048; 默认为1024-31457280 底层参数限制:最小长度:1024 byte,最大长度:31457280 byte |
参数名 | 必选 | 类型及范围 | 说明 |
---|---|---|---|
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 /2016-09-01/domain/GetDomainConfigs?DomainId=2D09XC0&ConfigList 1.1
Host: cdn.api.ksyun.com
X-Amz-Date: date
Authorization:authorization string
x-action: GetDomainConfigs
x-version: 2016-09-01
POST方式:
POST /2016-09-01/domain/GetDomainConfigs 1.1
Host: cdn.api.ksyun.com
X-Amz-Date: date
Authorization:authorization string
x-action: GetDomainConfigs
x-version: 2016-09-01
Content-Type: application/x-www-form-urlencoded
DomainId=2D09XC0&ConfigList
返回示例
{
"CacheRuleConfig": {
"CacheRules": [
{
"CacheRuleType": "file_suffix",
"Value": "flv",
"CacheTime": 100,
"RespectOrigin": "on",
"CacheEnable": "on"
},
{
"CacheRuleType": "directory",
"Value": "/www/12/",
"CacheTime": 100,
"RespectOrigin": "off",
"CacheEnable": "on"
},
{
"CacheRuleType": "exact",
"Value": "/1/2",
"CacheTime": 112,
"RespectOrigin": "on",
"CacheEnable": "on"
}
]
},
"IpProtectionConfig": {
"Enable": "on",
"IpType": "allow",
"IpList": "2.1.1.1,3.1.1.1"
},
"HttpHeadersConfig": {
"HttpHeaderRules": []
},
"PageCompressConfig": {
"Enable": "off",
"CompressType": "GZIP",
"FileType": "application/json,application/x-font-ttf,image/svg+xml,text/plain,application/x-javascript,text/css,text/javascript,application/javascript,text/json,text/js,text/html,text/htm,text/xml,application/xml,application/atom+xml,application/xml+rss,application/xhtml+xml,application/xml-dtd",
"FileSize": "1024-31457280"
},
"IgnoreQueryStringConfig": {
"Enable": "on"
},
"BackOriginConfig": {
"Enable": ""
},
"ReferProtectionConfig": {
"Enable": "off",
"ReferType": "",
"ReferList": "",
"AllowEmpty": "on"
},
"BackOriginHostConfig": {
"BackOriginHost": "cyw1.test4660.huanfou.net.cn"
},
"VideoSeekConfig": {
"Enable": "off"
},
"OriginAdvancedConfig": {
"DomainId": "2D07RU1",
"Enable": "off",
"OriginType": "ipaddr",
"OriginPolicy": "rr",
"Origin": "1.2.1.33"
},
"CertificateConfig": {
"Enable": "off"
},
"RequestAuthConfig": {
"Enable": "off"
},
"Http2OptionConfig": {
"Enable": "off"
},
"ForceRedirectConfig": {
"RedirectType": "off"
},
"ErrorPageConfig": {}
}
文档内容是否对您有帮助?
评价建议不能为空
非常感谢您的反馈,我们会继续努力做到更好!