You can call this operation to obtain screenshots of an instance.


ECS returns an instance screenshot that is in the JPG format and encoded in Base64. You must decode the screenshot yourself. We recommend that you use this operation for troubleshooting and diagnosis, and take note of the following points:

  • The instance must be in the Running state.
  • For phased-out instance types, you cannot obtain screenshot information. For more information, see Phased-out instance types.
  • If you call this operation in the same instance for multiple times, the call interval must be at least 10 seconds. Otherwise, the Throttling error code is returned.


OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes GetInstanceScreenshot

The operation that you want to perform. Set the value to GetInstanceScreenshot.

InstanceId String Yes i-bp1gbz20g229bvu5****

The ID of the instance.

RegionId String Yes cn-shenzhen

The region ID of the instance. You can call the DescribeRegions operation to query the most recent region list.

WakeUp Boolean No false

Specifies whether to wake up the instance that is in sleep mode.

Default value: false.

Response parameters

Parameter Type Example Description
InstanceId String i-bp1gbz20g229bvu5****

The ID of the instance.

RequestId String 473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

The ID of the request.

Screenshot String iVBORw0KGgoA...AAABJRU5ErkJggg==

The JPG-formatted instance screenshot, which is encoded in Base64.


Sample requests
&<Common request parameters>

Sample success responses

XML format


JSON format

    "RequestId": "22A1933F-AD02-4560-A6A7-53CF2231D942",
    "InstanceId": "i-bp1gbz20g229bvu5****",
    "Screenshot": "iVBORw0KGgoA...AAABJRU5ErkJggg=="

Error codes

HTTP status code Error code Error message Description
400 MissingParameter %s The error message returned because a required parameter is not specified.
404 InvalidParameter %s The error message returned because the specified parameter is invalid.
405 IncorrectInstanceStatus %s The error message returned because this operation is not supported while the instance is in the current state.
405 NotSupported %s The error message returned because the current operation is invalid.
429 Throttling %s The error message returned because the request is denied due to throttling.

For a list of error codes, visit the API Error Center.