| « PreviousNext » | |
![]() ![]() | Did this page help you? Yes | No | Tell us about it... |
Modifies an attribute of an AMI.
Note
AWS Marketplace product codes cannot be modified. Images with an AWS Marketplace product code cannot be made public.
ImageIdThe AMI ID.
Type: String
Default: None
Required: Yes
LaunchPermission.Add.n.UserIdAdds the specified AWS account ID to the AMI's list of launch permissions.
Type: String
Default: None
Required: No
LaunchPermission.Remove.n.UserIdRemoves the specified AWS account ID from the AMI's list of launch permissions.
Type: String
Default: None
Required: No
LaunchPermission.Add.n.GroupAdds the specified group to the image's list of launch
permissions. The only valid value is all.
Type: String
Valid value: all (for all EC2 users)
Default: None
Required: No
LaunchPermission.Remove.n.GroupRemoves the specified group from the image's list of launch
permissions. The only valid value is all.
Type: String
Valid value: all (for all EC2 users)
Default: None
Required: No
ProductCode.nAdds the specified product code to the specified instance store-backed AMI. After you add a product code to an AMI, it can't be removed.
Type: String
Default: None
Required: No
Description.ValueChanges the AMI's description to the specified value.
Type: String
Default: None
Required: No
The following elements are returned in a
ModifyImageAttributeResponse element.
requestIdThe ID of the request.
Type: xsd:string
returnReturns true if the request succeeds. 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 111122223333.
https://ec2.amazonaws.com/?Action=ModifyImageAttribute &ImageId=ami-61a54008 &LaunchPermission.Add.1.UserId=111122223333 &AUTHPARAMS
This example removes launch permission from the AWS account with ID 111122223333.
https://ec2.amazonaws.com/?Action=ModifyImageAttribute &ImageId=ami-61a54008 &LaunchPermission.Remove.1.UserId=111122223333 &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/2013-02-01/"> <return>true</return> </ModifyImageAttributeResponse>