ModifyImageAttribute
The ModifyImageAttribute operation modifies an
attribute of an AMI.
| Attribute Name | Type | Description |
|---|---|---|
| launchPermission | List | Controls who has permission to launch the AMI. Launch permissions
can be granted to specific users by adding userIds. The AMI can be made
public by adding the all group. |
| productCodes | List | Associates product codes with AMIs. This allows a developer to charge a user extra for using the AMIs. The user must be signed up for the product before they can launch the AMI. productCodes is a write once attribute - once it has been set it can not be changed or removed. |
The following table describes the request parameters for
ModifyImageAttribute. Parameter names are case
sensitive.
| Element Name | Definition | Required? | Type |
|---|---|---|---|
imageId
|
AMI ID to modify an attribute on. | Yes |
xsd:string
|
launchPermission
|
Adds or removes launch permissions for the AMI. | Choice |
ec2:LaunchPermissionOperationType
|
productCodes
|
Attaches product codes to the AMI. Currently only one product code may be associated with an AMI. Once set, the product code can not be changed or reset. | Choice |
ec2:ProductCodeItemType[]
|
The following table describes the default response tags included
in ModifyImageAttribute responses.
| Element Name | Definition | Type |
|---|---|---|
return
|
true if the operation succeeded,
otherwise false.
|
xsd:boolean
|
<ModifyImageAttribute xmlns="http://ec2.amazonaws.com/doc/2007-01-03">
<imageId>ami-61a54008</imageId>
<launchPermission>
<add>
<item>
<group>all</group>
</item>
<item>
<userId>495219933132</userId>
</item>
</add>
<launchPermission>
</ModifyImageAttribute>
<ModifyImageAttribute xmlns="http://ec2.amazonaws.com/doc/2007-01-03">
<imageId>ami-61a54008</imageId>
<productCodes>
<item>
<productCode>774F4FF8</productCode>
</item>
<productCodes>
</ModifyImageAttribute>
<ModifyImageAttributeResponse xmlns="http://ec2.amazonaws.com/doc/2007-01-03"> <return>true</return> </ModifyImageAttributeResponse>