方法说明
列举当前用户的镜像,支持分页(listImages)。
参数说明
| 参数 | 类型 | 是否必选 | 说明 |
|---|---|---|---|
| type | String | 否 | 重载方法中有这个参数, type= ListImagesRequest.SYSTEM 则返回系统提供的镜像列表。 |
| marker | String | 否 | 本页起始资源标识符。默认为空字符串。 |
| maxItemCount | int | 否 | 返回条数,最大取值200,默认200 |
返回值说明
成功后返回一个 ListImagesResponse 实例, 可以通过这个实例的 getItems 方法,拿到 List<Image> 对象。
如果失败,抛出异常: ClientException。
代码示例
try{ListImagesResponse response = client.listImages();//成功List<Image> list = response.getItems();}catch(ClientException e){e.printStackTrace();//失败}
Image 属性
| 属性 | 类型 | 说明 |
|---|---|---|
| id | String | 镜像ID |
| name | String | 镜像名称 |
| ownerId | long | 所有者ID |
| description | String | 简短描述 |
| type | String | 类型,”System” 或则 “Self” |
| ecsImageId | String | ECS镜像ID |
| creationTime | Date | 创建时间 |
| platform | String | 操作系统, Image.LINUX 或者 Image.WINDOWS |