Queries the configurations of an accelerated domain name.

Note
  • You can query the configurations of one or more features in a request.
  • You can call this operation up to 30 times per second per account.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes DescribeDcdnDomainConfigs

The operation that you want to perform. Set the value to DescribeDcdnDomainConfigs.

DomainName String Yes example.com

The accelerated domain name. You can specify only one domain name in each call.

FunctionNames String Yes filetype_based_ttl_set,set_req_host_header

The names of the features to query. Separate features with commas (,).

ConfigId String No 5003576

The ID of the configuration.

The following table describes the supported features.

Feature

Parameter

referer_white_list_set: configures a referer whitelist for hotlink protection.

refer_domain_allow_list: specifies the referers to be added to the whitelist. Separate multiple referers with commas (,).

allow_empty: specifies whether requests with an empty referer header are allowed to access resources cached on Dynamic Route for CDN (DCDN). Valid values: on and off.

referer_black_list_set: configures a referer blacklist for hotlink protection.

refer_domain_deny_list: specifies the referers to be added to the blacklist. Separate multiple referers with commas (,).

allow_empty: specifies whether requests with an empty referer header are allowed to access resources cached on DCDN. Valid values: on and off.

filetype_based_ttl_set: configures an expiration rule for specified file types.

ttl: specifies the time period after which the cached resources expire. Unit: seconds.

file_type: specifies the file types. Separate multiple file types with commas (,), such as, TXT,JPG.

weight: specifies the weight of the expiration rule.

path_based_ttl_set: configures an expiration rule for a specific directory.

ttl: specifies the time period after which the cached resources expire. Unit: seconds.

path: specifies a directory. It must start with a forward slash (/).

weight: specifies the weight of the expiration rule.

oss_auth: configures authentication for requests destined for an Object Storage Service (OSS) bucket.

oss_bucket_id: specifies the address of the OSS bucket.

ip_black_list_set: configures an IP address blacklist.

ip_list: specifies the IP addresses to be added to the blacklist. Separate multiple IP addresses with commas (,).

ip_allow_list_set: configures an IP address whitelist.

ip_list: specifies the IP addresses to be added to the whitelist. Separate multiple IP addresses with commas (,).

error_page: redirects an error page to a specified page.

error_code: specifies the error code.

rewrite_page: specifies the page to which error pages are redirected when the specified error occurs.

set_req_host_header: configures the custom header for requests that are redirected to the origin server.

domain_name: specifies a domain name that is used as the origin host.

set_hashkey_args: ignores URL parameters.

hashkey_args: specifies the parameters to be reserved. Separate multiple parameters with commas (,). You can specify up to 10 parameters to be reserved.

disable: A value of on indicates all parameters are ignored. A value of off indicates all parameters are reserved. The hashkey_args setting has a higher priority. Even if you have set this setting to on, the parameters specified in hashkey_args are reserved.

keep_oss_args: specifies whether to reserve all the origin parameters in back-to-origin requests. A value of on indicates that all the origin parameters in back-to-origin requests are reserved. A value of off indicates that only the parameters specified in hashkey_args are reserved.

aliauth: configures Alibaba Cloud authentication.

auth_type: specifies the authentication type. no_auth: disables authentication. type_a: enables authentication type A. type_b: enables authentication type B. type_c: enables authentication type C.

auth_key1: specifies the primary authentication key. auth_key2: specifies the secondary authentication key.

ali_auth_delta: customizes the buffer time for authentication.

set_resp_header: configures an HTTP response header. To verify the setting, you can check responses in a browser.

key: specifies the response header. This parameter is required.

value: specifies the value of the response header. This parameter is required. Enter null if you want to delete the header.

header_operation_type: specifies the action to be performed on the request header. Valid values: add, delete, modify, and rewrite.

duplicate: specifies whether to allow duplicate response headers. Valid values: on and off.

header_source: specifies the response header before the replacement.

header_destination: specifies the response header after the replacement.

match_all: specifies whether to match all queries. Valid values: on and off.

https_force: forces redirect to HTTPS.

enable: specifies whether to enable this feature. Valid values: on and off.

https_force: forces redirect to HTTP.

enable: specifies whether to enable this feature. Valid values: on and off.

https_option: configures basic HTTPS parameters.

http2: specifies whether to enable HTTP/2. Valid values: on and off.

ocsp_stapling: specifies whether to enable Online Certificate Status Protocol (OCSP) stapling. Valid values: on and off.

forward_scheme: configures the static origin protocol policy.

enable: specifies whether to enable this feature. Valid values: on and off.

scheme_origin: specifies the origin protocol policy. Valid values: http, https, and follow.

dynamic: configures the DCDN service.

enable: specifies whether to enable the feature. This parameter is required. Valid values: on and off.

