Configures domain names in batches.
Operation description
Obtain the live streaming domain names that you want to configure, and then call this operation to configure domain names in batches.
QPS limit
The maximum number of queries per second (QPS) per user for this operation is 30. If the limit is exceeded, API calls are throttled, which may affect your business. Call this operation as needed.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
live:BatchSetLiveDomainConfigs |
update |
*Domain
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| DomainNames |
string |
Yes |
The domain names that you want to configure in batches. The value can be an ingest domain, a primary streaming domain, or a secondary streaming domain. Separate multiple domain names with commas (,). |
demo.aliyundoc.com,example.aliyundoc.com,example.com |
| Functions |
string |
Yes |
The list of features. Some features, such as |
[{"functionArgs":[{"argName":"file_type","argValue":"jpg"},{"argName":"ttl","argValue":"18"},{"argName":"weight","argValue":"30"}],"functionName":"filetype_based_ttl_set","configId":506***}] |
| DryRun |
boolean |
No |
Specifies whether to perform only a dry run without actually executing the operation. Valid values:
The dry run validates parameter validity, RAM permissions, and resource status. If the dry run fails, the corresponding error code is returned. If the dry run succeeds, the operation is not actually executed. |
false |
Function format description
-
Example:
[{"functionArgs":[{"argName":"domain_name","argValue":"developer.aliyundoc.com"}],"functionName":"set_req_host_header"}] -
Some features, such as filetype_based_ttl_set, support multiple records. To update a specific record, specify the configId of that record. Example:
[{"functionArgs":[{"argName":"file_type","argValue":"jpg"},{"argName":"ttl","argValue":"18"},{"argName":"weight","argValue":"30"}],"functionName":"filetype_based_ttl_set","configId":506***}]
Functions feature description
| Name | Parameters |
| referer_white_list_set: Referer whitelist. | refer_domain_allow_list: The whitelist. Separate multiple values with commas (,). allow_empty: Specifies whether to allow an empty Referer. Valid values: on or off. |
| referer_black_list_set: Referer blacklist. | refer_domain_deny_list: The blacklist. Separate multiple values with commas (,). allow_empty: Specifies whether to allow an empty Referer. Valid values: on or off. |
| filetype_based_ttl_set: File expiration time settings. | ttl: The cache time. Unit: seconds. Valid values: 1 to 99999999 (slightly more than 3 years). file_type: The file type. Separate multiple values with commas (,). weight: The weight. Valid values: 1 to 99. |
| path_based_ttl_set: Directory expiration time settings. | ttl: The cache time. Unit: seconds. Valid values: 1 to 99999999 (slightly more than 3 years). path: The directory. It must start with a forward slash (/). weight: The weight. Valid values: 1 to 99. |
| oss_auth: OSS authentication bucket. | oss_bucket_id: The address of the user bucket. |
| ip_black_list_set: IP blacklist. | ip_list: The IP list. Separate multiple values with commas (,). |
| ip_allow_list_set: IP whitelist. | ip_list: The IP list. Separate multiple values with commas (,). |
| ip_white_list_set: Access frequency control exemption. | ip_list: The IP list. Separate multiple values with commas (,). |
| error_page: Error page redirect. | error_code: The error code. rewrite_page: The redirect page. |
| set_req_host_header: Modifies the back-to-origin host header. | domain_name: The content of the back-to-origin host header. |
| set_hashkey_args: Ignores URL parameters. | hashkey_args: The list of parameters to retain. Separate multiple values with commas (,). disable: Specifies whether to ignore all parameters. Valid values: on (ignore all parameters) or off (do not ignore). |
| aliauth: Alibaba Cloud authentication. | auth_type: The authentication type. Valid values: type_a (authentication type A), no_auth (disable authentication). auth_key1: Authentication key 1. The key supports uppercase letters, lowercase letters, and digits. We recommend that you set the length to 8 to 32 characters. auth_key2: Authentication key 2. ali_auth_delta: The custom authentication buffer time. Unit: seconds. We recommend a minimum value of 60 seconds. There is no upper limit. auth_m3u8: Specifies whether to enable M3U8 content rewriting, which appends authentication information to the TS segments in the M3U8 file to prevent TS access authentication failures. Valid values: on (default) or off. |
| remote_auth: Live stream remote authentication. | enable: Specifies whether to enable remote authentication. This parameter is required. Valid values: on or off. remote_auth_path: The address of the authentication server. This parameter is required. remote_auth_pattern: The authentication mode string. The following settings are available: - param: Specifies whether to pass through the parameters in the ingest URL to the authentication server. Valid values: pass (default) or fail. - args_white: The specified parameters to pass through. Separate multiple parameters with commas (,). - args_black: The specified parameters not to pass through. Separate multiple parameters with commas (,). - code: The authentication status code. code=XXX specifies the HTTP status code returned by the authentication server to ApsaraVideo Live upon successful authentication. Example: code=200. code=~XXX specifies the HTTP status code returned upon authentication failure. Example: code=~403. - delta: The authentication timeout period. - retry: The number of retries upon authentication timeout. - timeout: The behavior upon authentication timeout. Valid values: pass or fail. pass: ApsaraVideo Live directly passes the user request. fail: ApsaraVideo Live responds with the authentication failure status code (403) to the user. - async: Asynchronous authentication. Valid values: on (enable asynchronous authentication) or off (default, disable asynchronous authentication). |
| set_resp_header: Sets response headers (visible on the browser side). | key: The response header. Valid values: Content-Type. Cache-Control. Content-Disposition. Content-Language. Expires. Access-Control-Allow-Origin. Access-Control-Allow-Methods. Access-Control-Allow-Headers. Access-Control-Max-Age. Access-Control-Expose-Headers. value: The response header content. Set this to null to delete the header. |
| https_force: Forces HTTPS redirect. | enable: The feature switch. Valid values: on or off. https_force and http_force are mutually exclusive. Only one can exist at a time. To configure the other, delete the existing configuration first. |
| http_force: Forces HTTP redirect. | enable: The feature switch. Valid values: on or off. https_force and http_force are mutually exclusive. Only one can exist at a time. To configure the other, delete the existing configuration first. |
| forward_scheme: Adaptive back-to-origin. | enable: The feature switch. Valid values: on or off. scheme_origin: The back-to-origin protocol (http, https, or follow). scheme_origin_port: The back-to-origin protocol port (80, 443, or 80:443). |
| green_manager: Content moderation. | enable: Specifies whether to enable content moderation. Valid values: on or off. |
| tmd_signature: Custom access frequency control rules. | name: The rule name. It must be unique within the domain. path: Can be repeated. URI path validity is verified. pathType: The matching rule. 0: prefix match. 1: exact match. interval: The monitoring duration. Unit: seconds. The value must be ≥ 10. count: The number of visits from a single IP address. action: The blocking type. 0: block. 1: human-machine identification. ttl: The blocking duration. Unit: seconds. |
| l2_oss_key: L2 OSS back-to-origin private key. | private_oss_auth: Specifies whether to enable private OSS authentication. Valid values: on or off. |
| video_seek: Video slice seeking switch. | enable: The feature switch. Valid values: on or off. |
| gzip: Page Gzip optimization. | enable: The feature switch. Valid values: on or off. |
| tesla: Page optimization acceleration. | enable: The feature switch. Valid values: on or off. |
| ali_ua: User-Agent access restriction. | ua: The User-Agent. type: The list type. Valid values: black or white. |
| host_redirect: Rewrite feature. | regex: The URL to rewrite. Example: ^/$. replacement: The target URL. Example: /go/act/sale/tbzlsy.php. flag: Only redirect or break is supported. |
| ipv6: IPv6 configuration. | switch: The switch (required). Valid values: on or off. Once enabled, to disable it, deselect the option instead of deleting the configuration. Otherwise, the change does not take effect. region: The region where IPv6 is enabled. Valid values: cn-beijing (Beijing), cn-shanghai (Shanghai), cn-shenzhen (Shenzhen), cn-qingdao (Qingdao), apsoutheast-1 (Singapore), eu-central-1 (Germany), ap-northeast-1 (Tokyo), ap-southeast-5 (Jakarta). |
| ali_location: Region-based access restriction. | location: The region list. type: The list type. Valid values: black or white. |
| cc_defense: Anti-CC attack. | enable: Enables or disables anti-CC attack protection. Valid values: on or off. |
| alilive: ApsaraVideo Live configuration. | notify_url: The live stream notification URL. enable: The feature switch. Valid values: on or off. live_forbid_flv: Specifies whether to prohibit FLV playback. Valid values: on or off. live_forbid_rtmp: Specifies whether to prohibit RTMP playback. Valid values: on or off. live_forbid_hls: Specifies whether to prohibit HLS playback. Valid values: on or off. |
| ali_grtn: GRTN service access switch. | grtn_rts_pub: The RTS stream ingest switch, used for ingest domains. Valid values: on or off. grtn_rts_play: The RTS streaming switch, used for streaming domains. Valid values: on or off. grtn_rts_transcode: The RTS H5 playback automatic transcoding switch. Valid values: on or off. |
| edge_function: Edge function. | Required parameters: rule: The DSL rule. pri: The priority. enable: Specifies whether this rule takes effect. Valid values: on or off. Optional parameters: name: The rule name. pos: The rule execution position. brk: If this rule is hit, the remaining rules at the current execution position are skipped. option: The option control. grammar: The grammar control. Valid values: empty, es2, or js. jsmode: The JS domain whitelist control. Valid values: redirect or bypass. |
| https_tls_version: TLS protocol version. | tls10: Enables TLSv1.0. Default value: on. Valid values: on or off. tls11: Enables TLSv1.1. Default value: on. Valid values: on or off. tls12: Enables TLSv1.2. Default value: on. Valid values: on or off. tls13: Enables TLSv1.3. Default value: on. Valid values: on or off. |
| https_option: HTTP protocol settings. | http2: Specifies whether to enable HTTP/2. Default value: off. Valid values: on or off. live_http2: Specifies whether to enable live_http2. Default value: off. Valid values: on or off. |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
04F0F334-1335-436C-A1D7-6C044FE73368 |
Examples
Success response
JSON format
{
"RequestId": "04F0F334-1335-436C-A1D7-6C044FE73368"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidFunctions.Malformed | Specified Functions is malformed. | |
| 400 | InvalidFunctionArgs.Malformed | The specified FunctionArgs is invalid. | |
| 400 | InvalidArgValue.Malformed | Specified ArgValue is malformed. | |
| 400 | Invalid%s.ValueNotSupported | FunctionName [%s] is not supported. | |
| 400 | Invalid%s.Malformed | ArgValue [%s] is malformed. | |
| 400 | MissingParameter%s | The specified value of ArgName[%s] is missing. | |
| 400 | FunctionMutex | Function is mutex with other function. | |
| 400 | RewriteHostRely | Domain name is configured as rewrite host by others. | |
| 400 | ConfigurationConflicts | The staging environment has a configuration in effect and cannot modify the production environment configuration. | The staging environment has a configuration in effect and cannot modify the production environment configuration. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.