全部产品
存储与CDN 数据库 域名与网站(万网) 应用服务 数加·人工智能 数加·大数据基础服务 互联网中间件 视频服务 开发者工具 解决方案 物联网 钉钉智能硬件
CDN

查询域名配置

更新时间:2017-12-25 10:30:36

DescribeDomainConfigs

描述

获取指定加速域名的配置

请求参数

参数 类型 必要 描述
Action String 操作接口名,系统规定参数
取值:DescribeDomainConfigs
DomainName String 需要接入CDN的域名
ConfigList String 需要查询的配置,多个配置用逗号(半角)分隔,当前支持cache_expired、cc、error_page、http_header、optimize、page_compress、ignore_query_string、range、referer、req_auth、src_host、video_seek、waf, notify_url, redirect_type 配置;不填代表查询所有

ConfigList参数说明

名称 类型 描述
cache_expired String 目录或文件过期配置
cc String CC防护功能、IP黑白名单配置
error_page String 自定义404错误页面跳转
http_header String 自定义http头
optimize String 页面优化
page_compress String 智能压缩
ignore_query_string String 过滤参数
range String range回源功能
referer String Refer防盗链功能
req_auth String 访问鉴权配置
src_host String 回源host
video_seek String 拖拽播放功能
waf String Waf防护功能
notify_url String 视频直播notify url
redirect_type String 强制访问跳转方式, 取值: Off, Http, Https

返回参数

名称 类型 描述
RequestId String 请求ID
DomainConfigs String 对应的配置数据

特殊错误码

错误代码 描述 Http 状态码 语义
Throttling Request was denied due to request throttling. 503 请求被流量控制限制
IllegalOperation Illegal domain, operation is not permitted. 403 非法域名, 无法操作
OperationDenied Your account does not open CDN service yet. 403 未开通CDN服务
OperationDenied Your CDN service is suspended. 403 CDN服务已被停止
InvalidDomain.NotFound The domain provided does not belong to you. 404 域名不存在或不属于当前用户
InvalidDomain.Offline The domain provided is offline. 404 域名已下线
ServiceBusy The specified Domain is configuring, please retry later. 403 域名正在配置中, 请稍后再试
InvalidDomain.Configure_failed Failed to configure the provided domain. 500 域名配置失败
InvalidConfigList.ValueNotSupported The specified value of parameter ConfigList is not supported. 400 指定的 ConfigList 值不合法(只支持以上13种配置)
MissingParameter The specified value of parameter DomainName is not valid. 400 缺少DomainName参数

公共错误码请查看

示例

请求示例:

  1. http://cdn.aliyuncs.com?Action=DescribeDomainConfigs&DomainName=test.com
  2. &ConfigList="cache_expired,cc,page_compress"
  3. &<公共请求参数>

返回示例:

