ModifyImageAttribute
Description
Modifies an attribute of an AMI.
Request Parameters
Name | Description | Required |
---|---|---|
| The AMI ID. Type: String Default: None | Yes |
| AWS Access Key ID. Type: String Default: None | Yes |
| Name of the group. Currently supports "all." Type: String Default: None | Yes |
| Product code. Type: String Default: None | No |
| Specifies the attribute to modify. Type: String Valid Values: Default: None | |
| Specifies the operation to perform on the attribute. Type: String Valid Values: Default: None |
Response Elements
Name | Description |
---|---|
|
Type: |
Ancestor: None
Children: requestId
, return
requestId
The ID of the request.
Type: xsd:string
Ancestor: ModifyImageAttributeResponseType
Children: None
return
Returns
Type: xsd:boolean
Ancestor: ModifyImageAttributeResponseType
Children: None
Examples
Example Request
This example makes this a public AMI and grants specific permissions to a user.
https://ec2.amazonaws.com/?Action=ModifyImageAttribute&snapshotId=snap-78a54011&Attribute=createVolumePermission&OperationType=add&Group.1=all&UserId.1=495219933132&AuthParams
Example Response
<ModifyImageAttributeResponse xmlns="http://ec2.amazonaws.com/doc/2009-08-15/"> <return>true</return> </ModifyImageAttributeResponse>
Example Request
The following example adds the 774F4FF8
product code to the ami-2bb65342
AMI:
https://ec2.amazonaws.com/?Action=ModifyImageAttribute?Action=ModifyImageAttribute&ImageId=ami-78a54011&Attribute=launchPermission&OperationType=add&Group.1=all&UserId.1=495219933132&AuthParams
Example Response
<ModifyImageAttributeResponse xmlns="http://ec2.amazonaws.com/doc/2009-08-15/"> <return>true</return> </ModifyImageAttributeResponse>