Returns information about an attribute of an AMI. You can get information about only one attribute per call. These are the available attributes:
description—Description of the AMI provided at image creation
kernel—ID of the kernel associated with the AMI
ramdisk—ID of the RAM disk associated with the AMI
launchPermission—Launch permissions for the AMI
productCodes—Product code associated with the AMI (if any)
blockDeviceMapping—Block device mapping of the AMI
| Name | Description | Required |
|---|---|---|
|
|
The AMI ID. Type: String Default: None |
Yes |
|
|
The AMI attribute to get. Type: String Default: None Valid Values: |
Yes |
The elements in the following table come wrapped in a
DescribeImageAttributeResponse structure.
| Name | Description |
|---|---|
|
|
The ID of the request. Type: xsd:string |
|
|
The ID of the AMI. Type: xsd:string |
|
|
A list of launch permissions. Each launch permission's
information is wrapped in an Type: LaunchPermissionItemType |
|
|
A list of product codes. Each product code's information is
wrapped in an Type: ProductCodeItemType |
|
|
Kernel ID, wrapped in a Type: xsd:string |
|
|
RAM disk ID, wrapped in a Type: xsd:string |
|
|
User-created description of the AMI, wrapped in a
Type: xsd:string |
|
|
List of block device mappings. Each mapping's information
is wrapped in an |
This example lists the launch permissions for the ami-61a54008 AMI
https://ec2.amazonaws.com/?Action=DescribeImageAttribute &ImageId=ami-61a54008 &Attribute=launchPermission &AuthParams
<DescribeImageAttributeResponse xmlns="http://ec2.amazonaws.com/doc/2010-08-31/">
<requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId>
<imageId>ami-61a54008</imageId>
<launchPermission>
<item>
<group>all</group>
</item>
<item>
<userId>495219933132</userId>
</item>
</launchPermission>
</DescribeImageAttributeResponse>This example lists the product code for the ami-2bb65342 AMI.
https://ec2.amazonaws.com/?Action=DescribeImageAttribute &ImageId=ami-2bb65342 &Attribute=productCodes &AuthParams
<DescribeImageAttributeResponse xmlns="http://ec2.amazonaws.com/doc/2010-08-31/">
<requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId>
<imageId>ami-2bb65342</imageId>
<productCodes>
<item>
<productCode>774F4FF8</productCode>
</item>
</productCodes>
</DescribeImageAttributeResponse>