Sets or modifies the domain name configuration in the canary release environment.
Operation description
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
dcdn:SetDcdnDomainStagingConfig | WRITE |
|
| none |
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"}]
Feature description All parameter values are of the string type.
Feature | Fields |
---|---|
edge_function: EdgeScript | 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 | 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. |
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 | see changesets | ||||
|