All Products
Search
Document Center

Dynamic Content Delivery Network:SetDcdnDomainStagingConfig

Last Updated:Mar 01, 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

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
dcdn:SetDcdnDomainStagingConfigWRITE
  • domain
    acs:dcdn:*:{#accountId}:domain/{#domainName}
    none
none

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"}]

Feature description All parameter values are of the string type.

FeatureFields
edge_function: EdgeScriptRequired 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 region.

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.
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.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-05-25The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 400 change