Configures a domain name to be accelerated in the staging environment.

Note The maximum number of times that each user can call this operation per second is 30.

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 software development kits (SDKs).

Request parameters

Parameter Type Required Example Description
Action String Yes SetCdnDomainStagingConfig

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

DomainName String Yes example.com

The accelerated domain name. You can specify only one domain name.

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

The features that you want to configure. Format:

Note
  • functionName: The name of the feature. Separate multiple values with commas (,).
  • argName: The feature parameters for functionName.
  • argValue: The parameter values set for functionName.
    [
     {
       "functionArgs": [
        {
         "argName": "Parameter A", 
         "argValue": "Parameter value"
        }, 
      {
        "argName": "Parameter B", 
        "argValue": "Parameter value"
         }
     ], 
     "functionName": "Feature name"
        }
    ]

Response parameters

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

The ID of the request.

Examples

Sample requests

http(s)://cdn.aliyuncs.com/?Action=SetCdnDomainStagingConfig
&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

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

JSON format

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

Error codes

HttpCode Error code Error message Required
400 ConfigurationConflicts The staging environment has a configuration in effect and cannot modify the production environment configuration. The error message returned because the configurations of the staging environment are different from those of the production environment. You cannot directly modify the configurations of the production environment. Go to the staging environment to complete the configurations and publish the specified configurations to the production environment.

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