DescribeImageAttribute
Description
Returns information about an attribute of an AMI. Only one attribute can be specified per call.
Request Parameters
| Name | Description | Required |
|---|---|---|
| The ID of the AMI for which an attribute will be described. Type: String Default: None | Yes |
| Describes the launch permissions of the AMI. Type: String Default: None | No |
| Describes the product code associated with the AMI. Type: String Default: None | No |
| Describes the ID of the kernel associated with the AMI. Type: String Default: None | No |
| Describes the ID of the RAM disk associated with the AMI. Type: String Default: None | No |
| Describes the mapping that defines native device names to use when exposing virtual devices. Type: String Default: None | No |
| Describes the operating system platform. Type: String Default: None | No |
Response Elements
| Name | Description |
|---|---|
|
Type: |
Ancestor: None
Children: requestId, imageId, launchPermission, productCodes, kernel, ramdisk, and blockDeviceMapping
requestId
The ID of the request.
Type: xsd:string
Ancestor: DescribeImageAttributeResponseType
Children: None
imageId
The ID of the AMI.
Type: xsd:string
Ancestor: DescribeImageAttributeResponseType
Children: None
launchPermission
Launch permissions set.
Type: LaunchPermissionListType
Ancestor: DescribeImageAttributeResponseType
Children: item
item
Information for launch permissions.
Type: LaunchPermissionItemType
Ancestor: launchPermission
Children: userId, group
userId
AWS Access Key ID.
Type: xsd:string
Ancestor: item
Children: None
group
Name of the group. Currently supports "all."
Type: xsd:string
Ancestor: item
Children: None
productCodes
Product codes set.
Type: ProductCodeListType
Ancestor: DescribeImageAttributeResponseType
Children: item
item
Information for one product code.
Type: ProductCodeItemType
Ancestor: productCodes
Children: productCode
productCode
Product code.
Type: xsd:string
Ancestor: item
Children: None
kernel
Kernel set.
Type: NullableAttributeValueType
Ancestor: DescribeImageAttributeResponseType
Children: value
value
ID of the kernel or RAM disk.
Type: xsd:string
Ancestor: kernel
Children: None
ramdisk
RAM disk set.
Type: NullableAttributeValueType
Ancestor: DescribeImageAttributeResponseType
Children: value
value
ID of the kernel or RAM disk.
Type: xsd:string
Ancestor: ramdisk
Children: None
blockDeviceMapping
Block device mapping set.
Type: BlockDeviceMappingType
Ancestor: DescribeImageAttributeResponseType
Children: item
item
Information for one block device mapping.
Type: BlockDeviceMappingItemType
Ancestor: blockDeviceMapping
Children: virtualName, deviceName
virtualName
The virtual name.
Type: xsd:string
Ancestor: item
Children: None
deviceName
The device name (e.g., /dev/sdh).
Type: xsd:string
Ancestor: item
Children: None
Examples
Example Request
This example lists the launch permissions for the ami-61a54008 AMI
https://ec2.amazonaws.com/?Action=DescribeImageAttribute&ImageId=ami-2bb65342&Attribute=launchPermission&AuthParams
Example Response
<DescribeImageAttributeResponse xmlns="http://ec2.amazonaws.com/doc/2009-08-15/">
<imageId>ami-61a54008</imageId>
<launchPermission>
<item>
<group>all</group>
</item>
<item>
<userId>495219933132</userId>
</item>
</launchPermission>
</DescribeImageAttributeResponse>
Example Request
This example lists the product code for the ami-2bb65342AMI.
https://ec2.amazonaws.com/?Action=DescribeImageAttribute&ImageId=ami-2bb65342&Attribute=productCodes&AuthParams
Example Response
<DescribeImageAttributeResponse xmlns="http://ec2.amazonaws.com/doc/2009-08-15/">
<imageId>ami-61a54008</imageId>
<productCodes>
<item>
<productCode>774F4FF8</productCode>
</item>
</productCodes>
</DescribeImageAttributeResponse>