調用DistApplicationData分發已預推成功的資料到應用的邊緣資源執行個體,目標邊緣資源的範圍支援多種灰階策略,同時支援檔案解壓縮與容器重啟。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
ens:DistApplicationData |
update |
*全部資源
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| AppId |
string |
是 |
應用 ID。擷取 AppId,請參見 ListApplications。 |
e76f8985-7965-41fc-925b-9648bb6bf650 |
| Data |
string |
是 |
分發的資料檔案列表,Json 數組的字串格式。 |
[{\"name\":\"app01\", \"version\":\"1.0\", \"destPath\":\"/root/installed\", \"decompress\":true, \"targetDirName\":\"target01\", \"fileMode\":755, \"timeout\":1000 }, { \"name\":\"app02\", \"version\":\"1.1\", \"destPath\":\"/tmp/test.txt\", \"decompress\":false }] |
| DistStrategy |
string |
否 |
灰階分發策略,Json 格式的字串,支援多種分發策略,預設全量分發。 |
{\"name\":\"ScheduleToAllByMatchExpressions\",\"parameters\":{\"match_expressions\":[{\"key\":\"region_id\",\"operator\":\"In\",\"values\":[\"cn-wuhan-telecom_unicom_cmcc-2\"]}]}} |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
|||
| RequestId |
string |
請求 ID。 |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
| DistInstanceTotalCount |
integer |
目標邊緣資源執行個體 ID 的總數。 |
2 |
| DistInstanceIds |
object |
||
| DistInstanceId |
array |
目標邊緣資源執行個體 ID 列表。 |
|
|
string |
執行個體 ID。 |
i-xxx |
|
| DistResults |
object |
||
| DistResult |
array<object> |
各個資料檔案的分發操作執行結果。 |
|
|
object |
資料檔案的分發操作執行結果。 |
||
| ResultDescrip |
string |
分髮結果描述資訊。 |
Success |
| Version |
string |
資料檔案版本號碼。 |
standard |
| ResultCode |
integer |
分發執行結果錯誤碼。枚舉類型。 |
400 |
| Name |
string |
資料檔案名。 |
gcs-prod-websocket-eip-unicom |
樣本
正常返回樣本
JSON格式
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
"DistInstanceTotalCount": 2,
"DistInstanceIds": {
"DistInstanceId": [
"i-xxx"
]
},
"DistResults": {
"DistResult": [
{
"ResultDescrip": "Success",
"Version": "standard",
"ResultCode": 400,
"Name": "gcs-prod-websocket-eip-unicom"
}
]
}
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | NoPermission | Permission denied. | |
| 400 | InvalidParameter.%s | The specified field %s invalid. Please check it again. |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。