Sets or modifies domain configurations in the canary release environment.
Operation description
Usage notes
Obtain an accelerated domain name. You can then call this operation to set or modify domain name configurations in the staging environment. For more information, see Functions format description.
QPS limit
This operation is limited to 30 queries per second (QPS) per user. API calls that exceed this limit are throttled, which may affect your business. For more information, see QPS limits.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
live:SetLiveDomainStagingConfig |
update |
*Domain
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
No |
The region ID. |
cn-shanghai |
| DomainName |
string |
Yes |
The accelerated domain name. |
developer.aliyundoc.com |
| Functions |
string |
Yes |
The list of features. Specify ConfigId only when you modify a configuration. For more information, see Functions format description. |
[{"functionArgs":[{"argName":"enable","argValue":"on"},{"argName":"pri","argValue":"1"},{"argName":"rule","argValue":"xxx"}],"functionName":"edge_function"}] |
Function format description
To set a configuration, see the following example:
[{"functionArgs":[{"argName":"enable","argValue":"on"},{"argName":"pri","argValue":"1"},{"argName":"rule","argValue":"xxx"}],"functionName":"edge_function"}]To modify a configuration, specify the configuration item using the ConfigId parameter, which is of the Long data type. See the following example:
[{"functionArgs":[{"argName":"enable","argValue":"on"},{"argName":"pri","argValue":"1"},{"argName":"rule","argValue":"yyy"}],"ConfigId":123456,"functionName":"edge_function"}]
Note: All parameter values are strings.
| Feature name | Required parameters | Optional parameters |
| edge_function: The Edge Routine. | - rule: The DSL rule. - pri: The priority. - enable: Specifies whether the rule is enabled. Valid values: on and off. | - name: The rule name. - pos: The position where the rule is executed. - brk: Specifies whether to skip the remaining rules at the current execution position after the current rule is hit. - option: The option control. - grammar: The grammar control. Valid values: empty, es2, and js. - jsmode: The JavaScript domain name whitelist control. Valid values: redirect and bypass. |
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 | InvalidFunctionName.ValueNotSupported | %s | |
| 400 | InvalidArgName.ValueNotSupported | %s | |
| 400 | InvalidArgValue.Malformed | %s | |
| 400 | InvalidRule.Malformed | %s | |
| 400 | ConfigurationConflicts | The staging environment has a configuration in effect. 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. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.