Deletes configurations of multiple accelerated domain names at a time.

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.

Note The maximum number of times that each user can call this operation per second is 30.

Request parameters

Parameter Type Required Example Description
Action String Yes BatchDeleteCdnDomainConfig

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

DomainNames String Yes example1.com,example2.com

The accelerated domain names whose configurations you want to delete. Separate accelerated domain names with commas (,).

FunctionNames String Yes referer_white_list_set,https_force

The features whose configurations you want to delete. Separate features with commas (,).

The following table describes the supported features.

Feature

Parameter

referer_white_list_set: configures a referer whitelist.

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

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

referer_black_list_set: configures a referer blacklist.

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

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

filetype_based_ttl_set: sets a time-to-live (TTL) value for specified file types.

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

file_type: specifies the file types. Separate file types with commas (,), for example, TXT,JPG.

weight: specifies the weight of the expiration rule. Maximum value: 99. Minimum value: 1. A greater value indicates a higher priority.

path_based_ttl_set: sets a TTL value for a specified directory.

ttl: specifies the period of time 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. Maximum value: 99. Minimum value: 1. A greater value indicates a higher priority.

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

oss_bucket_id: specifies the endpoint of the OSS bucket.

ip_black_list_set: configures an IP blacklist.

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

ip_allow_list_set: configures an IP whitelist.

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

ip_white_list_set: configures an IP whitelist for rate limiting.

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

error_page: redirects requests to a specified error page.

error_code: specifies the HTTP status code.

rewrite_page: specifies the error page to which requests are redirected when the specified HTTP status code occurs.

set_req_host_header: configures custom headers 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: retains specified URL parameters.

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

disable: specifies whether all parameters are ignored. A value of on indicates that all URL parameters are ignored. A value of off indicates that all URL parameters are retained. The hashkey_args setting has a higher priority. Even if you have set this parameter to on, the parameters specified by hashkey_args are retained.

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 parameters are retained during back-to-origin routing. A value of off indicates that only the parameters specified by hashkey_args are retained.

aliauth: configures Alibaba Cloud authentication.

auth_type: specifies the authentication type. no_auth: disables authentication. 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: 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. add: adds the request header. delete: deletes the request header. modify: modifies the request header. rewrite: rewrites the request header.

duplicate: specifies whether duplicate request headers are allowed. Valid values: on and off.

header_source: searches for the source of the request header.

header_destination: replaces the request header.

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

https_force: redirects requests from HTTP to HTTPS.

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

https_force: redirects requests from HTTPS to HTTP.

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

https_option: sets 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.

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

set_req_header is supported by version 1. We recommend that you use origin_request_header, which is supported by version 2 and provides more features.

key: specifies the name of the request header.

value: specifies the value of the request 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 this feature. Valid values: on, off, and force.

video_seek: configures video seeking.

enable: specifies whether to enable this 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.

ali_remove_args: deletes URL parameters.

ali_remove_args: specifies the parameters to be deleted. The remaining parameters are used as the URL parameters in hashkey_args. Separate parameters with spaces. The ali_remove_args 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 parameters are retained during back-to-origin routing. A value of off indicates that only the parameters specified by hashkey_args are retained.

https_tls_version: specifies the TLS version.

tls10: specifies whether to enable TLSv1.0. Default value: on. A value of on indicates that TLSv1.0 is enabled. A value of off indicates that TLSv1.0 is disabled.

tls11: specifies whether to enable TLSv1.1. Default value: on. A value of on indicates that TLSv1.1 is enabled. A value of off indicates that TLSv1.1 is disabled.

tls12: specifies whether to enable TLSv1.2. Default value: on. A value of on indicates that TLSv1.2 is enabled. A value of off indicates that TLSv1.2 is disabled.

tls13: specifies whether to enable TLSv1.3. Default value: on. A value of on indicates that TLSv1.3 is enabled. A value of off indicates that TLSv1.3 is disabled.

HSTS: configures HTTP Strict Transport Security (HSTS).

