All Products
Search
Document Center

Edge Security Acceleration:SetDcdnDomainStagingConfig

Last Updated:Oct 17, 2024

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

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
DomainNamestringYes

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

example.com
FunctionsstringYes

The list of features. Format: [{"functionArgs":[{"argName":"parameter key","argValue":"parameter value"},{"argName":"xx","argValue":"xx"}],"functionName": feature name"}]

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.

ParameterField
edge_functionRequired 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

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

04F0F334-1335-436C-A1D7-6C044FE73368

Examples

Sample success responses

JSONformat

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

Error codes

HTTP status codeError codeError messageDescription
400InvalidFunctionName.ValueNotSupported%s%s
400InvalidArgName.ValueNotSupported%sThe name of the %s parameter is invalid.
400InvalidArgValue.Malformed%s%s
400InvalidRule.Malformed%s%s
400ConfigurationConflictsThe 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.
400GrayConfigExistA canary configuration already exists under the domain.The domain name already has configurations in canary release.
400InvalidDomain.BelongToConfigGroupThe 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.
400EdgeScriptCountExceedLimitThe number of rules exceeds the default limit.The number of rules exceeds the limit. To increase the limit, submit a ticket.
400EdgeScripOptionsHasInnerConfigThe 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.
400EdgeScriptGrammarNotSupportA 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.
400EdgeScriptNotSupportJsJavaScript 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 timeSummary of changesOperation
2023-05-25The Error code has changedView Change Details