The ModifyImageAttribute operation modifies an attribute of an AMI.
Access
public
Parameters
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
|
Required |
The ID of the AMI whose attribute you want to modify. |
|
|
|
Optional |
An associative array of parameters that can have the following keys:
|
Returns
Type |
Description |
|---|---|
|
A |
Examples
Modify an attribute of an image.
$ec2 = new AmazonEC2();
$response = $ec2->modify_image_attribute('ami-42ad462b', array(
'LaunchPermission' => array(
'Add' => array(array('Group' => 'all'))
)
));
var_dump($response->isOK());
Result:
bool(true)
Changelog
Version |
Description |
|---|---|
|
1.3.4 |
The ModifyImageAttribute operation introduced backwards-incompatible changes in the |
Related Methods
Source
Method defined in services/ec2.class.php | Toggle source view (43 lines) | View on GitHub

