选择您的 Cookie 首选项

我们使用必要 Cookie 和类似工具提供我们的网站和服务。我们使用性能 Cookie 收集匿名统计数据,以便我们可以了解客户如何使用我们的网站并进行改进。必要 Cookie 无法停用,但您可以单击“自定义”或“拒绝”来拒绝性能 Cookie。

如果您同意,AWS 和经批准的第三方还将使用 Cookie 提供有用的网站功能、记住您的首选项并显示相关内容,包括相关广告。要接受或拒绝所有非必要 Cookie,请单击“接受”或“拒绝”。要做出更详细的选择,请单击“自定义”。

ImportInstance - Amazon Elastic Compute Cloud
此页面尚未翻译为您的语言。 请求翻译

ImportInstance

Note

We recommend that you use the ImportImage API instead. For more information, see Importing a VM as an image using VM Import/Export in the VM Import/Export User Guide.

Creates an import instance task using metadata from the specified disk image.

This API action supports only single-volume VMs. To import multi-volume VMs, use ImportImage instead.

For information about the import manifest referenced by this API action, see VM Import Manifest.

This API action is not supported by the AWS Command Line Interface (AWS CLI).

Request Parameters

The following parameters are for this specific action. For more information about required and optional parameters that are common to all actions, see Common Query Parameters.

Description

A description for the instance being imported.

Type: String

Required: No

DiskImage.N

The disk image.

Type: Array of DiskImage objects

Required: No

DryRun

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

Type: Boolean

Required: No

LaunchSpecification

The launch specification.

Type: ImportInstanceLaunchSpecification object

Required: No

Platform

The instance operating system.

Type: String

Valid Values: Windows

Required: Yes

Response Elements

The following elements are returned by the service.

conversionTask

Information about the conversion task.

Type: ConversionTask object

requestId

The ID of the request.

Type: String

Errors

For information about the errors that are common to all actions, see Common client error codes.

Examples

Example

This example creates an import instance task that migrates a Windows Server 2008 SP2 (32-bit) VM into the 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/amzn-s3-demo-bucket/​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/2016-11-15/"> <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/amzn-s3-demo-bucket/​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-1234567890abcdef0</id> </volume> <status>active</status> <statusMessage/> </item> </volumes> <instanceId>i-1234567890abcdef0</instanceId> <description/> </importInstance> </conversionTask> </ImportInstanceResponse>

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

下一主题:

ImportKeyPair

上一主题:

ImportImage
隐私网站条款Cookie 首选项
© 2025, Amazon Web Services, Inc. 或其附属公司。保留所有权利。