ModifyImageAttribute
The ModifyImageAttribute
operation modifies an
attribute of an AMI.
Request Parameters
The following table describes the request parameters for
ModifyImageAttribute
. Parameter names are case
sensitive.
Name | Description | Required |
---|---|---|
|
AMI ID to modify. Type: xsd:string |
Yes |
|
Adds or removes launch permissions for the AMI. Type: LaunchPermissionOperationType[] |
Choice |
|
Attaches a product code to the AMI, allowing developers to charge for the use of their AMIs. Currently only one product code can be associated with an AMI. Once set, the product code cannot be changed or reset. Type: ProductCodeItemType[] |
Choice |
Response Elements
The following table describes the default response tags included
in ModifyImageAttribute
responses.
Name | Description |
---|---|
|
Type: xsd:boolean |
Sample Request - Launch Permission
<ModifyImageAttribute xmlns="http://ec2.amazonaws.com/doc/2008-08-08"> <imageId>ami-61a54008</imageId> <launchPermission> <add> <item> <group>all</group> </item> <item> <userId>495219933132</userId> </item> </add> <launchPermission> </ModifyImageAttribute>
Sample Request - Product Codes
<ModifyImageAttribute xmlns="http://ec2.amazonaws.com/doc/2008-08-08"> <imageId>ami-61a54008</imageId> <productCodes> <item> <productCode>774F4FF8</productCode> </item> <productCodes> </ModifyImageAttribute>
Sample Response
<ModifyImageAttributeResponse xmlns="http://ec2.amazonaws.com/doc/2008-08-08"> <return>true</return> </ModifyImageAttributeResponse>