The ModifyImageAttribute operation modifies an
attribute of an AMI.
Currently the only attribute supported is launchPermission. By modifying this attribute it is possible to make an AMI
public or to grant specific users launch permissions for the AMI. To make the AMI public add the group=all
attribute item. To grant launch permissions for a specific user add a userId=<userid> attribute item.
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. | Yes | ec2:LaunchPermissionOperationType |
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-19">
<imageId>ami-61a54008</imageId>
<launchPermission>
<add>
<item>
<group>all</group>
</item>
<item>
<userId>495219933132</userId>
</item>
</add>
<launchPermission>
</ModifyImageAttribute><ModifyImageAttributeResponse xmlns="http://ec2.amazonaws.com/doc/2007-01-19"> <return>true</return> </ModifyImageAttributeResponse>