調用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. |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。