JSON格式

  1. {
  2. "DomainConfigs": {
  3. "PageCompressConfig": {
  4. "Enable": "off"
  5. },
  6. "WafConfig": {
  7. "Enable": "off"
  8. },
  9. "IgnoreQueryStringConfig": {
  10. "Enable": "on"
  11. },
  12. "VideoSeekConfig": {
  13. "Enable": "on"
  14. },
  15. "ReqAuthConfig": {
  16. "Key1": "vadfawerq",
  17. "Key2":"Acbdert",
  18. "AuthType": "type_c"
  19. },
  20. "RangeConfig": {
  21. "Enable": "on"
  22. },
  23. "SrcHostConfig": {
  24. "DomainName": "www.aliyun.com"
  25. },
  26. "OptimizeConfig": {
  27. "Enable": "off"
  28. },
  29. "ErrorPageConfig": {
  30. "PageType": "charity",
  31. "CustomPageUrl": "http://promotion.alicdn.com/help/oss/error.html",
  32. "ErrorCode": "404"
  33. },
  34. "RefererConfig": {
  35. "AllowEmpty": "on",
  36. "ReferType": "block",
  37. "ReferList": "www.google.com"
  38. },
  39. "CcConfig": {
  40. "Enable":"on",
  41. "AllowIps":"1.2.3.4",
  42. "BlockIps":"3.4.5.6"
  43. },
  44. "HttpHeaderConfigs": {
  45. "HttpHeaderConfig": [
  46. {
  47. "Status": "success",
  48. "HeaderKey": "content-type",
  49. "ConfigId": "602016",
  50. "HeaderValue": "application"
  51. },
  52. {
  53. "Status": "testing",
  54. "HeaderKey": "content-type",
  55. "ConfigId": "608841",
  56. "HeaderValue": "app"
  57. },
  58. {
  59. "Status": "success",
  60. "HeaderKey": "cache-control",
  61. "ConfigId": "602018",
  62. "HeaderValue": "application"
  63. },
  64. {
  65. "Status": "success",
  66. "HeaderKey": "content-disposition",
  67. "ConfigId": "602021",
  68. "HeaderValue": "application"
  69. },
  70. {
  71. "Status": "success",
  72. "HeaderKey": "content-language",
  73. "ConfigId": "602024",
  74. "HeaderValue": "application"
  75. },
  76. {
  77. "Status": "success",
  78. "HeaderKey": "expires",
  79. "ConfigId": "602026",
  80. "HeaderValue": "application"
  81. },
  82. {
  83. "Status": "success",
  84. "HeaderKey": "access-control-allow-origin",
  85. "ConfigId": "602036",
  86. "HeaderValue": "application"
  87. },
  88. {
  89. "Status": "success",
  90. "HeaderKey": "access-control-allow-methods",
  91. "ConfigId": "602038",
  92. "HeaderValue": "application"
  93. },
  94. {
  95. "Status": "success",
  96. "HeaderKey": "access-control-max-age",
  97. "ConfigId": "602040",
  98. "HeaderValue": "application"
  99. },
  100. {
  101. "Status": "success",
  102. "HeaderKey": "content-type",
  103. "ConfigId": "609871",
  104. "HeaderValue": "bbbb"
  105. }
  106. ]
  107. },
  108. "CacheExpiredConfigs": {
  109. "CacheExpiredConfig": [
  110. {
  111. "Status": "testing",
  112. "TTL": "1000",
  113. "CacheType": "suffix",
  114. "CacheContent": "jpeg",
  115. "Weight":"1",
  116. "ConfigId": "604991"
  117. },
  118. {
  119. "Status": "testing",
  120. "TTL": "600",
  121. "CacheType": "suffix",
  122. "CacheContent": "jpg,png",
  123. "Weight":"99",
  124. "ConfigId": "607216"
  125. },
  126. {
  127. "Status": "success",
  128. "TTL": "99",
  129. "CacheType": "suffix",
  130. "CacheContent": "ppp",
  131. "ConfigId": "609865"
  132. },
  133. {
  134. "Status": "testing",
  135. "TTL": "300",
  136. "CacheType": "path",
  137. "CacheContent": "/bmp",
  138. "ConfigId": "606402"
  139. },
  140. {
  141. "Status": "testing",
  142. "TTL": "600",
  143. "CacheType": "path",
  144. "CacheContent": "/static/html/",
  145. "ConfigId": "607206"
  146. },
  147. {
  148. "Status": "success",
  149. "TTL": "100",
  150. "CacheType": "path",
  151. "CacheContent": "/abc/def",
  152. "ConfigId": "609853"
  153. }
  154. ]
  155. },
  156. "NotifyUrlConfig": {
  157. "Enable":"on",
  158. "NotifyUrl":"http://test.com"
  159. },
  160. "RedirectTypeConfig": {
  161. "RedirectType": "Https"
  162. },
  163. },
  164. "RequestId": "67E027D8-7A58-4599-B17A-63E9A54FC54F"
  165. }

