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:

Sample <items> XML element for the Register Image operation
<items>
   <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

Examples:

Conditional:

  • Required if not specified in the request
  • If specified in the configuration and request, the value in the request overrides the value in the configuration
<endpoint-address>

Specifies the web service endpoint for the adapter to use while performing operations on Amazon EC2 instances across different regions
Default value: US East region: http://us-east-1.ec2.amazonaws.com/

No

<signature-properties>

Specifies the mode for signing the adapter request

Conditional:

  • Required if not specified in the configuration
  • If <signature-properties mode = "key-files">, requires <private-key-file>
     and <certificate-file>
  • If <signature-properties mode = "key-data">, requires <private-key-data> and <certificate-data>
<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)
Amazon S3 is storage for the Internet. Amazon S3 provides a simple web services interface that you can use to store and retrieve any amount of data, at any time, from anywhere on the web.

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
Valid values: i386, x86_64 architecture

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

Each mapping is made up of a virtualName and a deviceName or device-name.

  • device-name: Specifies the device name (For example, /dev/sdh)
  • virtual-name: Specifies the virtual device name
  • ebs: Specifies the parameters used to setup Amazon EBS volumes automatically when the instance is launched
  • snapshot-id: Specifies the ID of the snapshot
  • volume-size: Specifies the size of the volume
  • delete-on-termination: Specifies whether the Amazon EBS volume is deleted when the instance is terminated
  • no-device: Specifies the device name to suppress during instance launch

No

The following figure shows a sample adapter request for the Register Image operation:

Sample adapter request for the Register Image operation

<amazon-ec2-request>
   <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

<amazon-ec2-response>
 <metadata>
   <status>success</status>
 </metadata>
 <RegisterImageResponse>
   <requestId>8139eeb6-e198-4b2f-a015-24b0f002f97d</requestId>
   <imageId>ami-5b9b7532</imageId>
 </RegisterImageResponse>
</amazon-ec2-response>

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*