Register Image operation
The Register Image operation enables you to register a specified Amazon Machine Image (AMI) with Amazon EC2. You should register images before launching them. Each AMI is associated with a unique ID. The Amazon EC2 service provides these unique IDs through this operation. If needed, you can deregister an AMI at any time.
The following figure shows a sample <items> XML element for the Register Image operation:
<item>
<parameters>
<!--Optional:-->
<image-location></image-location>
<name></name>
<!--Optional:-->
<description></description>
<!--Optional:-->
<architecture></architecture>
<!--Optional:-->
<kernel-id></kernel-id>
<!--Optional:-->
<ramdisk-id></ramdisk-id>
<!--Optional:-->
<root-device-name></root-device-name>
<!--Optional:-->
<block-device-mapping>
<!--Zero or more repetitions:-->
<item>
<device-name></device-name>
<!--You have a CHOICE of the next 3 items at this level-->
<virtual-name></virtual-name>
<ebs>
<!--Optional:-->
<snapshot-id></snapshot-id>
<!--Optional:-->
<volume-size></volume-size>
<!--Optional:-->
<delete-on-termination></delete-on-termination>
</ebs>
<no-device/>
</item>
</block-device-mapping>
</parameters>
</item>
</items>
The following table describes the elements for this adapter request:
Adapter request elements for the Register Image operation
Element | Definition | Required |
---|---|---|
<wsdl-location> | Specifies the target Web Service Description Language (WSDL) URL for Amazon EC2 | Conditional:
|
<endpoint-address> | Specifies the web service endpoint for the adapter to use while performing operations on Amazon EC2 instances across different regions | No |
<signature-properties> | Specifies the mode for signing the adapter request | Conditional:
|
<operation-name> | Contains the name of the operation: register-image | Yes |
<image-location> | Specifies the full path to the AMI manifest in Amazon Simple Storage Service (S3) | Yes |
<name> | Specifies the name of the AMI provided during image creation | Yes |
<description> | Specifies the description of the AMI provided during image creation | No |
<architecture> | Specifies the architecture of the image | No |
<kernel-id> | Specifies the ID of the kernel to select | No |
<ramdisk-id> | Specifies the ID of the RAM disk to select | No |
<root-device-name> | Specifies the root device name (For example, /dev/sda1) | No |
<block-device-mapping> | Specifies how block devices are exposed to the instance
| No |
The following figure shows a sample adapter request for the Register Image operation:
Sample adapter request for the Register Image operation
<wsdl-location>http://ec2.amazonaws.com/doc/2009-11-30/</wsdl-location>
<endpoint-address>http://us-east-1.ec2.amazonaws.com/</endpoint-address>
<signature-properties mode = "key-files">
<private-key-file>C:\Security\
pk-MJ5GIUNLM2XJ3VRJSYTKOFDWILELDQHB.PEM</private-key-file>
<certificate-file>C:\Security\
cert-MJ5GIUNLM2XJ3VRJSYTKOFDWILELDQHB.PEM</certificate-file>
</signature-properties>
<operation-name>register-image</operation-name>
<parameters>
<image-location>/testuser/userwinkeys.manifest.xml</image-location>
<name>TestImagenew</name>
<description>Test Description new</description>
<architecture>i386</architecture>
</parameters>
</amazon-ec2-request>
The following figure shows a sample adapter response for the Register Image operation:
Sample adapter response for the Register Image operation
<metadata>
<status>success</status>
</metadata>
<RegisterImageResponse>
<requestId>8139eeb6-e198-4b2f-a015-24b0f002f97d</requestId>
<imageId>ami-5b9b7532</imageId>
</RegisterImageResponse>
</amazon-ec2-response>