Sets or modifies domain name configurations in the canary release environment.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes SetLiveDomainStagingConfig

The operation that you want to perform. Set the value to SetLiveDomainStagingConfig.

DomainName String Yes example.com

The accelerated domain name.

Functions String Yes [{"functionArgs":[{"argName":"enable","argValue":"on"},{"argName":"pri","argValue":"1"},{"argName":"rule","argValue":"xxx"}],"functionName":"edge_function"}]

The list of features. You must specify the ConfigId parameter only when you modify Functions. For more information, see Features.

RegionId String No cn-shanghai

The ID of the region.

Features

  • Sets the configurations. Example: [{"functionArgs":[{"argName":"enable","argValue":"on"},{"argName":"pri","argValue":"1"},{"argName":"rule","argValue":"xxx"}],"functionName":"edge_function"}].
  • Modifies the configurations. You can use ConfigId (Long type) to specify the configuration items to be modified. Example: [{"functionArgs":[{"argName":"enable","argValue":"on"},{"argName":"pri","argValue":"1"},{"argName":"rule","argValue":"yyy"}],"ConfigId":123456,"functionName":"edge_function"}].

Note: Set parameter values in the format of a string.

Feature

Required parameter

Optional parameter

edge_function: configures EdgeScript.

  • 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.
  • name: the name of the script.
  • pos: the position from which to execute the script.
  • brk: After the current script is matched, the scripts after the specified position are skipped.
  • option: an extension used to perform response header debugging.
  • grammar: an extension used to specify the scripting language. Valid values: es2 and js. You can also leave this parameter empty.
  • jsmode: an extension used to manage the domain name whitelist in JavaScript. Valid values: redirect and bypass.

Response parameters

Parameter Type Example Description
RequestId String 04F0F334-1335-436C-A1D7-6C044FE73368

The ID of the request.

Examples

Sample requests

http(s)://live.aliyuncs.com/?Action=SetLiveDomainStagingConfig
&DomainName=example.com
&Functions=[{"functionArgs":[{"argName":"enable","argValue":"on"},{"argName":"pri","argValue":"1"},{"argName":"rule","argValue":"xxx"}],"functionName":"edge_function"}]
&<Common request parameters>

Sample success responses

XML format

<SetLiveDomainStagingConfigResponse>
  <RequestId>04F0F334-1335-436C-A1D7-6C044FE73368</RequestId>
</SetLiveDomainStagingConfigResponse>

JSON format

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

Error codes

For a list of error codes, visit the API Error Center.