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
try:
# some other codes here
Client = Client(...
...
image = "img-xxxx"
image_desc = client.get_image(image)
print (image_desc.Name, image_desc.Platform)
except ClientError, e:
print (e.get_status_code(), e.get_code(), e.get_requestid(), e.get_msg())