ModifyImageAttribute
Description
Modifies an attribute of an AMI.
Request Parameters
Name | Description | Required |
---|---|---|
|
Type: |
Ancestor: None
Children: imageId
, launchPermission
, and productCodes
imageId
The AMI ID.
Type: xsd:string
Default: None
Ancestor: ModifyImageAttributeType
Children: None
Yes
launchPermission
Launch permission set.
Type: LaunchPermissionOperationType
Ancestor: ModifyImageAttributeType
Children: add
, remove
add
Adds permission.
Type: LaunchPermissionListType
Ancestor: launchPermission
Children: item
item
Information for launch permissions.
Type: LaunchPermissionItemType
Ancestor: add
Children: userId
, group
userId
AWS Access Key ID.
Type: xsd:string
Default: None
Ancestor: item
Children: None
Yes
group
Name of the group. Currently supports "all."
Type: xsd:string
Default: None
Ancestor: item
Children: None
Yes
remove
Remove permission.
Type: LaunchPermissionListType
Ancestor: launchPermission
Children: item
item
Information for launch permissions.
Type: LaunchPermissionItemType
Ancestor: remove
Children: userId
, group
userId
AWS Access Key ID.
Type: xsd:string
Default: None
Ancestor: item
Children: None
Yes
group
Name of the group. Currently supports "all."
Type: xsd:string
Default: None
Ancestor: item
Children: None
Yes
productCodes
Product code set.
Type: ProductCodeListType
Ancestor: ModifyImageAttributeType
Children: item
item
Information for one product code.
Type: ProductCodeItemType
Ancestor: productCodes
Children: productCode
productCode
Product code.
Type: xsd:string
Default: None
Ancestor: item
Children: None
No
Response Elements
Name | Description |
---|---|
|
Type: ModifyImageAttributeResponseType Ancestor: None Children: |
|
The ID of the request. Type: xsd:string Ancestor: Children: None |
|
Returns Type: xsd:boolean Ancestor: Children: None |
Examples
Example Request
This example makes this a public AMI and grants specific permissions to a user.
<ModifyImageAttribute xmlns="http://ec2.amazonaws.com/doc/2009-08-15/"> <imageId>ami-61a54008</imageId> <launchPermission> <add> <item> <group>all</group> </item> <item> <userId>495219933132</userId> </item> </add> <launchPermission> </ModifyImageAttribute>
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:
<ModifyImageAttribute xmlns="http://ec2.amazonaws.com/doc/2009-08-15/"> <imageId>ami-61a54008</imageId> <productCodes> <item> <productCode>774F4FF8</productCode> </item> <productCodes> </ModifyImageAttribute>
Example Response
<ModifyImageAttributeResponse xmlns="http://ec2.amazonaws.com/doc/2009-08-15/"> <return>true</return> </ModifyImageAttributeResponse>