Modify Image Attribute operation for the Amazon EC2 REST adapter
The Modify Image Attribute operation enables you to modify an attribute of an Amazon Machine Image (AMI).
The following figure shows a sample <items>
XML element for the Modify Image Attribute operation:
<items>
<item>
<parameters>
<image-id></image-id>
<!--You have a CHOICE of the next 3 items at this level-->
<launch-permission>
<!--You have a CHOICE of the next 2 items at this level-->
<add>
<!--Zero or more repetition -->
<item>
<user-id></user-id>
</item>
<item>
<group></group>
</item>
</add>
</launch-permission>
<product-codes>
<!--Zero or more repetition -->
<item>
<product-code></product-code>
</item>
</product-codes>
<description>
<value></value>
</description>
</parameters>
</item>
</items>
The following table describes the elements for this adapter request:
Adapter request elements for the Modify Image Attribute operation
Element | Definition | Required |
---|---|---|
<access-key> | Specifies the Amazon Web Services (AWS) access key You need to generate the AWS access key by going to the Security Credentials tab in the AWS console. | Conditional;
|
<secret-key> | Specifies the AWS secret access key You need to generate the AWS secret access key by going to the Security Credentials tab in the AWS console. | Conditional;
|
<region> | Specifies the region with which you want the adapter to communicate Amazon EC2 is hosted in multiple locations world-wide. You must specify the region in which you want the adapter to perform the actions. Valid values:
| No |
| Contains the name of the operation: modify-image-attribute | Yes |
| Specifies the ID of the AMI whose attribute is to be modified | Yes |
| Specifies the description of the AMI provided during image creation | No |
| Specifies the launch permissions associated with the AMI
| No |
| Specifies the product code associated with the AMI | No |
The following figure shows a sample adapter request for the Modify Image Attribute operation:
Sample adapter request for the Modify Image Attribute operation
<amazon-ec2-rest-request>
<operation-name>modify-image-attribute</operation-name>
<parameters>
<image-id>ami-b8cea688</image-id>
<launch-permission>
<add>
<item>
<user-id>246495073671</user-id>
</item>
<item>
<group />
</item>
</add>
</launch-permission>
</parameters>
</amazon-ec2-rest-request>
The following figure shows a sample adapter response for the Modify Image Attribute operation:
Sample adapter response for the Modify Image Attribute operation
<amazon-ec2-rest-response>
<metadata>
<status>success</status>
</metadata>
<ModifyImageAttributeResponse>
<return>true</return>
</ModifyImageAttributeResponse>
</amazon-ec2-rest-response>
Comments
Log in or register to comment.