ModifyImageAttribute
The ModifyImageAttribute
operation modifies an
attribute of an AMI.
Attributes
Attribute Name | Type | Description |
---|---|---|
|
List |
Controls who has permission to launch the AMI. Launch permissions
can be granted to specific users by adding userIds. To make the AMI public,
add the |
|
List |
Associates a product code with AMIs. This allows developers to charge users for using AMIs. The user must be signed up for the product before they can launch the AMI. This is a write once attribute; after it is set, it cannot be changed or removed. |
Request Parameters
The following table describes the request parameters for
ModifyImageAttribute
. Parameter names are case
sensitive.
Name | Description | Required |
---|---|---|
|
AMI ID to modify. Type: String |
Yes |
|
Specifies the attribute to modify. See the preceding attributes table for supported attributes. Type: String |
Yes |
|
Specifies the operation to perform on the attribute. See the preceding attributes table for supported operations for attributes. Type: String Valid Values: Condition: Required for |
Conditional |
|
User IDs to add to or remove from the
Type: String Condition: Required for |
Conditional |
|
User groups to add to or remove from the
Type: String Condition: Required for |
Conditional |
|
Attaches a product code to the AMI. Currently only one product code can be associated with an AMI. Once set, the product code cannot be changed or reset. Type: String Condition: Required for |
Conditional |
Response Elements
The following table describes the default response tags included
in ModifyImageAttribute
responses.
Name | Description |
---|---|
|
Type: xsd:boolean |
Sample Request - Launch Permission
https://ec2.amazonaws.com/ ?Action=ModifyImageAttribute &ImageId=ami-61a54008 &Attribute=launchPermission &OperationType=add &Group.1=all &UserId.1=495219933132 &...auth parameters...
Sample Request - Product Codes
https://ec2.amazonaws.com/ ?Action=ModifyImageAttribute &ImageId=ami-61a54008 &Attribute=productCodes &ProductCode.1=774F4FF8 &...auth parameters...
Sample Response
<ModifyImageAttributeResponse xmlns="http://ec2.amazonaws.com/doc/2008-08-08"> <return>true</return> </ModifyImageAttributeResponse>