XML格式:

  1. <DomainConfigs>
  2. <PageCompressConfig>
  3. <Enable>off</Enable>
  4. </PageCompressConfig>
  5. <WafConfig>
  6. <Enable>off</Enable>
  7. </WafConfig>
  8. <IgnoreQueryStringConfig>
  9. <Enable>on</Enable>
  10. </IgnoreQueryStringConfig>
  11. <VideoSeekConfig>
  12. <Enable>on</Enable>
  13. </VideoSeekConfig>
  14. <ReqAuthConfig>
  15. <Key1>vadfawerq</Key1>
  16. <Key2>Acbdert</Key2>
  17. <AuthType>wangsu</AuthType>
  18. </ReqAuthConfig>
  19. <RangeConfig>
  20. <Enable>on</Enable>
  21. </RangeConfig>
  22. <SrcHostConfig>
  23. <DomainName>www.aliyun.com</DomainName>
  24. </SrcHostConfig>
  25. <OptimizeConfig>
  26. <Enable>off</Enable>
  27. </OptimizeConfig>
  28. <ErrorPageConfig>
  29. <PageType>charity</PageType>
  30. <CustomPageUrl>http://promotion.alicdn.com/help/oss/error.html</CustomPageUrl>
  31. <ErrorCode>404</ErrorCode>
  32. </ErrorPageConfig>
  33. <RefererConfig>
  34. <AllowEmpty>on</AllowEmpty>
  35. <ReferType>block</ReferType>
  36. <ReferList>www.google.com</ReferList>
  37. </RefererConfig>
  38. <CcConfig>
  39. <Enable>on</Enable>
  40. <AllowIps>1.2.3.4</AllowIps>
  41. <BlockIps>3.4.5.6</BlockIps>
  42. </CcConfig>
  43. <HttpHeaderConfigs>
  44. <HttpHeaderConfig>
  45. <Status>success</Status>
  46. <HeaderKey>content-type</HeaderKey>
  47. <ConfigId>602016</ConfigId>
  48. <HeaderValue>application</HeaderValue>
  49. </HttpHeaderConfig>
  50. <HttpHeaderConfig>
  51. <Status>testing</Status>
  52. <HeaderKey>content-type</HeaderKey>
  53. <ConfigId>608841</ConfigId>
  54. <HeaderValue>app</HeaderValue>
  55. </HttpHeaderConfig>
  56. <HttpHeaderConfig>
  57. <Status>success</Status>
  58. <HeaderKey>cache-control</HeaderKey>
  59. <ConfigId>602018</ConfigId>
  60. <HeaderValue>application</HeaderValue>
  61. </HttpHeaderConfig>
  62. <HttpHeaderConfig>
  63. <Status>success</Status>
  64. <HeaderKey>content-disposition</HeaderKey>
  65. <ConfigId>602021</ConfigId>
  66. <HeaderValue>application</HeaderValue>
  67. </HttpHeaderConfig>
  68. <HttpHeaderConfig>
  69. <Status>success</Status>
  70. <HeaderKey>content-language</HeaderKey>
  71. <ConfigId>602024</ConfigId>
  72. <HeaderValue>application</HeaderValue>
  73. </HttpHeaderConfig>
  74. <HttpHeaderConfig>
  75. <Status>success</Status>
  76. <HeaderKey>expires</HeaderKey>
  77. <ConfigId>602026</ConfigId>
  78. <HeaderValue>application</HeaderValue>
  79. </HttpHeaderConfig>
  80. <HttpHeaderConfig>
  81. <Status>success</Status>
  82. <HeaderKey>access-control-allow-origin</HeaderKey>
  83. <ConfigId>602036</ConfigId>
  84. <HeaderValue>application</HeaderValue>
  85. </HttpHeaderConfig>
  86. <HttpHeaderConfig>
  87. <Status>success</Status>
  88. <HeaderKey>access-control-allow-methods</HeaderKey>
  89. <ConfigId>602038</ConfigId>
  90. <HeaderValue>application</HeaderValue>
  91. </HttpHeaderConfig>
  92. <HttpHeaderConfig>
  93. <Status>success</Status>
  94. <HeaderKey>access-control-max-age</HeaderKey>
  95. <ConfigId>602040</ConfigId>
  96. <HeaderValue>application</HeaderValue>
  97. </HttpHeaderConfig>
  98. <HttpHeaderConfig>
  99. <Status>success</Status>
  100. <HeaderKey>content-type</HeaderKey>
  101. <ConfigId>609871</ConfigId>
  102. <HeaderValue>bbbb</HeaderValue>
  103. </HttpHeaderConfig>
  104. </HttpHeaderConfigs>
  105. <CacheExpiredConfigs>
  106. <CacheExpiredConfig>
  107. <Status>testing</Status>
  108. <TTL>1000</TTL>
  109. <CacheType>suffix</CacheType>
  110. <CacheContent>jpeg</CacheContent>
  111. <ConfigId>604991</ConfigId>
  112. </CacheExpiredConfig>
  113. <CacheExpiredConfig>
  114. <Status>testing</Status>
  115. <TTL>600</TTL>
  116. <CacheType>suffix</CacheType>
  117. <CacheContent>jpg,png</CacheContent>
  118. <ConfigId>607216</ConfigId>
  119. </CacheExpiredConfig>
  120. <CacheExpiredConfig>
  121. <Status>success</Status>
  122. <TTL>99</TTL>
  123. <CacheType>suffix</CacheType>
  124. <CacheContent>ppp</CacheContent>
  125. <ConfigId>609865</ConfigId>
  126. </CacheExpiredConfig>
  127. <CacheExpiredConfig>
  128. <Status>testing</Status>
  129. <TTL>300</TTL>
  130. <CacheType>path</CacheType>
  131. <CacheContent>/bmp</CacheContent>
  132. <ConfigId>606402</ConfigId>
  133. </CacheExpiredConfig>
  134. <CacheExpiredConfig>
  135. <Status>testing</Status>
  136. <TTL>600</TTL>
  137. <CacheType>path</CacheType>
  138. <CacheContent>/static/html/</CacheContent>
  139. <ConfigId>607206</ConfigId>
  140. </CacheExpiredConfig>
  141. <CacheExpiredConfig>
  142. <Status>success</Status>
  143. <TTL>100</TTL>
  144. <CacheType>path</CacheType>
  145. <CacheContent>/abc/def</CacheContent>
  146. <ConfigId>609853</ConfigId>
  147. </CacheExpiredConfig>
  148. </CacheExpiredConfigs>
  149. <RedirectTypeConfig>
  150. <RedirectType>Https</RedirectType>
  151. </RedirectTypeConfig>
  152. </DomainConfigs>
  153. <RequestId>67E027D8-7A58-4599-B17A-63E9A54FC54F</RequestId>
本文导读目录