Amazon Elastic Compute Cloud
API Reference (API Version 2014-10-01)
Did this page help you?  Yes | No |  Tell us about it...
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.

ImportInstance

Creates an import instance task using metadata from the specified disk image. After importing the image, you then upload it using the command in the EC2 command line tools. For more information, see in the .

Request Parameters

For information about the common parameters that all actions use, see Common Query Parameters.

Description

A description for the instance being imported.

Type: String

Required: No

DiskImage.N

Type: DiskImage list

Required: No

DryRun

Type: Boolean

Required: No

LaunchSpecification

Type: ImportInstanceLaunchSpecification

Required: No

Platform

The instance operating system.

Type: String

Valid Values: Windows

Required: Yes

Response Elements

The following elements are returned.

conversionTask

Type: ConversionTask

requestId

The ID of the request.

Type: String

Errors

For information about the errors that are common to all actions, see Common Client Errors.

Examples

Example

This example creates an import instance task that migrates a Windows Server 2008 SP2 (32-bit) VM into the AWS us-east-1 region.

Sample Request

https://ec2.amazonaws.com/?Action=ImportInstance
       &LaunchSpecification.Architecture=x86_64
       &LaunchSpecification.InstanceType=m1.xlarge
       &DiskImage.1.Image.Format=VMDK
       &DiskImage.1.Image.Bytes=1179593728
       &DiskImage.1.Image.ImportManifestUrl=https://s3.amazonaws.com/myawsbucket/?a3a5e1b6-590d-43cc-97c1-15c7325d3f41/?Win_2008_Server_Data_Center_SP2_32-bit.?vmdkmanifest.xml?AWSAccessKeyId=?AKIAIOSFODNN7EXAMPLE&?Expires=1294855591&?Signature=5snej01TlTtL0uR7KExtEXAMPLE%3D
       &DiskImage.1.Volume.Size=12	
       &Platform=Windows
       &AUTHPARAMS

Sample Response

<ImportInstanceResponse xmlns="http://ec2.amazonaws.com/doc/2014-10-01/">
  <conversionTask>
    <conversionTaskId>import-i-ffvko9js</conversionTaskId>
    <expirationTime>2010-12-22T12:01Z</expirationTime>
    <importInstance>
       <volumes>
          <item>
             <bytesConverted>0</bytesConverted>
             <availabilityZone>us-east-1a</availabilityZone>
             <image>
                <format>VMDK</format>
                <size>1179593728</size>
                <importManifestUrl>
                 https://s3.amazonaws.com/myawsbucket/?a3a5e1b6-590d-43cc-97c1-15c7325d3f41/?Win_2008_Server_Data_Center_SP2_32-bit.?vmdkmanifest.xml?AWSAccessKeyId=?AKIAIOSFODNN7EXAMPLE&?Expires=1294855591&?Signature=5snej01TlTtL0uR7KExtEXAMPLE%3D
                </importManifestUrl>
             </image>
             <description/>
             <volume>
                <size>12</size>
                <id>vol-1a2b3c4d</id>
             </volume>
             <status>active</status>
             <statusMessage/>
          </item>
       </volumes>
       <instanceId>i-12655a7f</instanceId>
       <description/>
    </importInstance>
  </conversionTask>
</ImportInstanceResponse>