DescribeImages
Description
Returns information about AMIs, AKIs, and ARIs. This includes image type, product codes, architecture, and kernel and RAM disk IDs. Images available to you include public images, private images that you own, and private images owned by other users for which you have explicit launch permissions.
Launch permissions fall into three categories:
Launch Permission | Description |
---|---|
public | The owner of the AMI granted launch permissions for the AMI
to the all group. All users have launch permissions
for these AMIs. |
explicit | The owner of the AMI granted launch permissions to a specific user. |
implicit | A user has implicit launch permissions for all AMIs he or she owns. |
The list of AMIs returned can be modified by specifying AMI IDs, AMI owners, or users with launch permissions. If no options are specified, Amazon EC2 returns all AMIs for which the user has launch permissions.
If you specify one or more AMI IDs, only AMIs that have the specified IDs are returned. If you specify an invalid AMI ID, a fault is returned. If you specify an AMI ID for which you do not have access, it will not be included in the returned results.
If you specify one or more AMI owners, only AMIs from the
specified owners and for which you have access are returned. The
results can include the account IDs of the specified owners,
amazon
for AMIs owned by Amazon or
self
for AMIs that you own.
If you specify a list of executable users, only users that have
launch permissions for the AMIs are returned. You can specify
account IDs (if you own the AMI(s)), self
for AMIs for which you own or have explicit permissions, or
all
for public AMIs.
Note | |
---|---|
Deregistered images are included in the returned results for an unspecified interval after deregistration. |
Request Parameters
Name | Description | Required |
---|---|---|
| Returns AMIs for which the specified user has explicit launch permissions. The user ID can be a user's account ID, self to return AMIs for which the sender of the request has explicit launch permissions, or all to return AMIs with public launch permissions. Type: String Default: None | No |
| AMI IDs to describe. Type: String Default: Returns all AMIs. | No |
| Returns AMIs owned by the specified owner. Multiple owners can be specified. The IDs amazon, self, and explicit can be used to include AMIs owned by Amazon, AMIs owned by the user, and AMIs for which the user has explicit launch permissions, respectively. Type: String Default: None | No |
Response Elements
Name | Description |
---|---|
|
Type: |
Ancestor: None
Children: requestId
, imagesSet
requestId
The ID of the request.
Type: xsd:string
Ancestor: DescribeImagesResponseType
Children: None
imagesSet
Image set.
Type: DescribeImagesResponseInfoType
Ancestor: DescribeImagesResponseType
Children: item
item
Information for one image.
Type: DescribeImagesResponseItemType
Ancestor: imagesSet
Children: imageId
, imageLocation
, imageState
, imageOwnerId
, isPublic
, productCodes
, architecture
, imageType
, kernelId
, ramdiskId
, platform
, stateReason
, imageOwnerAlias
, name
, description
, rootDeviceType
, rootDeviceName
, and blockDeviceMapping
imageId
The ID of the AMI.
Type: xsd:string
Ancestor: item
Children: None
imageLocation
The location of the AMI.
Type: xsd:string
Ancestor: item
Children: None
imageState
Current state of the AMI. If the operation returns available, the image is successfully registered and available for launching. If the operation returns deregistered, the image is deregistered and no longer available for launching.
Type: xsd:string
Ancestor: item
Children: None
imageOwnerId
AWS Access Key ID of the image owner.
Type: xsd:string
Ancestor: item
Children: None
isPublic
Returns true if this image has public launch permissions. Returns false if it only has implicit and explicit launch permissions.
Type: xsd:boolean
Ancestor: item
Children: None
productCodes
Product codes of the AMI.
Type: ProductCodesSetType
Ancestor: item
Children: item
item
Information for one product code.
Type: ProductCodesSetItemType
Ancestor: productCodes
Children: productCode
productCode
Product code.
Type: xsd:string
Ancestor: item
Children: None
architecture
The architecture of the image.
Type: xsd:string
Valid Values: i386
| x86_64
Ancestor: item
Children: None
imageType
The type of image (machine, kernel, or ramdisk).
Type: xsd:string
Ancestor: item
Children: None
kernelId
The kernel associated with the image, if any. Only applicable for machine images.
Type: xsd:string
Ancestor: item
Children: None
ramdiskId
The RAM disk associated with the image, if any. Only applicable for machine images.
Type: xsd:string
Ancestor: item
Children: None
platform
The operating platform of the instance.
Type: xsd:string
Ancestor: item
Children: None
stateReason
The reason for the state change.
Type: StateReasonType
Ancestor: item
Children: code
, message
code
Reason code for the state change.
Type: xsd:string
Ancestor: stateReason
Children: None
message
Message for the state change.
Type: xsd:string
Ancestor: stateReason
Children: None
imageOwnerAlias
The AWS account alias (e.g., "amazon", "redhat", "self", etc.) or AWS account ID that owns the AMI.
Type: xsd:string
Ancestor: item
Children: None
name
The name of the AMI that was provided during image creation.
Type: xsd:string
Ancestor: item
Children: None
description
The description of the AMI that was provided during image creation.
Type: xsd:string
Ancestor: item
Children: None
rootDeviceType
The root device type used by the AMI. The AMI can use an Amazon EBS or instance store root device.
Type: xsd:string
Valid Values: ebs
| instance-store
Ancestor: item
Children: None
rootDeviceName
The root device name (e.g., /dev/sda1).
Type: xsd:string
Ancestor: item
Children: None
blockDeviceMapping
Specifies how block devices are exposed to the instance.
Type: BlockDeviceMappingType
Ancestor: item
Children: item
item
Information for one block device mapping.
Type: BlockDeviceMappingItemType
Ancestor: blockDeviceMapping
Children: deviceName
, virtualName
, ebs
, and noDevice
deviceName
The device name (e.g., /dev/sdh).
Type: xsd:string
Ancestor: item
Children: None
virtualName
The virtual device name.
Type: xsd:string
Ancestor: item
Children: None
ebs
Specifies parameters used to automatically setup Amazon EBS volumes when the instance is launched.
Type: EbsBlockDeviceType
Ancestor: item
Children: snapshotId
, volumeSize
, and deleteOnTermination
snapshotId
The ID of the snapshot.
Type: xsd:string
Ancestor: ebs
Children: None
volumeSize
The size of the volume.
Type: xsd:string
Ancestor: ebs
Children: None
deleteOnTermination
Specifies whether the Amazon EBS volume is deleted on instance termination.
Type: xsd:boolean
Ancestor: ebs
Children: None
noDevice
Specifies the device name to suppress during instance launch.
Type: EmptyElementType
Ancestor: item
Children:
Examples
Example Request
This example describes the ami-be3adfd7 AMI.
https://ec2.amazonaws.com/?Action=DescribeImages&ImageId.1=ami-be3adfd7&AuthParams
Example Response
<DescribeImagesResponse xmlns="http://ec2.amazonaws.com/doc/2009-10-31/"> <imagesSet> <item> <imageId>ami-be3adfd7</imageId> <imageLocation>amazon/getting-started</imageLocation> <imageState>available</imageState> <imageOwnerId>206029621532</imageOwnerId> <isPublic>true</isPublic> <architecture>i386</architecture> <imageType>machine</imageType> <kernelId>aki-d3376696</kernelId> <ramdiskId>ari-e73766a2</ramdiskId> <imageOwnerAlias>amazon</imageOwnerAlias> <name>getting-started</name> <description>Fedora 8 v1.11 i386 lvm-rootVG-rootFS ext3 ec2pnp enabled</description> <rootDeviceType>ebs</rootDeviceType> <rootDeviceName>/dev/sda</rootDeviceName> <blockDeviceMapping> <item> <deviceName>/dev/sda</deviceName> <ebs> <snapshotId>snap-32885f5a</snapshotId> <volumeSize>15</volumeSize> <deleteOnTermination>false</deleteOnTermination> </ebs> </item> </blockDeviceMapping> </item> </imagesSet> </DescribeImagesResponse>