| Did this page help you? Yes No Tell us about it... |
Modifies an attribute of an AMI.
| Name | Description | Required |
|---|---|---|
|
|
The AMI ID. Type: String Default: None |
Yes |
|
|
Adds the specified AWS account ID to the AMI's list of launch permissions. Type: String Default: None |
No |
|
|
Removes the specified AWS account ID from the AMI's list of launch permissions. Type: String Default: None |
No |
|
|
Adds the specified group to the image's list of launch
permissions. The only valid value is Type: String Valid Value: Default: None |
No |
|
|
Removes the specified group from the image's list of launch
permissions. The only valid value is Type: String Valid Value: Default: None |
No |
|
|
Adds the specified product code to the specified Amazon S3-backed AMI. Once you add a product code to an AMI, it can't be removed. Type: String Default: None |
No |
|
|
Changes the AMI's description to the specified value. Type: String Default: None |
No |
The elements in the following table are wrapped in a
ModifyImageAttributeResponse structure.
| Name | Description |
|---|---|
|
|
The ID of the request. Type: xsd:string |
|
|
Returns true if successful. Otherwise, returns an error. Type: xsd:boolean |
This example makes the AMI public (i.e., so any AWS account can launch it).
https://ec2.amazonaws.com/?Action=ModifyImageAttribute &ImageId=ami-61a54008 &LaunchPermission.Add.1.Group=all &AUTHPARAMS
This example makes the AMI private (i.e., so only you as the owner can launch it).
https://ec2.amazonaws.com/?Action=ModifyImageAttribute &ImageId=ami-61a54008 &LaunchPermission.Remove.1.Group=all &AUTHPARAMS
This example grants launch permission to the AWS account with ID 444455556666.
https://ec2.amazonaws.com/?Action=ModifyImageAttribute &ImageId=ami-61a54008 &LaunchPermission.Add.1.UserId=444455556666 &AUTHPARAMS
This example removes launch permission from the AWS account with ID 444455556666.
https://ec2.amazonaws.com/?Action=ModifyImageAttribute &ImageId=ami-61a54008 &LaunchPermission.Remove.1.UserId=444455556666 &AUTHPARAMS
This example adds the 774F4FF8 product code to the
ami-61a54008 AMI.
https://ec2.amazonaws.com/?Action=ModifyImageAttribute &ImageId=ami-61a54008 &ProductCode.1=774F4FF8 &AUTHPARAMS
This example changes the description of the AMI to
New_Description
https://ec2.amazonaws.com/?Action=ModifyImageAttribute &ImageId=ami-61a54008 &Description.Value=New_Description &AUTHPARAMS
<ModifyImageAttributeResponse xmlns="http://ec2.amazonaws.com/doc/2011-12-15/"> <return>true</return> </ModifyImageAttributeResponse>