调用DescribeDcdnDomainConfigs获取加速域名的配置信息。
接口说明
一次可查询多个功能配置信息。
单用户调用频率:30 次/秒。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
        
            调试
        
    
授权信息
| 
                                 操作  | 
                            
                                 访问级别  | 
                            
                                 资源类型  | 
                            
                                 条件关键字  | 
                            
                                 关联操作  | 
                        
| 
                                 dcdn:DescribeDcdnDomainConfigs  | 
                            
                                 get  | 
                            
                                     domain 
  | 
                            无 | 无 | 
请求参数
| 
                             名称  | 
                        
                             类型  | 
                        
                             必填  | 
                        
                             描述  | 
                        
                             示例值  | 
                    
| DomainName | 
                             string  | 
                        
                             是  | 
                        
                             加速域名,仅支持查询单个域名。  | 
                        
                             example.com  | 
                    
| FunctionNames | 
                             string  | 
                        
                             否  | 
                        
                             功能列表名称,多个用英文逗号(,)分隔。  | 
                        
                             filetype_based_ttl_set,set_req_host_header  | 
                    
| ConfigId | 
                             string  | 
                        
                             否  | 
                        
                             配置 ID。  | 
                        
                             5003576  | 
                    
功能列表如下表所示。
| 名称 | 参数 | 
| referer_white_list_set:Referer 防盗链白名单 | refer_domain_allow_list:白名单列表,多个用英文逗号(,)分隔。 allow_empty:是否允许空 Referer 字段访问 DCDN 资源,取值:on 或 off。  | 
| referer_black_list_set:Referer 防盗链黑名单 | refer_domain_deny_list:黑名单列表,多个用英文逗号(,)分隔。 allow_empty:是否允许空 Referer 字段访问 DCDN 资源,取值:on 或 off。  | 
| filetype_based_ttl_set:文件类型缓存过期时间设置 | ttl:缓存时间,单位为秒。 file_type:文件类型。多个文件类型用英文逗号(,)分隔,例如 TXT,JPG。 weight:权重。  | 
| path_based_ttl_set:目录类型缓存过期时间设置 | ttl:缓存时间,单位为秒。 path:目录,必须以正斜线(/)开头。 weight:权重。  | 
| oss_auth:OSS 鉴权 Bucket | oss_bucket_id:您的 Bucket 地址。 | 
| ip_black_list_set:IP 黑名单 | ip_list:IP 列表,多个用英文逗号(,)分隔。 | 
| ip_allow_list_set:IP 白名单 | ip_list:IP 列表,多个用英文逗号(,)分隔。 | 
| error_page:错误页面重定向 | error_code:错误码。 rewrite_page:重定向页面。  | 
| set_req_host_header:修改回源自定义头 | domain_name:回源 HOST 头内容。 | 
| set_hashkey_args:忽略 URL 参数 | hashkey_args:保留参数列表,多个用英文逗号(,)分隔,最多支持填写 10 个。 disable:等于 on 表示忽略所有参数,off 表示不忽略(缓存 hashkey 忽略所有参数,优先级低于保留缓存参数列表)。 keep_oss_args:等于 on 表示回源保留所有参数,off 表示与缓存 hashkey 的参数一致。  | 
| aliauth:阿里鉴权 | auth_type:鉴权类型。no_auth:无鉴权;type_a:鉴权方式 A;type_b:鉴权方式 B;type_c:鉴权方式 C。 auth_key1:鉴权 key1;auth_key2:鉴权 key2。 ali_auth_delta:自定义鉴权缓冲时间。  | 
| set_resp_header:设置 HTTP 响应头(浏览器端可见) | key(必填):响应头。 value(必填):响应头内容,删除填写 null。 header_operation_type:请求头操作,支持 add、delete、modify、rewrite,添加 add、删除 delete、变更 modify、替换 rewrite。 duplicate:是否允许重复,支持 on 或 off。 header_source:查找。 header_destination:替换为。 match_all:匹配所有,支持 on 或 off。  | 
| https_force:强制 HTTPS 跳转 | enable:功能开关,取值:on 或 off。 | 
| http_force:强制 HTTP 跳转 | enable:功能开关,取值:on 或 off。 | 
| https_option:HTTPS 基础参数 | http2:HTTP2 开关,取值:on 或 off。 ocsp_stapling:OCSP Stapling 开关,取值:on 或 off。  | 
| forward_scheme:静态协议跟随回源 | enable:开关,取值:on 或 off。 scheme_origin:回源协议类型,支持 http、https 和 follow(跟随)。  | 
| dynamic:全站加速相关配置 | enable(必填):开关,支持 on 或 off。 static_route_type:静态加速文件后缀。 static_route_url:静态加速 URI。 static_route_path:静态加速 PATH。 dynamic_route_origin:回源路由 scheme,支持 http、https、follow 和 follow-port。 dynamic_route_round_robin:开启负载均衡开关,支持 on 或 off。 dynamic_route_adapt_cache:开启自适应缓存开关,支持 on 或 off。  | 
| set_req_header:自定义回源 HTTP 头 | key:回源头。 value:回源头内容。  | 
| l2_oss_key:阿里云 OSS 私有 Bucket 回源 | private_oss_auth:私有 Bucket 回源开关,支持 on 或 off。 | 
| range:range 回源 | enable:开关,支持 on、off。 | 
| video_seek:视频拖拽播放 | enable(必填):开关,支持 on 或 off。 flv_seek_by_time:开启 FLV 按时间拖拽,支持 on 或 off。 mp4_seek_start:自定义 MP4 开始参数。 mp4_seek_end:自定义 MP4 结束参数。 flv_seek_start:自定义 FLV 开始参数。 flv_seek_end:自定义 FLV 结束参数。  | 
| websocket:Websocket | enabled(必填):是否开启,取值:on 或 off。 origin_scheme:回源 scheme,支持 http、https 和 follow。 heartbeat:心跳时间,默认为 60 秒,支持 1~300 秒。  | 
| ali_remove_args:忽略 URL 参数(删除) | ali_remove_args(必填):删除指定的参数,多个参数之间用空格隔开,剩余参数将作为 hashkey 中 URL args 部分。 keep_oss_args:回源保留参数。支持 on 或 off,on 表示回源保留所有参数,off 表示与缓存 hashkey 的参数一致。  | 
| https_tls_version:TLS 协议版本 | tls10:开启 TLSv1.0,默认为 on,支持 on 或 off。 tls11:开启 TLSv1.1,默认为 on,支持 on 或 off。 tls12:开启 TLSv1.2,默认为 on,支持 on 或 off。 tls13:开启 TLSv1.3,默认为 off,支持 on 或 off。  | 
| HSTS:HSTS | enabled(必填):开关,默认为 off,支持 on 或 off。 https_hsts_max_age(必填):过期时间,单位:ms,建议填写 5184000000ms(60 天)。 https_hsts_include_subdomains:HSTS 头包含 includeSubDomains 参数,支持 on 或 off。请谨慎开启,开启前请确保该加速域名的所有子域名都已开启 HTTPS,否则会导致子域名自动跳转到 HTTPS 后无法访问。  | 
| filetype_force_ttl_code:文件状态码过期时间设置 | file_type(必填):文件类型,多个用英文逗号(,)分隔,例如:TXT,JPG。 code_string(必填):状态码,多个用英文逗号(,)分隔。例如:302=0,301=0,4xx=2。  | 
| path_force_ttl_code:路径状态码过期时间设置 | path(必填):必须以正斜线(/)开头,例如:/image。 code_string(必填):状态码,多个用英文逗号(,)分隔。例如:302=0,301=0,4xx=2。  | 
| gzip:智能压缩 | enable(必填):功能开关,支持 on 或 off。 | 
| tesla:页面优化 | enable(必填):功能开关,支持 on 或 off。 trim_js:支持 on 或 off,开启该功能,优化 html 中内嵌的 js 代码。 trim_css:支持 on 或 off,开启该功能,优化 html 中内嵌的 css 代码。  | 
| https_origin_sni:回源 SNI | enabled:功能开关,支持 on 或 off。 https_origin_sni(必填):回源 SNI。  | 
| protogw:IP 应用加速 | realip(必填):源站 IP 透传方式,支持 off、toa、pp。 port(必填):服务端口。 patten:模式字符串。  | 
| host_redirect:重写功能 | regex:需要重写的 URL,例如:^/$。 replacement:目标 URL,例如: /go/act/sale/tbzlsy.php。 flag:仅支持 redirect、break。  | 
| forward_timeout:回源请求超时时间 | forward_timeout:单位为秒,配置时建议不要大于 100 秒。 | 
| ipv6:IPv6 配置 | switch(必填):开关,支持 on 或 off,on 表示开启,off 表示关闭。 region:开启 IPv6 功能的地区,支持星号(*)。  | 
| edge_function:边缘脚本 | rule(必填):DSL 规则。 pri(必填):优先级。 enable(必填):本条规则是否生效,取值:on 或 off。 name:规则名称。 pos:规则执行位置。全站加速域名仅支持 head,不支持 foot。 brk:命中本条规则后,当前执行位置剩余规则均跳过。 option:option 管控。 grammar:grammar 管控,可选值:空、es2、js。 jsmode:js 域名白单管控,可选值:redirect、bypass。  | 
| brotli:Brotli 压缩 | enable(必填):功能开关,支持 on 或 off。 brotli_level:压缩等级,取值范围[1,11]。  | 
| ali_ua:User-Agent 黑/白名单 | ua:User-Agent。 type:名单类型,black 或 white。  | 
返回参数
| 
                             名称  | 
                        
                             类型  | 
                        
                             描述  | 
                        
                             示例值  | 
                    