enabled: specifies whether to enable this 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: seconds. We recommend that you set the value to 5184000, which equals 60 days.

https_hsts_include_subdomains: specifies whether the HSTS header includes 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: specifies a time-to-live (TTL) value for HTTP status codes based on file types.

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

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

path_force_ttl_code: specifies a TTL value for HTTP status codes based on directories.

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

code_string: specifies the HTTP status codes. Separate 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 HTML 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 this feature. This parameter is required. Valid values: on and off.

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

limit_rate: configures traffic throttling for individual requests.

ali_limit_rate: specifies the maximum amount of data that can be transmitted per second after traffic throttling is triggered, such as 200 KB or 1 MB. Unit: byte/s. This parameter is required.

ali_limit_rate_after: specifies the maximum amount of data that can be transmitted before traffic throttling is triggered. Unit: byte/s.

traffic_limit_arg: specifies the name of the URL parameter based on which traffic throttling is triggered. Example: rate.

traffic_limit_unit: specifies the unit for traffic throttling. Valid values: k, m, and g. For example, when the ali_limit_rate_after parameter is set to 1, the maximum data transfer rate can be 1 MB/s, 1 KB/s, or 1 GB/s.

ali_limit_start_hour: specifies the start time of traffic throttling. Valid values: 0 to 24. Default: 0. The start time must be earlier than the end time.

ali_limit_end_hour: specifies the end time of traffic throttling. Valid values: 0 to 24. Default: 24. The end time must be later than the start time.

brotli: configures Brotli compression.

enable: specifies whether to enable the 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 agents that you want to add to the list.

type: the type of the list. A value of black indicates a blacklist. A value of white indicates a whitelist.

set_l2_req_header: configures HTTP headers for requests that are sent to L2 CDN edge nodes.

set_l2_req_header is supported by version 1. We recommend that you use origin_request_header, which is supported by version 2 and provides more features.

key: specifies the name of the header.

value: specifies the value of the header. Enter null if you want to delete the header.

host_redirect: configures URL rewrite.

regex: specifies the URL to be rewritten, for example, ^/$.

replacement: specifies the final URL, for example, /go/act/sale/tbzlsy.php.

flag: specifies the flag of the rewrite rule, such as 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.

ali_video_split: configures audio extraction.

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

ipv6: configures IPv6.

switch: specifies whether to enable IPv6. A value of on enables IPv6. A value of off disables IPv6. This parameter is required.

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

ali_video_preview: configures video preview.

enable: specifies whether to enable this feature. This parameter is required. Valid values: on and off. The video preview feature supports the TS and MP3 formats. For FLV and MP4 video files, visitors can advance and rewind videos.

ali_video_preview_argument: specifies the length of the videos that can be previewed by visitors. The parameter value must be measured in seconds. This parameter is required.

default_ttl_code: sets a TTL value for specified HTTP status codes.

default_ttl_code: specifies a TTL value for HTTP status codes. Unit: seconds. Example: 4xx=3, 200=3600, and 5xx=1. Separate HTTP status codes with commas (,). This parameter is required.

back_to_origin_argument_rewrite: configures parameter rewrite.

Action priorities: Add > Delete > Reserve > Modify. Separate parameters with spaces.

delete_argument: specifies the parameters to be deleted.

save_argument: specifies the parameters to be retained. Only the specified parameters are retained. The Add and Delete rules take effect at the same time.

ignore_all_argument: specifies whether to delete all parameters in requests that are redirected to the origin server. Valid values: on and off. However, parameters added by the Add action are reserved.

add_argument: specifies parameters to be added. The Add action has the highest priority.

modify_argument: specifies parameters to be modified. The Modify action has the lowest priority. Parameters specified by the Delete action are not retained.

back_to_origin_url_rewrite: configures URL rewrite.

source_url: specifies the URL to be rewritten. This parameter is required.

target_url: specifies the final URL. This parameter is required.

