开发者社区> 问答> 正文

如何查询域名配置?



描述


获取指定加速域名的配置

请求参数

参数类型必要描述
ActionString操作接口名,系统规定参数 取值:DescribeDomainConfigs
DomainNameString需要接入CDN的域名
ConfigListString需要查询的配置,多个配置用逗号(半角)分隔,当前支持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_expiredString目录或文件过期配置
ccStringCC防护功能、IP黑白名单配置
error_pageString自定义404错误页面跳转
http_headerString自定义http头
optimizeString页面优化
page_compressString智能压缩
ignore_query_stringString过滤参数
rangeStringrange回源功能
refererStringRefer防盗链功能
req_authString访问鉴权配置
src_hostString回源host
video_seekString拖拽播放功能
wafStringWaf防护功能
notify_urlString视频直播notify url
redirect_typeString强制访问跳转方式, 取值: Off, Http, Https


返回参数

名称类型描述
RequestIdString请求ID
DomainConfigsString对应的配置数据


特殊错误码

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

公共错误码请 查看

示例


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


返回示例:
JSON格式 {
    "DomainConfigs": {
        "PageCompressConfig": {
            "Enable": "off"
        },
        "WafConfig": {
            "Enable": "off"
        },
        "IgnoreQueryStringConfig": {
            "Enable": "on"
        },
        "VideoSeekConfig": {
            "Enable": "on"
        },
        "ReqAuthConfig": {
            "Key1": "vadfawerq",
            "Key2":"Acbdert",
            "AuthType": "type_c"
        },
        "RangeConfig": {
            "Enable": "on"
        },
        "SrcHostConfig": {
            "DomainName": "www.aliyun.com"
        },
        "OptimizeConfig": {
            "Enable": "off"
        },
        "ErrorPageConfig": {
            "PageType": "charity",
            "CustomPageUrl": "http://promotion.alicdn.com/help/oss/error.html",
            "ErrorCode": "404"
        },
        "RefererConfig": {
            "AllowEmpty": "on",
            "ReferType": "block",
            "ReferList": "www.google.com"
        },
        "CcConfig": {
            "Enable":"on",
            "AllowIps":"1.2.3.4",
            "BlockIps":"3.4.5.6"
        },
        "HttpHeaderConfigs": {
            "HttpHeaderConfig": [
                {
                    "Status": "success",
                    "HeaderKey": "content-type",
                    "ConfigId": "602016",
                    "HeaderValue": "application"
                },
                {
                    "Status": "testing",
                    "HeaderKey": "content-type",
                    "ConfigId": "608841",
                    "HeaderValue": "app"
                },
                {
                    "Status": "success",
                    "HeaderKey": "cache-control",
                    "ConfigId": "602018",
                    "HeaderValue": "application"
                },
                {
                    "Status": "success",
                    "HeaderKey": "content-disposition",
                    "ConfigId": "602021",
                    "HeaderValue": "application"
                },
                {
                    "Status": "success",
                    "HeaderKey": "content-language",
                    "ConfigId": "602024",
                    "HeaderValue": "application"
                },
                {
                    "Status": "success",
                    "HeaderKey": "expires",
                    "ConfigId": "602026",
                    "HeaderValue": "application"
                },
                {
                    "Status": "success",
                    "HeaderKey": "access-control-allow-origin",
                    "ConfigId": "602036",
                    "HeaderValue": "application"
                },
                {
                    "Status": "success",
                    "HeaderKey": "access-control-allow-methods",
                    "ConfigId": "602038",
                    "HeaderValue": "application"
                },
                {
                    "Status": "success",
                    "HeaderKey": "access-control-max-age",
                    "ConfigId": "602040",
                    "HeaderValue": "application"
                },
                {
                    "Status": "success",
                    "HeaderKey": "content-type",
                    "ConfigId": "609871",
                    "HeaderValue": "bbbb"
                }
            ]
        },
        "CacheExpiredConfigs": {
            "CacheExpiredConfig": [
                {
                    "Status": "testing",
                    "TTL": "1000",
                    "CacheType": "suffix",
                    "CacheContent": "jpeg",
                    "Weight":"1",
                    "ConfigId": "604991"
                },
                {
                    "Status": "testing",
                    "TTL": "600",
                    "CacheType": "suffix",
                    "CacheContent": "jpg,png",
                    "Weight":"99",
                    "ConfigId": "607216"
                },
                {
                    "Status": "success",
                    "TTL": "99",
                    "CacheType": "suffix",
                    "CacheContent": "ppp",
                    "ConfigId": "609865"
                },
                {
                    "Status": "testing",
                    "TTL": "300",
                    "CacheType": "path",
                    "CacheContent": "/bmp",
                    "ConfigId": "606402"
                },
                {
                    "Status": "testing",
                    "TTL": "600",
                    "CacheType": "path",
                    "CacheContent": "/static/html/",
                    "ConfigId": "607206"
                },
                {
                    "Status": "success",
                    "TTL": "100",
                    "CacheType": "path",
                    "CacheContent": "/abc/def",
                    "ConfigId": "609853"
                }

            ]
        },
        "NotifyUrlConfig": {
            "Enable":"on",
            "NotifyUrl":"http://test.com"
        },
        "RedirectTypeConfig": {
            "RedirectType": "Https"
        },
    },
    "RequestId": "67E027D8-7A58-4599-B17A-63E9A54FC54F"
}


