ec2-modify-image-attribute
ec2-modify-image-attribute AMI -l (-a ITEM_VALUE | -r ITEM_VALUE)
ec2-modify-image-attribute AMI -p PRODUCT_CODE [-p PRODUCT_CODE ...]
Modifies an attribute for the specified AMI.
Attribute Name | Type | Description | |||
---|---|---|---|---|---|
launchPermission | List | Controls who has permission to launch the AMI. You can grant launch permissions
by adding user IDs or make the AMI public by adding the all group. To learn
more about sharing AMIs see the section called “Sharing AMIs”.
|
|||
productCodes | List | Associates product codes with an AMI. This allows a developer to charge a user for using the AMI.
The product code attribute is a write once attribute. After a product code is set for an AMI it can not be altered or removed. AMIs are currently limited to one product code. |
A table containing the following information is returned:
-
Attribute type identifier.
-
ID of the AMI on which attributes are being modified.
-
Action performed on the attribute.
-
Attribute or attribute list item value type.
-
Attribute or attribute list item value.
Errors are displayed on stderr.
Option | Definition | Required? | Example |
---|---|---|---|
-l
|
Modifies the launchPermission property. | Yes | -l |
-a ITEM_VALUE | -r ITEM_VALUE
|
Adds or removes an attribute item. The value of the item is ITEM_VALUE .
The type of the item is inferred from the item value.
For launchPermission there are two item types:
|
Yes | -a all |
-p PRODUCT_CODE
|
Sets the productCodes property. | Yes | -p 774F4FF8 |
$
ec2-modify-image-attribute ami-5bae4b32 -l -a 495219933132
launchPermission ami-5bae4b32 ADD userId 495219933132
$
ec2-modify-image-attribute ami-5bae4b32 -p 774F4FF8
productCodes ami-5bae4b32 productCode 774F4FF8