All Products
Search
Document Center

Batch Compute:getImage

Last Updated:May 11, 2018

Method description

Obtains information about an image by specifying the image ID.

Parameter description

Parameter Type Description
imageId String ID of an image

Response description

  • If the call succeeds, a GetImageResponse instance is returned. You can use the getImage() method of this instance to obtain the Image object.

  • If a failure occurs, a ClientException is thrown.

Sample code

  1. try{
  2. GetImageResponse response = client.getImage("img-6vilcufsfd31i010");
  3. //Succeeded
  4. Image image = response.getImage();
  5. }catch(ClientException e){
  6. e.printStackTrace();
  7. // Failed
  8. }