All Products
Search
Document Center

get_image

Last Updated: May 14, 2018

Parameter description

Parameter Type Description
image CreateResponse object, str, dict Image ID

Response description

The get_image method returns a GetResponse object, which encapsulates all interfaces of the Image class.

Image class

Parameter description

Parameter Type Description
properties dict, str, Image object Status information

Attribute description

Attribute Type Description
Name str Image name
Id str Image ID
OwnerId int Image owner ID
Description str Brief description of the image
CreationTime str Creation time of the image
Platform str Image platform
EcsImageId str ECS image ID bound to the image

Example

  1. try:
  2. # some other codes here
  3. Client = Client(...
  4. ...
  5. image = "img-xxxx"
  6. image_desc = client.get_image(image)
  7. print (image_desc.Name, image_desc.Platform)
  8. except ClientError, e:
  9. print (e.get_status_code(), e.get_code(), e.get_requestid(), e.get_msg())