調用RunServiceSchedule根據客戶ID&IP基本資料,為終端裝置最優調度空閑資源(執行個體裝置/容器POD),並完成虛擬設備環境的初始化。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
ens:RunServiceSchedule |
update |
*全部資源
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| AppId |
string |
是 |
應用 ID |
474bdef0-d149-4695-abfb-52912d9143f0 |
| Uuid |
string |
是 |
裝置 UUID |
hdm_d4f1059a8e1afc0956bd71b497faa433 |
| ClientIp |
string |
是 |
用戶端的 IP 位址。 |
180.166.45.146 |
| ServiceAction |
string |
是 |
調度服務作業。枚舉類型,取值範圍: 容器化情境:
裸金屬/虛機情境:
枚舉值:
|
Start |
| PodConfigName |
string |
否 |
無效參數 |
android |
| PreLockedTimeout |
integer |
否 |
鎖定空閑裝置的時間上限,單位秒,僅 ServiceAction=PreSchedule 有效。預設 300。 |
300 |
| Directorys |
string |
否 |
需要掛載的使用者資料檔案的目錄列表。必須是全路徑,不支援'/../',取值樣本: ["/data/app01", "/data/user"]。 注意:輸入的目錄路徑是虛擬設備"/data"目錄的相對目錄,即實際對應的虛擬設備路徑為"/data/{輸入路徑}" |
[\"/data/app01\", \"/data/user\"] |
| ServiceCommands |
string |
否 |
Container Service命令列表。Json 數組格式的字串。 |
[{\"containerName\": \"android\", \"commands\":[\"cat /tmp/token.json\"] }, { \"commands\":[\"ls -l /data/data\"] }] |
| ScheduleStrategy |
string |
否 |
裝置調度策略。Json 格式的字串。 |
{\"selectLevel\": \"RegionId\", \"values\": [\"cn-chengdu-telecom-2\"] } |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
|||
| CommandResults |
object |
||
| CommandResult |
array<object> |
Container Service命令的執行結果。 |
|
|
object |
容器命令的執行資訊。 |
||
| Command |
string |
裝置(容器)命令。 |
ls -l /data |
| ContainerName |
string |
容器名。 |
android |
| ResultMsg |
string |
命令執行結果。 |
success |
| Index |
integer |
調度的目標虛擬設備(容器 Pod)索引號。 |
1 |
| InstanceId |
string |
調度的目標執行個體 ID。 |
i-5qvji3mom4ec013dyygmtxlkj |
| InstanceIp |
string |
調度的目標執行個體 IP。 |
172.16.246.11 |
| InstancePort |
integer |
調度的目標執行個體 Port 開始端點口。 |
1024 |
| RequestId |
string |
請求 ID。 |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
| RequestRepeated |
string |
除 ServcieAction=Console 外,其餘 ServcieAction 是否是重複操作。 |
false |
| TcpPorts |
boolean |
調度的目標虛機執行個體/容器的 tcp 服務連接埠範圍,取值格式:${from}-${to},如 80-88。 |
"80-88" |
樣本
正常返回樣本
JSON格式
{
"CommandResults": {
"CommandResult": [
{
"Command": "ls -l /data",
"ContainerName": "android",
"ResultMsg": "success"
}
]
},
"Index": 1,
"InstanceId": "i-5qvji3mom4ec013dyygmtxlkj",
"InstanceIp": "172.16.246.11",
"InstancePort": 1024,
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
"RequestRepeated": "false",
"TcpPorts": true
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | MissingParameter | The input parameter that is mandatory for processing this request is not supplied. | |
| 400 | NoPermission | Permission denied. | |
| 400 | InvalidParameter.%s | The specified field %s invalid. Please check it again. | |
| 400 | InvalidParameter | The errorMessage is %s. Please check it again. | |
| 400 | LimitExceeded.SecurityGroup | The number of securityGroup exceeds the limit. | |
| 400 | ens.interface.error | An error occurred while calling the API. | |
| 400 | CallInterface | Call Interface Happen Error. | 介面調用出錯。 |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。