调用SetCdnDomainStagingConfig设置模拟环境下的加速域名配置。
接口说明
单用户调用频率:30 次/秒。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
cdn:SetCdnDomainStagingConfig |
update |
*Domain
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| DomainName |
string |
是 |
加速域名,仅支持单个域名进行设置。 |
example.com |
| Functions |
string |
是 |
功能列表,格式如下: 说明
|
[{"functionArgs":[{"argName":"enable","argValue":"on"},{"argName":"pri","argValue":"1"},{"argName":"rule","argValue":"xxx"}],"functionName":"edge_function"}] |
edge_function 边缘函数功能说明
所有参数值均按照字符串类型处理。
| 功能名称 | 参数 |
| edge_function:边缘函数 | 必填参数: rule:DSL 规则; pri:优先级; enable:本条规则是否生效,取值范围 on/off; 可选参数: name:规则名称。仅支持英文字母和下划线; pos:规则执行位置; brk:命中本条规则后,当前执行位置剩余规则均跳过; option:option 管控; grammar:grammar 管控,可选值:空、es2、js; jsmode:js 域名白单管控,可选值:redirect、bypass; |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| RequestId |
string |
请求 ID。 |
04F0F334-1335-436C-A1D7-6C044FE73368 |
| DomainConfigList |
array<object> |
域名配置清单。 |
|
|
object |
|||
| ConfigId |
integer |
配置 ID。 |
1234567 |
| DomainName |
string |
域名。 |
www.example.com |
| FunctionName |
string |
功能名称。 |
set_resp_header |
示例
正常返回示例
JSON格式
{
"RequestId": "04F0F334-1335-436C-A1D7-6C044FE73368",
"DomainConfigList": [
{
"ConfigId": 1234567,
"DomainName": "www.example.com",
"FunctionName": "set_resp_header"
}
]
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | InvalidFunctionName.ValueNotSupported | %s | |
| 400 | InvalidArgValue.Malformed | %s | |
| 400 | ConfigurationConflicts | The staging environment has a configuration in effect and cannot modify the production environment configuration. | 现在模拟环境的配置和生产环境配置不一致,无法直接修改生产环境配置。请您前往模拟环境完成您所需的配置,然后发布到生产环境进行覆盖。 |
| 400 | InvalidArgName.ValueNotSupported | %s | |
| 400 | GrayConfigExist | The domain exists other gray config. | 域名已经存在其他灰度配置。 |
| 400 | InvalidRule.Malformed | %s | |
| 400 | InvalidDomain.BelongToConfigGroup | This Domain activated in configuration group and should modify by config 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. | 未开放JS规则,如有疑问,请提交工单咨询 |
| 400 | MissingRequiredArg | required argument missing. | 功能配置时,缺少必要的参数。 |
| 400 | FunctionArgError | The function parameter of the domain configuration is incorrect. |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。