XML格式: <DomainConfigs>
    <PageCompressConfig>
        <Enable>off</Enable>
    </PageCompressConfig>
    <WafConfig>
        <Enable>off</Enable>
    </WafConfig>
    <IgnoreQueryStringConfig>
        <Enable>on</Enable>
    </IgnoreQueryStringConfig>
    <VideoSeekConfig>
        <Enable>on</Enable>
    </VideoSeekConfig>
    <ReqAuthConfig>
        <Key1>vadfawerq</Key1>
        <Key2>Acbdert</Key2>
        <AuthType>wangsu</AuthType>
    </ReqAuthConfig>
    <RangeConfig>
        <Enable>on</Enable>
    </RangeConfig>
    <SrcHostConfig>
        <DomainName>www.aliyun.com</DomainName>
    </SrcHostConfig>
    <OptimizeConfig>
        <Enable>off</Enable>
    </OptimizeConfig>
    <ErrorPageConfig>
        <PageType>charity</PageType>
        <CustomPageUrl>http://promotion.alicdn.com/help/oss/error.html</CustomPageUrl>
        <ErrorCode>404</ErrorCode>
    </ErrorPageConfig>
    <RefererConfig>
        <AllowEmpty>on</AllowEmpty>
        <ReferType>block</ReferType>
        <ReferList>www.google.com</ReferList>
    </RefererConfig>
    <CcConfig>
        <Enable>on</Enable>
        <AllowIps>1.2.3.4</AllowIps>
        <BlockIps>3.4.5.6</BlockIps>
    </CcConfig>
    <HttpHeaderConfigs>
        <HttpHeaderConfig>
            <Status>success</Status>
            <HeaderKey>content-type</HeaderKey>
            <ConfigId>602016</ConfigId>
            <HeaderValue>application</HeaderValue>
        </HttpHeaderConfig>
        <HttpHeaderConfig>
            <Status>testing</Status>
            <HeaderKey>content-type</HeaderKey>
            <ConfigId>608841</ConfigId>
            <HeaderValue>app</HeaderValue>
        </HttpHeaderConfig>
        <HttpHeaderConfig>
            <Status>success</Status>
            <HeaderKey>cache-control</HeaderKey>
            <ConfigId>602018</ConfigId>
            <HeaderValue>application</HeaderValue>
        </HttpHeaderConfig>
        <HttpHeaderConfig>
            <Status>success</Status>
            <HeaderKey>content-disposition</HeaderKey>
            <ConfigId>602021</ConfigId>
            <HeaderValue>application</HeaderValue>
        </HttpHeaderConfig>
        <HttpHeaderConfig>
            <Status>success</Status>
            <HeaderKey>content-language</HeaderKey>
            <ConfigId>602024</ConfigId>
            <HeaderValue>application</HeaderValue>
        </HttpHeaderConfig>
        <HttpHeaderConfig>
            <Status>success</Status>
            <HeaderKey>expires</HeaderKey>
            <ConfigId>602026</ConfigId>
            <HeaderValue>application</HeaderValue>
        </HttpHeaderConfig>
        <HttpHeaderConfig>
            <Status>success</Status>
            <HeaderKey>access-control-allow-origin</HeaderKey>
            <ConfigId>602036</ConfigId>
            <HeaderValue>application</HeaderValue>
        </HttpHeaderConfig>
        <HttpHeaderConfig>
            <Status>success</Status>
            <HeaderKey>access-control-allow-methods</HeaderKey>
            <ConfigId>602038</ConfigId>
            <HeaderValue>application</HeaderValue>
        </HttpHeaderConfig>
        <HttpHeaderConfig>
            <Status>success</Status>
            <HeaderKey>access-control-max-age</HeaderKey>
            <ConfigId>602040</ConfigId>
            <HeaderValue>application</HeaderValue>
        </HttpHeaderConfig>
        <HttpHeaderConfig>
            <Status>success</Status>
            <HeaderKey>content-type</HeaderKey>
            <ConfigId>609871</ConfigId>
            <HeaderValue>bbbb</HeaderValue>
        </HttpHeaderConfig>
    </HttpHeaderConfigs>
    <CacheExpiredConfigs>
        <CacheExpiredConfig>
            <Status>testing</Status>
            <TTL>1000</TTL>
            <CacheType>suffix</CacheType>
            <CacheContent>jpeg</CacheContent>
            <ConfigId>604991</ConfigId>
        </CacheExpiredConfig>
        <CacheExpiredConfig>
            <Status>testing</Status>
            <TTL>600</TTL>
            <CacheType>suffix</CacheType>
            <CacheContent>jpg,png</CacheContent>
            <ConfigId>607216</ConfigId>
        </CacheExpiredConfig>
        <CacheExpiredConfig>
            <Status>success</Status>
            <TTL>99</TTL>
            <CacheType>suffix</CacheType>
            <CacheContent>ppp</CacheContent>
            <ConfigId>609865</ConfigId>
        </CacheExpiredConfig>
        <CacheExpiredConfig>
            <Status>testing</Status>
            <TTL>300</TTL>
            <CacheType>path</CacheType>
            <CacheContent>/bmp</CacheContent>
            <ConfigId>606402</ConfigId>
        </CacheExpiredConfig>
        <CacheExpiredConfig>
            <Status>testing</Status>
            <TTL>600</TTL>
            <CacheType>path</CacheType>
            <CacheContent>/static/html/</CacheContent>
            <ConfigId>607206</ConfigId>
        </CacheExpiredConfig>
        <CacheExpiredConfig>
            <Status>success</Status>
            <TTL>100</TTL>
            <CacheType>path</CacheType>
            <CacheContent>/abc/def</CacheContent>
            <ConfigId>609853</ConfigId>
        </CacheExpiredConfig>
    </CacheExpiredConfigs>
    <RedirectTypeConfig>
        <RedirectType>Https</RedirectType>
    </RedirectTypeConfig>
</DomainConfigs>
<RequestId>67E027D8-7A58-4599-B17A-63E9A54FC54F</RequestId>

展开
收起
青衫无名 2017-10-24 10:27:04 2512 0
0 条回答
写回答
取消 提交回答
问答排行榜
最热
最新

相关电子书

更多
创新改变行业——释放域名生态的力量 立即下载
“域”见更美好的未来——域名筑梦互联网+ 立即下载
“域”感——《域名投资从入门到精通》 立即下载