閱讀551 返回首頁    go 微信


查詢域名配置__配置操作接口_API 手冊_CDN-阿裏雲

描述

獲取指定加速域名的配置

請求參數

參數 類型 必要 描述
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參數

公共錯誤碼請查看

示例

請求示例:

https://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": "https://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":"https://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>https://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>

最後更新:2016-11-23 17:16:03

  上一篇:go 查詢操作餘量__刷新預熱接口_API 手冊_CDN-阿裏雲
  下一篇:go 設置頁麵優化__配置操作接口_API 手冊_CDN-阿裏雲