最近更新时间:2023.07.07 10:54:52
首次发布时间:2023.03.03 08:16:30
调用 GetConsoleScreenshot 接口,获取正在运行实例的JPG格式屏幕截图,以帮助进行故障排查。返回的内容是Base64编码后的JPG图像格式的实例截屏,您需要自行解码。
说明
名称 | 类型 | 是否必填 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | GetConsoleScreenshot | 要执行的操作,取值:GetConsoleScreenshot。 |
Version | String | 是 | 2020-04-01 | 接口的版本,取值:2020-04-01。 |
InstanceId | String | 是 | i-3tiefmkskq3vj0**** | 实例ID。您可以调用DescribeInstances接口查询获取实例ID。 |
WakeUp | Boolean | 否 | false | 是否唤醒处于休眠状态的实例。取值:
|
名称 | 类型 | 示例值 | 说明 |
---|---|---|---|
InstanceId | String | i-3tiefmkskq3vj0**** | 实例ID。 |
Screenshot | String | /9j/2wCEAAIBAQEBAQIBAQECAgICAgQDAgICGBwkIBgcJBw******* | Base64编码后的JPG图像格式的实例截屏。 说明 您可以为返回值加前缀 |
GET /?Action=GetConsoleScreenshot&Version=2020-04-01&InstanceId=i-3tiefmkskq3vj0****** HTTP/1.1 Host: open.volcengineapi.com Region: cn-beijing ServiceName: ecs
{ "ResponseMetadata": { "RequestId": "202106111445100102252431000052****", "Action": "GetConsoleScreenshot", "Version": "2020-04-01", "Service": "ecs", "Region": "cn-beijing" }, "Result": { "InstanceId": "i-3tiefmkskq3vj0******", "Screenshot": "/9j/2wCEAAIBAQEBAQIBAQECAgICAgQDAgICAgUEBAMEBgUGBgYFBgYGBwkIBgcJBwYGCAsICQoKC******" } }
HttpCode | 错误码 | 错误信息 | 描述 |
---|---|---|---|
400 | InvalidInstanceStatus | The status of the specified instance does not support this request. | 当前实例的状态不支持此操作。 |
400 | InvalidInstanceTypeForGetConsoleScreenshot.Unsupported | The specified InstanceType does not support get instance console screenshot. | 指定的实例类型不支持获取屏幕截图。 |
400 | MissingParameter.InstanceId | The required parameter InstanceId is not supplied. | 实例ID不能为空。 |
400 | InvalidArgument | The specified argument is invalid. | 指定的参数不合法。 |
404 | InvalidInstance.NotFound | The specified instance does not exist. | 指定的实例不存在。 |
429 | FlowLimitExceeded | You've reach the limit on request rate of resources. | 您已超过资源请求限速。 |
500 | InternalError | An internal error has occurred. | 内部错误,请重试。如果多次尝试失败,请提交工单。 |