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

CreateInstanceExportTask

Description

Exports a running or stopped instance to an Amazon S3 bucket. For information about the supported operating systems, image formats, and known limitations for the types of instances you can export, see Exporting EC2 Instances in the Amazon Elastic Compute Cloud User Guide.

Request Parameters

Description

A description of the conversion task or the resource being exported.

Type: String

Default: None

Required: No

InstanceId

The ID of the instance being exported.

Type: String

Default: None

Required: Yes

TargetEnvironment

The target virtualization environment.

Type: String

Default: None

Valid values: vmware | citrix | microsoft

Required: Yes

ExportToS3.DiskImageFormat

The format for the exported image.

Type: String

Default: vmdk if TargetEnvironment = vmware, otherwise vhd

Valid values: vmdk | vhd

Required: No

ExportToS3.ContainerFormat

The container format used to combine disk images with metadata (such as OVF). If absent, only the disk image will be exported.

Type: String

Default: ova if TargetEnvironment = vmare, otherwise blank

Valid values: ova

Required: No

ExportToS3.S3Bucket

The Amazon S3 bucket for the destination image. The bucket must exist and grant write permissions to AWS account vm-import-export@amazon.com.

Type: String

Default: None

Required: Yes

ExportToS3.S3Prefix

The image is written to a single object in the Amazon S3 bucket at the S3 key s3prefix + exportTaskId + ‘.' +diskImageFormat.

Type: String

Default: None

Required: No

Response Elements

The following elements are returned in a CreateInstanceExportTaskResponse element.

requestId

The ID of the request.

Type: xsd:string

exportTask

The details of the created ExportVM task.

Type: ExportTaskResponseType

Examples

Example Request

This example creates an Export VM task that makes a Windows instance available as an OVA.

https://ec2.amazonaws.com/?Action=CreateInstanceExportTask
&Description=Example%20for%20docs
&InstanceId=i-12345678
&TargetEnvironment=VMWare
&ExportToS3.DiskImageFormat=VMDK
&ExportToS3.ContainerFormat=OVA
&ExportToS3.S3bucket=my-bucket-for-exported-vm
&ExportToS3.S3prefix=my-exports/
&AUTHPARAMS

Example Response

<CreateInstanceExportTaskResponse xmlns="http://ec2.amazonaws.com/doc/2013-02-01/">
<requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId>
<exportTask>
<exportTaskId>export-i-1234wxyz</exportTaskId>
<description>Example for docs</description>
<state>active</state>
<statusMessage>Running</statusMessage>
<instanceExport>
<instanceId>i-12345678</instanceId >
<targetEnvironment>VMWare</targetEnvironment >
</instanceExport>
<exportToS3>
<diskImageFormat>VMDK</diskImageFormat >
<containerFormat>OVA</containerFormat>
<s3Bucket>my-bucket-for-exported-vm</s3Bucket>
<s3Key>my-exports/ export-i-1234wxyz .ova</s3Key>
</exportToS3>
</exportTask>
</CreateInstanceExportTaskResponse>