SetDcdnDomainStagingConfig_全站加速_API文档

插件下载了解更多
VS Code 插件
安装插件之前,确保已安装 VS Code安装插件之前,确保已安装 VS Code
Alibaba Cloud Developer Toolkit is a collection of extensions that can help access Alibaba Cloud services in Visual Studio Code.
JetBrains 插件
安装插件之前,确保已安装 JetBrains IDE安装插件之前,确保已安装 JetBrains IDE
The Alibaba Cloud Developer Toolkit for JetBrains makes it easier to access Alibaba Cloud services.

接口说明

说明 单用户调用频率:30 次/秒。

流控信息

请求速率为30/1(s)。

授权信息

如下是此API对应的授权信息,用于RAM权限策略语句的Action元素中,为RAM用户或RAM角色授予调用此API的权限。请通过 RAM 访问控制设置,使用方法可参考访问控制帮助文档

具体说明如下:展开详情

操作访问级别资源类型条件关键字关联操作
dcdn:SetDcdnDomainStagingConfig
Update
domain
acs:dcdn:*:{#accountId}:domain/{#domainName}

请求参数

字段名称字段详情
DomainNamestring

加速域名,多个域名用英文逗号(,)分隔。

示例值:example.com参考取值来源:
    AddDcdnIpaDomain
    DescribeDcdnWafDomains
    BatchAddDcdnDomain
Functionsstring

功能列表,格式如下:展开详情

示例值: [{"functionArgs": [{"argName": "key","argValue": "Content-Encoding"},{"argName": "value","argValue": "gzip"}],"functionName": "set_resp_header"} ]

请求说明

某些功能可以设置多条记录,例如:edge_function,当需要更新其中某条记录时,可通过该条记录的 ConfigId(Long 类型)来指定要修改的配置项。格式如下:

[{"functionArgs":[{"argName":"enable","argValue":"on"},{"argName":"pri","argValue":"1"},{"argName":"rule","argValue":"yyy"}],"ConfigId":123456,"functionName":"edge_function"}]

功能说明 所有参数值均按照字符串类型处理。

功能名称参数
edge_function:边缘函数必填参数:
rule:DSL 规则。
pri:优先级。
enable:本条规则是否生效,取值:on 或 off。
可选参数:
name:规则名称。
pos:规则执行位置。DCDN 域名仅支持 head,不支持 foot。
brk:命中本条规则后,当前执行位置剩余规则均跳过。
option:option 管控。
grammar:grammar 管控。可选值:空、es2、js。
jsmode:js 域名白单管控。可选值:redirect、bypass。

返回参数

字段名称字段详情
RequestIdstring

请求 ID。

示例值:04F0F334-1335-436C-A1D7-6C044FE73368

返回示例

错误码

全局错误码
HTTP 状态码错误码错误信息操作
400
InvalidFunctionName.ValueNotSupported
%s诊断
400
InvalidArgName.ValueNotSupported
%s诊断
400
InvalidArgValue.Malformed
%s诊断
400
InvalidRule.Malformed
%s诊断
400
ConfigurationConflicts
The staging environment has a configuration in effect. You cannot modify the production environment configuration.诊断
400
GrayConfigExist
A canary configuration already exists under the domain.诊断
400
InvalidDomain.BelongToConfigGroup
The domain is bound to a configuration group. Modify the domain in the configuration group.诊断
400
EdgeScriptCountExceedLimit
The number of rules exceeds the default limit.诊断
400
EdgeScripOptionsHasInnerConfig
The extension has a background configuration or a parameter of this configuration is invalid. For more information, submit a ticket.诊断
400
EdgeScriptGrammarNotSupport
A background customization rule exists or a parameter of this configuration is invalid. For more information, submit a ticket.诊断
400
EdgeScriptNotSupportJs
JavaScript rules are not supported. For more information, submit a ticket.诊断

变更历史

变更时间变更内容概要操作
2023-05-25
变更错误码400
2022-12-08
变更错误码400

相关示例