All Products
Search
Document Center

Key Management Service:ListImages

Last Updated:Apr 17, 2025

Queries the images that meet the specified conditions.

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
yundun-hsm:ListImageslist
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
BackupIdstringYes

The ID of the backup.

backup-fdb897sdf****
RegionIdstringYes

The ID of the region.

cn-hangzhou
PageSizeintegerYes

The number of images per page. Valid values: 1 to 1000.

20
CurrentPageintegerYes

The page number.

1
ModestringNo

The image generation mode. Valid values:

  • PERIODIC: It is automatically generated.
  • MANUAL: It is manually generated.
MANUAL

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

4C467B38-3910-447D-87BC-AC049166F216
TotalCountinteger

The total number of images returned.

1000
PageSizeinteger

The number of images per page.

20
CurrentPageinteger

The page number.

1
Imagesarray<object>

The images returned.

imageobject

The image details.

BackupIdstring

The ID of the backup.

backup-fdb897sdf****
ExportTimelong

The time when the image was generated. Unit: milliseconds. The value is a UNIX timestamp.

1782849566738
ImageIdstring

The ID of the image.

image-d79x4k11pmg19****
InstanceIdstring

The ID of the hardware security module (HSM).

hsm-cn-6ja1xknf****
RegionIdstring

The ID of the region.

cn-hangzhou
Remarkstring

The description of the backup.

hsm-test
Statusstring

The status of the image. Valid values:

  • NEW: It is disabled.
  • DELETED: It is deleted.
  • CREATING: It is being created.
  • NORMAL: It is created.
CREATING
Modestring

The image generation mode. Valid values:

  • PERIODIC: It is automatically generated.
  • MANUAL: It is manually generated.
MANUAL
VsmDigeststring

The digest of the HSM.

3kGeHnmQzXwSsfF0Jk9eJYhe2gP6An0/HlYIiZh1****
SourceImageUidstring

The ID of the source image.

image-ooopjygsn****
SourceBackupUidstring

The ID of the source backup.

backup-hodfhaol****
SourceRegionIdstring

The ID of the region in which the source image resides.

cn-shanghai
SourceInstanceIdstring

The ID of the source HSM.

hsm-cn-wz9i2dmefudfxtmb****
CopyTimestring

The time when the image was copied. Unit: milliseconds. The value is a UNIX timestamp.

1641275680000

Examples

Sample success responses

JSONformat

{
  "RequestId": "4C467B38-3910-447D-87BC-AC049166F216",
  "TotalCount": 1000,
  "PageSize": 20,
  "CurrentPage": 1,
  "Images": [
    {
      "BackupId": "backup-fdb897sdf****",
      "ExportTime": 1782849566738,
      "ImageId": "image-d79x4k11pmg19****",
      "InstanceId": "hsm-cn-6ja1xknf****",
      "RegionId": "cn-hangzhou",
      "Remark": "hsm-test",
      "Status": "CREATING",
      "Mode": "MANUAL",
      "VsmDigest": "3kGeHnmQzXwSsfF0Jk9eJYhe2gP6An0/HlYIiZh1****",
      "SourceImageUid": "image-ooopjygsn****",
      "SourceBackupUid": "backup-hodfhaol****",
      "SourceRegionId": "cn-shanghai",
      "SourceInstanceId": "hsm-cn-wz9i2dmefudfxtmb****",
      "CopyTime": "1641275680000"
    }
  ]
}

Error codes

HTTP status codeError codeError message
403NoPermissioncaller has no permission
403Backup.DeletedBackup has been deleted.

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