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 |
---|---|---|
|
Type: |
Ancestor: None
Children: executableBySet
, imagesSet
, and ownersSet
executableBySet
Executable set.
Type: DescribeImagesExecutableBySetType
Ancestor: DescribeImagesType
Children: item
Yes, but can be empty
item
Information for one user.
Type: DescribeImagesExecutableByType
Ancestor: executableBySet
Children: user
No
user
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: xsd:string
Default: None
Ancestor: item
Children: None
No
imagesSet
Image set.
Type: DescribeImagesInfoType
Ancestor: DescribeImagesType
Children: item
Yes, but can be empty
item
Information for one image.
Type: DescribeImagesItemType
Ancestor: imagesSet
Children: imageId
No
imageId
AMI IDs to describe.
Type: xsd:string
Default: Returns all AMIs.
Ancestor: item
Children: None
No
ownersSet
Information about an owner.
Type: DescribeImagesOwnersType
Ancestor: DescribeImagesType
Children: item
Yes, but can be empty
item
Information for one owner.
Type: DescribeImagesOwnerType
Ancestor: ownersSet
Children: owner
No
owner
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: xsd:string
Default: None
Ancestor: item
Children: None
No
Response Elements
Name | Description |
---|---|
|
Type: DescribeImagesResponseType Ancestor: None Children: |
|
The ID of the request. Type: xsd:string Ancestor: Children: None |
|
Image set. Type: DescribeImagesResponseInfoType Ancestor: Children: |
|
Information for one image. Type: DescribeImagesResponseItemType Ancestor: Children: |
|
The ID of the AMI. Type: xsd:string Ancestor: Children: None |
|
The location of the AMI. Type: xsd:string Ancestor: Children: None |
|
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: Children: None |
|
AWS Access Key ID of the image owner. Type: xsd:string Ancestor: Children: None |
|
Returns true if this image has public launch permissions. Returns false if it only has implicit and explicit launch permissions. Type: xsd:boolean Ancestor: Children: None |
|
Product codes of the AMI. Type: ProductCodesSetType Ancestor: Children: |
|
Information for one product code. Type: ProductCodesSetItemType Ancestor: Children: |
|
Product code. Type: xsd:string Ancestor: Children: None |
|
The architecture of the image. Type: xsd:string Valid Values: Ancestor: Children: None |
|
The type of image (machine, kernel, or ramdisk). Type: xsd:string Ancestor: Children: None |
|
The kernel associated with the image, if any. Only applicable for machine images. Type: xsd:string Ancestor: Children: None |
|
The RAM disk associated with the image, if any. Only applicable for machine images. Type: xsd:string Ancestor: Children: None |
|
The operating platform of the instance. Type: xsd:string Ancestor: Children: None |
|
The reason for the state change. Type: StateReasonType Ancestor: Children: |
|
Reason code for the state change. Type: xsd:string Ancestor: Children: None |
|
Message for the state change. Type: xsd:string Ancestor: Children: None |
|
The AWS account alias (e.g., "amazon", "redhat", "self", etc.) or AWS account ID that owns the AMI. Type: xsd:string Ancestor: Children: None |
|
The name of the AMI that was provided during image creation. Type: xsd:string Ancestor: Children: None |
|
The description of the AMI that was provided during image creation. Type: xsd:string Ancestor: Children: None |
|
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: Ancestor: Children: None |
|
The root device name (e.g., /dev/sda1). Type: xsd:string Ancestor: Children: None |
|
Specifies how block devices are exposed to the instance. Type: BlockDeviceMappingType Ancestor: Children: |
|
Information for one block device mapping. Type: BlockDeviceMappingItemType Ancestor: Children: |
|
The device name (e.g., /dev/sdh). Type: xsd:string Ancestor: Children: None |
|
The virtual device name. Type: xsd:string Ancestor: Children: None |
|
Specifies parameters used to automatically setup Amazon EBS volumes when the instance is launched. Type: EbsBlockDeviceType Ancestor: Children: |
|
The ID of the snapshot. Type: xsd:string Ancestor: Children: None |
|
The size of the volume. Type: xsd:string Ancestor: Children: None |
|
Specifies whether the Amazon EBS volume is deleted on instance termination. Type: xsd:boolean Ancestor: Children: None |
|
Specifies the device name to suppress during instance launch. Type: EmptyElementType Ancestor: Children: |
|
This element contains no options. Type: xsd:string Ancestor: Children: None |
Examples
Example Request
This example describes the ami-be3adfd7 AMI.
<DescribeImages xmlns="http://ec2.amazonaws.com/doc/2009-10-31/"> <executableBySet> <item> <user>all</user> </item> </executableBySet> <ownersSet/> <imagesSet> <item> <imageId>ami-be3adfd7</imageId> </item> </imagesSet> </DescribeImages>
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>