Queries available custom images that are most recently created in a specific image family.
Operation description
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ecs:DescribeImageFromFamily |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The ID of the region in which to create the custom image. You can call the DescribeRegions operation to query the most recent region list. |
cn-hangzhou |
| ImageFamily |
string |
Yes |
The family name of the image that you want to use to create the instances. You can configure image families for custom images, public images, community images, and shared images. For more information, see Overview of image families. |
hangzhou-daily-update |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The ID of the request. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
| Image |
object |
The image information. |
|
| CreationTime |
string |
The time when the image was created. |
2018-01-10T01:01:10Z |
| Status |
string |
The state of the image. Valid values:
|
Available |
| ImageFamily |
string |
The name of the image family. |
testImageFamily |
| Progress |
string |
The image creation progress in percentage. |
100 |
| IsCopied |
boolean |
Indicates whether the image is a copy of another image. |
false |
| IsSupportIoOptimized |
boolean |
Indicates whether the image can be used on I/O optimized instances. |
true |
| ImageOwnerAlias |
string |
The alias of the image owner. Valid values:
|
self |
| IsSupportCloudinit |
boolean |
Indicates whether cloud-init is supported. |
true |
| ImageVersion |
string |
The image version. |
2 |
| Usage |
string |
Indicates whether the image has been used to create ECS instances. Valid values:
|
none |
| IsSelfShared |
string |
Indicates whether the custom image was shared to other Alibaba Cloud accounts. |
true |
| Description |
string |
The description of the volume. |
testDescription |
| Size |
integer |
The size of the image. Unit: GiB. |
80 |
| Platform |
string |
The operating system. |
Aliyun |
| ImageName |
string |
The name of the image. |
testImageName |
| OSName |
string |
The display name of the operating system in Chinese. |
Alibaba Cloud Linux 2.1903 |
| ImageId |
string |
The image ID. |
m-bp1g7004ksh0oeuc**** |
| OSType |
string |
The type of the operating system. Valid values:
|
linux |
| IsSubscribed |
boolean |
Indicates whether you have subscribed to the service terms of the image product corresponding to the image product code. |
false |
| ProductCode |
string |
The product code of the Alibaba Cloud Marketplace image. |
jxsc00**** |
| Architecture |
string |
The architecture of the image. Valid values:
|
x86_64 |
| DiskDeviceMappings |
object |
||
| DiskDeviceMapping |
array<object> |
The mappings between the disk and the snapshot in the image. |
|
|
object |
|||
| Type |
string |
The image type. |
custom |
| ImportOSSBucket |
string |
The OSS bucket that contains the imported image file. |
testEcsImport |
| SnapshotId |
string |
The snapshot ID. |
s-bp17ot2q7x72ggtw**** |
| ImportOSSObject |
string |
The OSS object to which the imported image belongs. |
imageImport |
| Size |
string |
The size of the disk. Unit: GiB. |
80 |
| Device |
string |
The device name of the disk. Example: /dev/xvdb. Note
This parameter will be removed in the future. To ensure compatibility, we recommend that you use other parameters. |
/dev/xvdb |
| Format |
string |
The image format. |
qcow2 |
| Tags |
object |
||
| Tag |
array<object> |
The tags of the image. |
|
|
object |
|||
| TagValue |
string |
The tag value of the custom image. |
TestValue |
| TagKey |
string |
The tag key of the custom image. |
TestKey |
Examples
Success response
JSON format
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
"Image": {
"CreationTime": "2018-01-10T01:01:10Z",
"Status": "Available",
"ImageFamily": "testImageFamily",
"Progress": "100",
"IsCopied": false,
"IsSupportIoOptimized": true,
"ImageOwnerAlias": "self",
"IsSupportCloudinit": true,
"ImageVersion": "2",
"Usage": "none",
"IsSelfShared": "true",
"Description": "testDescription",
"Size": 80,
"Platform": "Aliyun",
"ImageName": "testImageName",
"OSName": "Alibaba Cloud Linux 2.1903",
"ImageId": "m-bp1g7004ksh0oeuc****",
"OSType": "linux",
"IsSubscribed": false,
"ProductCode": "jxsc00****",
"Architecture": "x86_64",
"DiskDeviceMappings": {
"DiskDeviceMapping": [
{
"Type": "custom",
"ImportOSSBucket": "testEcsImport",
"SnapshotId": "s-bp17ot2q7x72ggtw****",
"ImportOSSObject": "imageImport",
"Size": "80",
"Device": "/dev/xvdb",
"Format": "qcow2"
}
]
},
"Tags": {
"Tag": [
{
"TagValue": "TestValue",
"TagKey": "TestKey"
}
]
}
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 403 | InvalidUser.Unauthorized | The user is not authorized. | |
| 404 | InvalidRegionId.NotFound | The RegionId provided does not exist. | The specified region does not exist. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.