Obtains screenshot information of an instance for troubleshooting and diagnosis.


We return you the instance screenshot in JPG format, encoded in Base64. However, you can decode the screenshot yourself. We recommend that you use this operation for troubleshooting and diagnosis, and consider the following:

Request parameters 

Name Type Required Description 
Action String Yes The name of this interface. Value: GetInstanceScreenshot.
RegionId String Yes ID of the region where the ECS instance is located. For more information, use DescribeRegions to obtain the latest region list.
InstanceId String Yes Instance ID.
Wakeup Boolean No Whether to wake up instances in sleep mode or not.

Default value: false.

Response parameters

Name Type Description
InstanceId String Instance ID.
screenshot String The JPG format instance screenshot encoded in Base64.


Request example
&<Common Request Parameters>
Success response example

XML format

    <Screenshot>iVBORw0KGgoA... AAABJRU5ErkJggg==</Screenshot>
JSON format
    "RequestId": "22A1933F-AD02-4560-A6A7-53CF2231D942",
    "InstanceId": "i-j5e42sbbthlokka11ech",
    "Screenshot": "iVBORw0KGgoA... AAABJRU5ErkJggg=="
Error response example

XML format

    <Message>The operation is not supported for "i-j5e42sbbthlokkaXXXXX".</Message>
JSON format
    "RequestId": "C38E0D94-C18B-44F3-8C05-6E35BE334088",
    "HostId": "ecs.aliyuncs.com",
    "Code": "NotSupported",
    "Message": "The operation is not supported for "i-j5e42sbbthlokkaXXXXX"."

Error codes

Error codes specific to this interface are as follows.

Error code Error message HTTP status code Description
MissingParameter The input parameter “instanceId” that is mandatory for processing this request is not supplied. 400 InstanceId is required.
InvalidParameter The “instanceId” provided is not valid. 404 The specified InstanceId does not exist.
IncorrectInstanceStatus The instance status “{status}” is not applicable 405 The instance must be in the Running (Running) status.
NotSupported The operation is not supported for “{instanceId}” 405 Phased-out instance types cannot obtain screenshot information.
Throttling Request was denied due to request throttling. 400 You have made too many frequent requests in a short time.