Specifies or modifies the domain name configuration in the staging 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 SetDcdnDomainStagingConfig

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

DomainName String Yes example.com

The name of the accelerated domain. You can specify multiple accelerated domain names and separate them with commas (,).

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

A list of features. The following sections show the format and values.

Note You need to specify the configuration ID only if you modify the configuration.

Response parameters

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

The ID of the request.

Examples

Sample requests

http://dcdn.aliyuncs.com/?Action=SetDcdnDomainStagingConfig
&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

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

JSON format

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

Error codes

HttpCode Error code Error message Description
400 InvalidFunctionName.ValueNotSupported %s %s
400 InvalidArgName.ValueNotSupported %s The error message returned because the %s parameter is invalid. %s indicates a specific parameter name.
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 error message returned because the staging environment has a configuration in effect and 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. The error message returned because the domain name is bound to a configuration group and you need to modify the domain name in the configuration group.

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