Sets or modifies the domain name configuration in the canary release environment.
Operation description
Note
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. Separate multiple accelerated domain names with commas (,). | example.com |
Functions | string | Yes | The list of features. Format: Note
Separate multiple parameters with commas (,).
| [{\"functionArgs\":[{\"argName\":\"enable\",\"argValue\":\"on\",\"argName\":\"pri\",\"argValue\":\"1\",\"argName\":\"rule\",\"argValue\":\"xxx\"}],\"functionName\":\"edge_function\"}] |
You can set multiple items for some features, such as the edge_function feature. To update an item, you can set the ConfigId field to specify the configuration items that you want to modify. The ConfigId field is of the long type. Format:
[{"functionArgs":[{"argName":"enable","argValue":"on"},{"argName":"pri","argValue":"1"},{"argName":"rule","argValue":"yyy"}],"ConfigId":123456,"functionName":"edge_function"}]
Description of edge_function All field values are of the string type.
Parameter | Field |
---|---|
edge_function | Required fields: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 fields:name: the name of the script.pos: the position from which to execute the script. For the accelerated domain names of Dynamic Content Delivery Network (DCDN), only head is supported. foot is not supported.brk: After the current script is matched, the scripts after the specified position are skipped.option: option control.grammar: grammar control. Valid values: es2 and js. You can also leave this field empty.jsmode: control of the JavaScript domain name whitelist. Valid values: redirect and bypass. |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "04F0F334-1335-436C-A1D7-6C044FE73368"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | InvalidFunctionName.ValueNotSupported | %s | %s |
400 | InvalidArgName.ValueNotSupported | %s | The name of the %s parameter is invalid. |
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 configuration exists in the staging environment. You cannot modify the configuration in the production environment. |
400 | GrayConfigExist | A canary configuration already exists under the domain. | The domain name already has configurations in canary release. |
400 | InvalidDomain.BelongToConfigGroup | The domain is bound to a configuration group. Modify the domain in the configuration group. | The domain name is associated with a configuration group. To modify the configuration of the domain name, you must modify the configuration group. |
400 | EdgeScriptCountExceedLimit | The number of rules exceeds the default limit. | The number of rules exceeds the limit. To increase the limit, submit a ticket. |
400 | EdgeScripOptionsHasInnerConfig | The extension has a background configuration or a parameter of this configuration is invalid. For more information, submit a ticket. | The extension has a background configuration or a configured parameter is invalid. For more information, submit a ticket. |
400 | EdgeScriptGrammarNotSupport | A background customization rule exists or a parameter of this configuration is invalid. For more information, submit a ticket. | A background custom rule exists or a configured parameter is invalid. For more information, submit a ticket. |
400 | EdgeScriptNotSupportJs | JavaScript rules are not supported. For more information, submit a ticket. | JavaScript rules are not supported. For more information, submit a ticket. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2023-05-25 | The Error code has changed | View Change Details |