ModifyImageAttribute
Description
Modifies an attribute of an AMI.
Request Parameters
Name | Description | Required |
---|---|---|
| The AMI ID. Type: String Default: None | Yes |
| Specifies the attribute to modify. Type: String Default: None Valid Values: | |
| Specifies the operation to perform on the attribute. Type: String Default: None Valid Values: | |
| User IDs associated with the launchPermission attribute. Type: String Default: None | |
| Security groups associated with the launchPermission attribute. You can specify the Type: String Default: None | |
| Amazon DevPay product code. Currently only one product code can be associated with an AMI. Once set, the product code cannot be changed or reset. Type: String Default: None |
Response Elements
Name | Description |
---|---|
|
Type: |
Ancestor: None
Children: requestId
, return
requestId
The ID of the request.
Type: xsd:string
Ancestor: ModifyImageAttributeResponse
Children: None
return
Returns
Type: xsd:boolean
Ancestor: ModifyImageAttributeResponse
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&ImageId=ami-61a54008&Attribute=launchPermission&OperationType=add&Group.1=all &UserId.1=495219933132&AuthParams
Example Response
<ModifyImageAttributeResponse xmlns="http://ec2.amazonaws.com/doc/2009-04-04/"> <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-61a54008&Attribute=productCodes&ProductCode.1=774F4FF8&AuthParams
Example Response
<ModifyImageAttributeResponse xmlns="http://ec2.amazonaws.com/doc/2009-04-04/"> <return>true</return> </ModifyImageAttributeResponse>