Amazon Elastic Compute Cloud
API Reference (API Version 2011-12-15)
Print this pageEmail this pageGo to the ForumsView the PDFShare this page on TwitterShare this page on FacebookBookmark this page on DeliciousSubmit this page to RedditSubmit this page to DiggDid this page help you?  Yes  No   Tell us about it...

ModifyImageAttribute

Description

Modifies an attribute of an AMI.

Request Parameters

NameDescriptionRequired

ImageId

The AMI ID.

Type: String

Default: None

Yes

LaunchPermission.Add.n.UserId

Adds the specified AWS account ID to the AMI's list of launch permissions.

Type: String

Default: None

No

LaunchPermission.Remove.n.UserId

Removes the specified AWS account ID from the AMI's list of launch permissions.

Type: String

Default: None

No

LaunchPermission.Add.n.Group

Adds 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

No

LaunchPermission.Remove.n.Group

Removes 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

No

ProductCode.n

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

Description.Value

Changes the AMI's description to the specified value.

Type: String

Default: None

No

Response Elements

The elements in the following table are wrapped in a ModifyImageAttributeResponse structure.

NameDescription

requestId

The ID of the request.

Type: xsd:string

return

Returns true if successful. Otherwise, returns an error.

Type: xsd:boolean

Examples

Example Request

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

Example Request

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

Example Request

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

Example Request

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

Example Request

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

Example Request

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

Example Response

<ModifyImageAttributeResponse xmlns="http://ec2.amazonaws.com/doc/2011-12-15/">
					<return>true</return>
					</ModifyImageAttributeResponse>