static_route_type: specifies the filename extension for static content.

static_route_url: specifies the URI of the static content.

static_route_path: specifies the path of the static content.

dynamic_route_origin: specifies the back-to-origin routing scheme. Valid values: http, https, follow, and follow-port.

dynamic_route_round_robin: specifies whether to enable load balancing. Valid values: on and off.

dynamic_route_adapt_cache: specifies whether to enable adaptive caching. Valid values: on and off.

set_req_header: customizes an HTTP header for requests that are redirected to the origin server.

key: specifies the name of the request header.

value: specifies the value of the header.

l2_oss_key: retrieves content from private OSS buckets.

private_oss_auth: specifies whether to enable this feature. Valid values: on and off.

range: configures object chunking.

enable: specifies whether to enable the feature. Valid values: on and off.

video_seek: configures video seeking.

enable: specifies whether to enable the feature. This parameter is required. Valid values: on and off.

flv_seek_by_time: specifies whether to enable Flash Video (FLV) seeking by time. Valid values: on and off.

mp4_seek_start: customizes MP4 video start parameters.

mp4_seek_end: customizes MP4 video end parameters.

flv_seek_start: customizes FLV video start parameters.

flv_seek_end: customizes FLV video end parameters.

websocket: configures WebSocket.

enabled: specifies whether to enable the feature. This parameter is required. Valid values: on and off.

origin_scheme: specifies the origin protocol policy. Valid values: http, https, and follow.

heartbeat: specifies the heartbeat interval. Unit: seconds. Valid values: 1 to 300. Default value: 60.

ali_remove_args: deletes URL parameters.

ali_remove_args: specifies the parameters to be deleted. Separate multiple parameters with spaces. The remaining parameters are used as the URL parameters in hashkey_args. The ali_remove_args parameter is required.

keep_oss_args: specifies whether to reserve URL parameters in requests before they are redirected to origin servers. A value of on indicates that all URL parameters are reserved in requests before they are redirected to origin servers. A value of off indicates that only the parameters in hashkey_args are reserved.

https_tls_version: configures the TLS protocol.

tls10: specifies whether to enable TLS 1.0. Valid values: on and off. Default value: on.

tls11: specifies whether to enable TLS 1.1. Valid values: on and off. Default value: on.

tls12: specifies whether to enable TLS 1.2. Valid values: on and off. Default value: on.

tls13: specifies whether to enable TLS 1.3. Valid values: on and off. Default value: off.

HSTS: configures HTTP Strict Transport Security (HSTS).

enabled: specifies whether to enable the feature. This parameter is required. Valid values: on and off. Default value: off.

https_hsts_max_age: specifies the validity period of the HSTS policy. This parameter is required. Unit: milliseconds. We recommend that you set the value to 5184000000. This value equals 60 days.

https_hsts_include_subdomains: specifies whether the HSTS header contains the includeSubDomains parameter. Valid values: on and off. Proceed with caution when you enable this feature. Make sure that HTTPS is enabled for all the subdomains of the accelerated domain name. Otherwise, the HTTPS URLs to which requests are redirected from the subdomains become inaccessible.

filetype_force_ttl_code: configures an expiration rule for file status codes.

file_type: specifies the file type. You can specify one or more file types. Separate multiple file types with commas (,), such as TXT,JPG. This parameter is required.

code_string: specifies the HTTP status codes. Separate multiple status codes with commas (,). This parameter is required. Example: 302=0,301=0,4xx=2.

path_force_ttl_code: configures an expiration rule for directory status codes.

path: specifies a directory. It must start with a forward slash (/), such as, /image. This parameter is required.

code_string: specifies the HTTP status codes. Separate multiple status codes with commas (,). This parameter is required. Example: 302=0,301=0,4xx=2.

gzip: configures gzip compression.

enable: specifies whether to enable this feature. This parameter is required. Valid values: on and off.

tesla: configures page optimization.

enable: specifies whether to enable this feature. This parameter is required. Valid values: on and off.

trim_js: specifies whether to optimize the JavaScript code of HTML pages. Valid values: on and off.

trim_css: specifies whether to optimize the CSS code of HTML pages. Valid values: on and off.

https_origin_sni: configures origin Server Name Indication (SNI) settings.

enabled: specifies whether to enable the feature. Valid values: on and off.

https_origin_sni: specifies the origin SNI settings. This parameter is required.

protogw: configures IP Application Accelerator (IPA).

realip: specifies the transparent proxy mode for the origin server to obtain the real IP addresses of the clients. This parameter is required. Valid values: off, toa, and pp.

port: specifies the service port. This parameter is required.

patten: specifies the mode string.

host_redirect: configures the rewrite feature.

regex: specifies the URL to be rewritten, such as, ^/$.

replacement: specifies the final URL, such as, /go/act/sale/tbzlsy.php.

