Call SetDcdnDomainStagingConfig to set or modify the configurations for a domain name in the staging environment.
Operation description
The call frequency for a single user is limited to 30 calls per second.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dcdn:SetDcdnDomainStagingConfig |
update |
*domain
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| DomainName |
string |
Yes |
The accelerated domain name. Separate multiple domain names with commas (,). |
example.com |
| Functions |
string |
Yes |
A list of features. The format is as follows:
If you set parentId to -1, the existing conditional rule in the configuration is deleted.
"functionName": "Feature Name", "parentId": Optional. Corresponds to the configid of the referenced conditional rule. }] Example configuration without using parentId: The following request parameters show how to use the origin_request_header function to add a header to origin requests:
Example configuration using parentId: The following request parameters show how to use the origin_request_header function to add a header to origin requests by referencing the conditional rule with configid=222728944812032:
Example of deleting a parentId reference from a feature configuration: The origin_request_header function already references the conditional rule with configid=222728944812032. To delete the reference, use the following request parameters: |
[{\"functionArgs\":[{\"argName\":\"enable\",\"argValue\":\"on\",\"argName\":\"pri\",\"argValue\":\"1\",\"argName\":\"rule\",\"argValue\":\"xxx\"}],\"functionName\":\"edge_function\"}] |
Some features, such as edge_function, allow you to configure multiple records. To update a specific record, use its ConfigId (of the Long type) to specify the configuration that you want to modify. The format is as follows:
[{"functionArgs":[{"argName":"enable","argValue":"on"},{"argName":"pri","argValue":"1"},{"argName":"rule","argValue":"yyy"}],"ConfigId":123456,"functionName":"edge_function"}]
Feature description All parameter values are processed as strings.
Feature name | Parameters |
edge_function: Edge Routine | Required parameters: |
Response parameters
|
Parameter |
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 | %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. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.