創建或修改預部署環境腳本
更新時間 2023-12-11 10:23:38
最近更新時間: 2023-12-11 10:23:38
分享文章
接口描述:調用本接口創建或修改預部署環境腳本。
請求方式:post
請求路徑:/icdn/udf-script/set-udf-script-pre-configs
使用說明:單個用戶一分鐘限制調用10000次,并發不超過100。
請求參數說明(json):
| 參數 | 是否必填 | 參數類型 | 說明 | 示例 | 下級對象 |
|---|---|---|---|---|---|
| domain | 是 | String | 域名必須屬于當前用戶且合法有效 | aaa.daliqc.cn | |
| script_name | 是 | String | 為2-64位的小寫字母、數字、下劃線組合,以小寫字母、數字開頭結尾 | lua_test | |
| script_content | 是 | String | lua腳本內容,腳本內容不超過5M | ctyun.resp.set_output('Hello World hmy') ctyun.resp.exit(200) |
返回參數說明:
| 參數 | 參數類型 | 說明 | 示例 | 下級對象 |
|---|---|---|---|---|
| statusCode | Integer | 狀態碼 | 100000 | |
| returnObj | Object | 返回對象 | {} | |
| message | String | 結果簡述 | 正確返回/參數不合法 | |
| error | String | 錯誤碼 | CDN_200002 | |
| errorMessage | String | 錯誤詳情 | 請求參數校驗失敗,參數domain為必填,且不能為空 |
示例:
請求路徑://cdnapi-global.ctapi.daliqc.cn/icdn/udf-script/set-udf-script-pre-configs
請求參數:
{
????"domain":"daliqc.cn",
????"script_name":"lua_test",
????"script_content":"ctyun.resp.set_output('Hello?World?hmy')?ctyun.resp.exit(200)"
}
返回結果:
{
????"statusCode":100000,
????"message":"正確返回",
????"returnObj":{
????}
}
錯誤碼請參考:參數code和message含義