flag: Valid values are redirect and break.

forward_timeout: configures the timeout period for requests that are redirected to the origin server.

forward_timeout: specifies a time period, in seconds. We recommend that you set a value that is not greater than 100.

ipv6: configures IPv6.

switch: specifies whether to enable the feature. This parameter is required. Valid values: on and off.

region: specifies the region where you want to enable IPv6. You can enter an asterisk (*) to specify all regions.

edge_function: configures EdgeScript.

rule: specifies domain-specific language (DSL)-based scripts. This parameter is required.

pri: specifies the priority of the DSL script. This parameter is required.

enable: specifies whether to enable the script. This parameter is required. Valid values: on and off.

name: specifies the name of the script.

pos: specifies the position where the script is executed. For the accelerated domain names of DCDN, only the value of head is supported. The value of foot is not supported.

brk: After the current script is matched, the scripts after the specified position are skipped.

option: specifies an extension that is used to perform response header debugging.

grammar: specifies an extension that is used to specify the scripting language. Valid values: es2 and js. You can leave this parameter empty.

jsmode: specifies an extension that is used to manage the domain name whitelist in JavaScript. Valid value: redirect and bypass.

brotli: configures Brotli compression.

enable: specifies whether to enable this feature. This parameter is required. Valid values: on and off.

brotli_level: specifies the compression level. Valid values: 1 to 11.

ali_ua: configures a User-Agent whitelist or blacklist.

ua: specifies the User-Agent that you want to add to the list.

type: specifies the type of the User-Agent list. Valid values: black and white.

Response parameters

Parameter Type Example Description
RequestId String F8AA0364-0FDB-4AD5-AC74-D69FAB8924ED

The ID of the request.

DomainConfigs Array of DomainConfig

The configurations of the domain name.

DomainConfig
Status String success

The status of the configuration. Valid values:

  • success
  • testing
  • failed
  • configuring
ParentId String 1234567

The ID of the advanced condition configuration.

ConfigId String 5068995

The ID of the configuration.

FunctionName String set_req_host_header

The name of the feature.

FunctionArgs Array of FunctionArg

The configurations of the features.

FunctionArg
ArgName String ttl

The name of the configuration.

ArgValue String 13

The value of the configuration.

Examples

Sample requests

http(s)://dcdn.aliyuncs.com/?Action=DescribeDcdnDomainConfigs
&DomainName=example.com
&FunctionNames=filetype_based_ttl_set,set_req_host_header
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<DescribeDcdnDomainConfigsResponse>
    <RequestId>F8AA0364-0FDB-4AD5-AC74-D69FAB8924ED</RequestId>
    <DomainConfigs>
        <DomainConfig>
            <FunctionArgs>
                <FunctionArg>
                    <ArgName>domain_name</ArgName>
                    <ArgValue>testdcdn3.cdnpe.com</ArgValue>
                </FunctionArg>
            </FunctionArgs>
            <ConfigId>5003576</ConfigId>
            <FunctionName>set_req_host_header</FunctionName>
        </DomainConfig>
        <DomainConfig>
            <FunctionArgs>
                <FunctionArg>
                    <ArgName>file_type</ArgName>
                    <ArgValue>txt</ArgValue>
                </FunctionArg>
                <FunctionArg>
                    <ArgName>ttl</ArgName>
                    <ArgValue>13</ArgValue>
                </FunctionArg>
            </FunctionArgs>
            <ConfigId>5068995</ConfigId>
            <ParentId>1234567</ParentId>
            <FunctionName>filetype_based_ttl_set</FunctionName>
        </DomainConfig>
    </DomainConfigs>
</DescribeDcdnDomainConfigsResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "F8AA0364-0FDB-4AD5-AC74-D69FAB8924ED",
  "DomainConfigs" : {
    "DomainConfig" : [ {
      "FunctionArgs" : {
        "FunctionArg" : {
          "ArgName" : "domain_name",
          "ArgValue" : "testdcdn3.cdnpe.com"
        }
      },
      "ConfigId" : 5003576,
      "FunctionName" : "set_req_host_header"
    }, {
      "FunctionArgs" : {
        "FunctionArg" : [ {
          "ArgName" : "file_type",
          "ArgValue" : "txt"
        }, {
          "ArgName" : "ttl",
          "ArgValue" : 13
        } ]
      },
      "ConfigId" : 5068995,
      "ParentId" : 1234567,
      "FunctionName" : "filetype_based_ttl_set"
    } ]
  }
}

Error codes

HttpCode Error code Error message Description
400 Invalid%s.ValueNotSupported FunctionName [%s] is not supported. The error message returned because the value specified for the FunctionName parameter is invalid. Specify a valid value.

For a list of error codes, visit the API Error Center.