flag: specifies the flag of the rewrite rule. none: If multiple rules are configured, and the current rule is matched, the system continues to match the request against the other rules. break: If multiple rules are configured, and the current rule is matched, the other rules are skipped. Only the URI is written. The URL parameters remain unchanged. enhance_break: This flag is similar to break, but also writes the URL parameters and takes effect for FLV live streaming.

edge_function: configures EdgeScript.

Required parameters:

rule: specifies the content of the script.

pri: specifies the priority of the script. Valid values: 0 to 999. A value of 0 indicates the highest priority. A value of 999 indicates the lowest priority. The script that is executed at the head of the request processing pipeline and the script that is executed at the foot of the request processing pipeline are mutually exclusive.

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

Optional parameters:

name: specifies the name of the script. The name can contain letters, digits, and underscores (_).

pos: specifies the position where the script is executed. head: specifies that the script is executed at the head of the request processing pipeline. foot: specifies that the script is executed at the foot of the request processing pipeline. Default value: head.

brk: specifies whether to skip other scripts. on: If the current script is executed, other scripts are skipped. off: If the current script is executed, the system continues to match the request against the other scripts. This is the default value.

option: specifies extensions. Only _es_dbg=signature is supported, which enables debugging.

grammar: specifies the syntax of the script. es2: specifies that the script uses the es2 syntax, which is the EdgeScript syntax. This is the default value. js: specifies that the script uses the JavaScript syntax.

jsmode: specifies the JavaScript action. Valid values are redirect and bypass. redirect is the default value, which blocks requests. bypass allows requests to bypass.

follow_302: configures 302 redirection.

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

max_tries: specifies the maximum number of 302 redirects that can be performed. You can set the value to n+1. The value of n cannot be greater than 5. The default value is 3. In this case, the maximum number of redirects is three times (2+1=3).

aws_s3_bucket: specifies the Amazon Web Services (AWS) Simple Storage Service (S3) buckets that require authentication.

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

bucketname: specifies the names of the AWS S3 buckets.

accesskey: specifies the AWS access key ID. This parameter is required.

secretkey: specifies the AWS access key secret. This parameter is required.

region: specifies the Region where the AWS S3 bucket is deployed. This parameter is required.

origin_request_header: configures HTTP request headers.

header_operation_type: specifies the action to be performed on the request header. This parameter is required. add: adds the request header. delete: deletes the request header. modify: modifies the request header. rewrite: rewrites the request header.

header_name: specifies the name of the request header. This parameter is required.

header_value: specifies the value of the request header.

duplicate: specifies whether duplicate request headers are allowed. Valid values: on and off.

header_source: searches for the source of the request header.

header_destination: replaces the request header.

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

origin_response_header: configures HTTP response headers.

header_operation_type: specifies the action to be performed on the response header. This parameter is required. add: adds the response header. delete: deletes the response header. modify: modifies the response header. rewrite: rewrites the response header.

header_name: specifies the name of the response header. This parameter is required.

header_value: specifies the value of the response header.

duplicate: specifies whether duplicate response headers are allowed. 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 responses. Valid values: on and off.

Response parameters

Parameter Type Example Description
RequestId String 04F0F334-1335-436C-A1D7-6C044FE73368

The ID of the request.

Examples

Sample requests

http(s)://cdn.aliyuncs.com/?Action=BatchDeleteCdnDomainConfig
&DomainNames=example1.com,example2.com
&FunctionNames=referer_white_list_set,https_force
&<Common request parameters>

Sample success responses

XML format

<BatchDeleteCdnDomainConfigResponse>
  <RequestId>04F0F334-1335-436C-A1D7-6C044FE73368</RequestId>
</BatchDeleteCdnDomainConfigResponse>

JSON format

{
    "RequestId": "04F0F334-1335-436C-A1D7-6C044FE73368"
}

Error codes

HttpCode Error code Error message Description
400 Invalid%s.ValueNotSupported FunctionName [%s] is not supported. The error message returned because the FunctionName parameter is set to an invalid value.
400 DeleteFunctionFailed Batch delete functions failed. The error message returned because the system failed to delete the configurations of the specified accelerated domain names.

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