ModifyImageAttribute
Description
Modifies an attribute of an AMI.
Request Parameters
Name | Description | Required |
---|---|---|
| The AMI ID. Type: String Default: None | Yes |
| User IDs associated with the launchPermission attribute. Type: String Default: None | |
| Security groups associated with the launchPermission attribute. You can specify the "all" group, which will make it a public AMI. 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 | |
| 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: |
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 "true" if successful; otherwise "false".
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&ImageId=ami-61a54008&Attribute=launchPermission&OperationType=add&Group.1=all &UserId.1=495219933132&AuthParams
Example Response
<ModifyImageAttributeResponse xmlns="http://ec2.amazonaws.com/doc/2009-07-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-61a54008&Attribute=productCodes&ProductCode.1=774F4FF8&AuthParams
Example Response
<ModifyImageAttributeResponse xmlns="http://ec2.amazonaws.com/doc/2009-07-15/"> <return>true</return> </ModifyImageAttributeResponse>