Queries the configurations of an accelerated domain name.
Operation description
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
Authorization information
There is currently no authorization information disclosed in the API.
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
DomainName | string | Yes | The accelerated domain name. You can specify only one domain name in each request. | example.com |
FunctionNames | string | No | The names of the features to query. Separate features with commas (,). | filetype_based_ttl_set,set_req_host_header |
ConfigId | string | No | The ID of the configuration. | 5003576 |
The following table describes the supported features.
Feature | Parameters |
---|---|
referer_white_list_set: configures a Referer whitelist for hotlink protection. | refer_domain_allow_list: 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 DCDN resources. Valid values: on and off. |
referer_black_list_set: configures a Referer blacklist for hotlink protection. | refer_domain_deny_list: 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 DCDN resources. Valid values: on and off. |
filetype_based_ttl_set: configures an expiration rule for specified file types. | ttl: the time period after which the cached resources expire. Unit: seconds.file_type: the file type. Separate multiple file types with commas (,), such as, TXT,JPG.weight: the weight of the file in the cache. |
path_based_ttl_set: configures an expiration rule for a specific directory. | ttl: the time period after which the cached resources expire. Unit: seconds.path: the directory. The directory must start with a forward slash (/).weight: the weight of the file in the cache. |
oss_auth: configures authentication for requests destined for an Object Storage Service (OSS) bucket. | oss_bucket_id: the address of the OSS bucket. |
ip_black_list_set: configures an IP address blacklist. | ip_list: 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: 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: the error code.rewrite_page: the page to which the error page is redirected. |
set_req_host_header: configures the custom header for requests that are redirected to the origin server. | domain_name: a domain name that is used as the origin host. |
set_hashkey_args: ignores URL parameters. | hashkey_args: the parameters to be reserved. Separate multiple parameters with commas (,). You can specify up to 10 parameters to be reserved.disable: specifies whether to ignore all parameters. Valid values: on and off. The hashkey_args setting has a higher priority. Even if you set this parameter to on, the parameters that are specified by the hashkey_args parameter are retained.keep_oss_args: specifies whether to retain all URL parameters in requests before they are redirected to origin servers. A value of on indicates that all URL parameters are retained in requests before they are redirected to origin servers. A value of off indicates that only the parameters specified in hashkey_args are retained. |
aliauth: configures Alibaba Cloud URL signing. | auth_type: the URL signing type. no_auth: disables URL signing. type_a: enables type A signing. type_b: enables type B signing. type_c: enables type C signing.auth_key1: specifies the primary cryptographic key. auth_key2: specifies the secondary cryptographic key.ali_auth_delta: the custom buffer time for authentication. |
set_resp_header: configures an HTTP response header. To verify the setting, you can check responses in a browser. | key: the response header. This parameter is required.value (Required): specifies the content of the response header. Enter "null" if you want to delete the header.header_operation_type: specifies the operation 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: searches for the source of the response header.header_destination: replaces the response header.match_all: specifies whether to match all queries. Valid values: on and off. |
https_force: forces redirection over HTTPS. | enable: specifies whether to enable this feature. Valid values: on and off. |
https_force: forces redirection over 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: 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: the filename extension for static content.static_route_url: the URI of the static content.static_route_path: the path of the static content.dynamic_route_origin: specifies the scheme of the back-to-origin route. 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: a custom HTTP header for requests that are redirected to the origin server. | key: the name of the request header.value: the content of the header field for the origin request. |
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: the custom start parameters for MP4 files.mp4_seek_end: the custom end parameter for MP4 files.flv_seek_start: the custom start parameters for FLV files.flv_seek_end: the custom end parameter for FLV files. |
websocket: configures WebSocket. | enabled: specifies whether to enable the feature. This parameter is required. Valid values: on and off.dynamic_route_origin: the origin protocol policy. Valid values: http, https, and follow.heartbeat: the heartbeat interval. Unit: seconds. Valid values: 1 to 300. Default value: 60. |
ali_remove_args: deletes URL parameters. | ali_remove_args: the parameters to be deleted. Separate multiple parameters with spaces. The remaining parameters are used as the URL parameters in hashkey_args. This parameter is required.keep_oss_args: specifies whether to retain 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: millisecond. We recommend that you set the value to 5184000000 milliseconds. 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: 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: required. This parameter specifies TTL values for HTTP status codes. Separate multiple TTL settings with commas (,). Example: 302=0,301=0,4xx=2. |
path_force_ttl_code: configures an expiration rule for directory status codes. | path: a directory. It must start with a forward slash (/), such as, /image. This parameter is required.code_string: required. This parameter specifies TTL values for HTTP status codes. Separate multiple TTL settings with commas (,). 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 trim JavaScript code of HTML pages. Valid values: on and off.trim_css: specifies whether to trim 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 (required) It specifies an origin SNI. |
protogw: configures IP Application Accelerator (IPA). | realip: 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: the description in a string. |
host_redirect: configures the rewrite feature. | regex: the URL to be rewritten, such as, ^/$.replacement: specifies the final URL, for example, /go/act/sale/tbzlsy.php.flag: the action. Valid values: redirect and break. |
forward_timeout: configures the timeout period for requests that are redirected to the origin server. | forward_timeout: 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 an edge script. | rule (required): the domain-specific language (DSL) script.pri (required): the priority.enable: specifies whether to enable the script. This parameter is required. Valid values: on and off.name: the name of the rule.pos: the position from which to execute the script. 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: the extension 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 values: 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: the compression level. Valid values: 1 to 11. |
ali_ua: configures a User-Agent whitelist or blacklist. | ua: the User-Agent that you want to add to the list.type: the type of the User-Agent list. Valid values: black and white. |
Response parameters
Examples
Sample success responses
JSON
format
{
"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"
}
]
}
}
]
}
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | Invalid%s.ValueNotSupported | FunctionName [%s] is not supported. | The specified configuration is not supported. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-03-27 | The Error code has changed | View Change Details |