{"base_path":null,"components":null,"consumes":"","definitions":{"PhoneJob":{"description":"云手机任务。","properties":{"error_code":{"description":"错误码。","maxLength":1024,"minLength":0,"type":"string"},"error_msg":{"description":"错误说明。","maxLength":1024,"minLength":0,"type":"string"},"job_id":{"description":"任务的唯一标识。","maxLength":32,"minLength":32,"type":"string"},"phone_id":{"description":"云手机的唯一标识ID,云手机相关任务包含此字段。","maxLength":32,"minLength":32,"type":"string"}},"type":"object"},"RunShellCommandRequestBody":{"description":"执行shell命令请求体。","properties":{"command":{"default":"shell","description":"ADB命令,固定填写shell。","maxLength":5,"minLength":5,"type":"string"},"content":{"description":"待执行的命令。\n\n最大长度为1024字节,只支持大小写字母、数字、下划线(_)、点(.)、斜线(/)、冒号(:)、中划线(-)。","example":"ls -l /system","maxLength":1024,"minLength":0,"type":"string"},"phone_ids":{"description":"云手机ID列表。\nserver_ids参数不存在时必选,同时存在只处理phone_ids。","items":{"maxLength":32,"minLength":32,"type":"string"},"maxItems":8096,"minItems":0,"type":"array"},"server_ids":{"description":"云手机服务器ID列表。\nphone_ids参数不存在时必选,同时存在只处理phone_ids。","items":{"maxLength":32,"minLength":32,"type":"string"},"maxItems":8096,"minItems":8096,"type":"array"}},"required":["command","content"],"type":"object"},"RunShellCommandResponseBody":{"description":"执行shell命令响应体。","properties":{"jobs":{"description":"任务列表。","items":{"$ref":"#/definitions/PhoneJob"},"maxItems":8096,"minItems":0,"type":"array"},"request_id":{"description":"请求的唯一标识ID。","maxLength":32,"minLength":32,"type":"string"}},"type":"object"}},"description":null,"group_id":"309fd78cfbaf4fc7b0138ba244051bf6","host":"cph.cn-north-4.myhuaweicloud.com","id":"abac5927d702480f86367880070da020","info_version":"v1","method":"post","name":"RunShellCommand","parameters":{"X-Auth-Token":{"description":"用户Token。\n通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。","in":"header","maxLength":8096,"minLength":0,"name":"X-Auth-Token","required":true,"type":"string"},"project_id":{"description":"项目id。","in":"path","maxLength":32,"minLength":32,"name":"project_id","required":true,"type":"string"}},"paths":{"/v1/{project_id}/cloud-phone/phones/commands":{"post":{"description":"在云手机中执行shell命令。该接口为异步接口。\n- 管理面性能有限,对相同服务器批量执行的ADB命令,将会阻塞云手机其他任务执行。","operationId":"RunShellCommand","parameters":[{"$ref":"#/parameters/project_id"},{"$ref":"#/parameters/X-Auth-Token"},{"description":"Shell命令请求体","in":"body","name":"RunShellCommandRequestBody","required":true,"schema":{"$ref":"#/definitions/RunShellCommandRequestBody"}}],"responses":{"200":{"description":"OK","examples":{"application/json":{"jobs":[{"job_id":"1564567b8bab40f34711234cb80d0123","phone_id":"1234567b8bab40ffb711234cb80d0234"},{"job_id":"1564567b8bab40f34711234cb80d5678","phone_id":"1678567b8bab40f93711234cb80d0764"}],"request_id":"6837531fd3f54550927b930180a706bf"}},"schema":{"$ref":"#/definitions/RunShellCommandResponseBody"}}},"schemes":["https"],"summary":"执行异步adb命令","tags":["ADB命令"],"x-apiexplorer-hide":false,"x-first-open-time":"2019-3-30","x-hybridcloud":false,"x-is-registered":"Y","x-open-region-cloud":"hc,hk,cmcc,fcs","x-order":4,"x-publishpath":"cph_api_0532","x-request-examples-1":{"command":"shell","content":"ls -l /system","phone_ids":["1234567b8bab40ffb711234cb80d0234","1678567b8bab40f93711234cb80d0764"]},"x-request-examples-description-1":"向手机列表中的手机异步执行shell命令,命令为ls -l /system","x-request-examples-text-1":{"command":"shell","content":"ls -l /system","phone_ids":["1234567b8bab40ffb711234cb80d0234","1678567b8bab40f93711234cb80d0764"]},"x-request-examples-url-1":"POST https://{CPH Endpoint}/v1/{project_id}/cloud-phone/phones/commands","x-source":"SelfDeveloped","x-support-sdk":"Y"}}},"product_short":"CPH","region_id":"cn-north-4","schemes":["HTTPS"],"security_definitions":null,"summary":"执行异步adb命令","tags":"ADB命令","uri":null,"version":"2.0"}