| 
                             object  | 
                        |||
| RequestId | 
                             string  | 
                        
                             请求 ID。  | 
                        
                             F8AA0364-0FDB-4AD5-AC74-D69FAB8924ED  | 
                    
| DomainConfigs | 
                             object  | 
                        ||
| DomainConfig | 
                             array<object>  | 
                        
                             域名配置。  | 
                        |
| 
                             object  | 
                        |||
| Status | 
                             string  | 
                        
                             状态。取值: 
  | 
                        
                             success  | 
                    
| ParentId | 
                             string  | 
                        
                             高级条件配置 ID。  | 
                        
                             1234567  | 
                    
| ConfigId | 
                             string  | 
                        
                             配置 ID。  | 
                        
                             5068995  | 
                    
| FunctionName | 
                             string  | 
                        
                             功能名称。  | 
                        
                             set_req_host_header  | 
                    
| FunctionArgs | 
                             object  | 
                        ||
| FunctionArg | 
                             array<object>  | 
                        
                             功能配置。  | 
                        |
| 
                             object  | 
                        |||
| ArgName | 
                             string  | 
                        
                             配置名称。  | 
                        
                             ttl  | 
                    
| ArgValue | 
                             string  | 
                        
                             配置值。  | 
                        
                             13  | 
                    
示例
正常返回示例
JSON格式
{
  "RequestId": "F8AA0364-0FDB-4AD5-AC74-D69FAB8924ED",
  "DomainConfigs": {
    "DomainConfig": [
      {
        "Status": "success",
        "ParentId": "1234567",
        "ConfigId": "5068995",
        "FunctionName": "set_req_host_header",
        "FunctionArgs": {
          "FunctionArg": [
            {
              "ArgName": "ttl",
              "ArgValue": "13"
            }
          ]
        }
      }
    ]
  }
}
            错误码
| 
                                 HTTP status code  | 
            				
                                 错误码  | 
            				
                                 错误信息  | 
            				
                                 描述  | 
            			
|---|---|---|---|
| 400 | Invalid%s.ValueNotSupported | FunctionName [%s] is not supported. | 不支持该配置,请重新查询。 | 
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。