DescribeImageInfos

Updated at: 2025-03-26 02:57

The details of available images are queried.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
OperationAccess levelResource typeCondition keyAssociated operation
ens:DescribeImageInfosget
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ParameterTypeRequiredDescriptionExample
OsTypestringNo

The operating system (OS). You can specify only one OS in a request. If you do not specify a value for this parameter, images for all supported OSs are queried. Valid values:

  • linux
  • windows
linux

Response parameters

ParameterTypeDescriptionExample
ParameterTypeDescriptionExample
object
Codeinteger

The HTTP status code that is returned.

0
Imagesarray<object>

The information about images.

Imageobject

The information about the image.

Descriptionstring

The description of the image.

centos_6_08_64_20G_alibase_2017****
ImageIdstring

The ID of the image.

centos_6_08_64_20G_alibase_2017****
ImageSizestring

The size of the image. Unit: GiB.

20
ImageVersionstring

The version of the image.

6.8
OSNamestring

The type of the image. Valid values: centos, debian, ubuntu, and windows.

centos
OSTypestring

The type of the operating system.

linux
ComputeTypestring

The computing type of the image. Valid values:

  • ens_vm: x86 computing.
  • arm_vm: ARM computing.
  • bare_metal: x86 bare machine.
  • pcfarm: heterogeneous computing.
ens_vm
DiskDeviceMappingsarray<object>

The mappings between disks and snapshots in the image.

DiskDeviceMappingobject

The mappings between the disk and the snapshot in the image.

Typestring

The type of the disk. Valid values: System and Data.

Data
Sizestring

The size of the image. Unit: GB.

100
Formatstring

The format of the image.

The format of the image. raw qcow2
imageIdstring

The ID of the image.

i-test
RegionIdstring

The ID of the region.

cn-shenzhen
RequestIdstring

The request ID.

5568A08C-10A9-47F3-902F-647298B463FB

Examples

Sample success responses

JSONformat

{
  "Code": 0,
  "Images": {
    "Image": [
      {
        "Description": "centos_6_08_64_20G_alibase_2017****",
        "ImageId": "centos_6_08_64_20G_alibase_2017****",
        "ImageSize": "20",
        "ImageVersion": "6.8",
        "OSName": "centos",
        "OSType": "linux",
        "ComputeType": "ens_vm",
        "DiskDeviceMappings": {
          "DiskDeviceMapping": [
            {
              "Type": "Data",
              "Size": "100",
              "Format": "The format of the image.\nraw\nqcow2",
              "imageId": "i-test"
            }
          ]
        },
        "RegionId": "cn-shenzhen"
      }
    ]
  },
  "RequestId": "5568A08C-10A9-47F3-902F-647298B463FB"
}

Error codes

HTTP status codeError codeError messageDescription
HTTP status codeError codeError messageDescription
400MissingParameterThe input parameter domainName that is mandatory for processing this request is not supplied.-
400InstanceIdNotFoundThe input parameter instancdId that is not found.The specified instance ID does not exist.
400NoPermissionPermission denied.-
400CallInterfaceCall Interface Happen Error.An error occurred when you call the operation.
400InvalidParameter.%sThe specified field %s invalid. Please check it again.-

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
Change timeSummary of changesOperation
2025-01-10The Error code has changed. The response structure of the API has changedView Change Details
2024-10-16The Error code has changed. The response structure of the API has changedView Change Details
2023-05-09API Description Update. The Error code has changedView Change Details
  • On this page (1)
  • Debugging
  • Authorization information
  • Request parameters
  • Response parameters
  • Examples
  • Error codes
  • Change history
Feedback