Specifies or modifies the domain name configuration in the canary environment.

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


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 SetDcdnDomainStagingConfig

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

DomainName String Yes example.com

The accelerated domain names. Separate multiple accelerated domain names with commas (,).

Functions String Yes [{\"functionArgs\":[{\"argName\":\"enable\",\"argValue\":\"on\",\"argName\":\"pri\",\"argValue\":\"1\",\"argName\":\"rule\",\"argValue\":\"xxx\"}],\"functionName\":\"edge_function\"}]

The list of features. Specify the features in the following format:

[{"functionArgs":[{"argName":"parameter key","argValue":"parameter value"},{"argName":"xx","argValue":"xx"}],"functionName": feature name"}]
Note Separate multiple parameters with commas (,).

You can set multiple records for some features, such as the edge_function feature. To update a record, you can set the ConfigId (Long type) field to specify the configuration items that you want to modify. Syntax:


All parameter values are of the string type.



edge_function: EdgeScript functions

Required parameters:

rule: the domain-specific language (DSL) script.

pri: the priority of the script.

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

Optional parameters:

name: the name of the script.

pos: specifies whether to execute the script at the start or end of the request processing pipeline. For the accelerated domain names of Dynamic Route for CDN (DCDN), only the value of head is supported. The value of foot is not supported.

brk: After the script is matched, the subsequent scripts at the specified position are skipped.

option: option control.

grammar: grammar control. Valid values: null, es2, and js.

jsmode: control of the JavaScript domain name whitelist. Valid values: redirect and bypass.

Response parameters

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

The ID of the request.


Sample requests

http(s)://dcdn.aliyuncs.com/? Action=SetDcdnDomainStagingConfig
&<common request parameters>

Sample success responses

XML format


JSON format

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

Error codes

HttpCode Error code Error message Description
400 InvalidFunctionName.ValueNotSupported %s %s
400 InvalidArgName.ValueNotSupported %s The error message returned because %s is set to an invalid value.
400 InvalidArgValue.Malformed %s %s
400 InvalidRule.Malformed %s %s
400 ConfigurationConflicts The staging environment has a configuration in effect. You cannot modify the production environment configuration. The error message returned because the canary environment has a configuration in effect and you cannot modify the production environment configuration.
400 InvalidDomain.BelongToConfigGroup The domain is bound to a configuration group. Modify the domain in the configuration group. The error message returned because the domain name is bound to a configuration group. You must modify the domain name in the configuration group.

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