AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

When you export your virtual machine (VM) from its virtualization environment, that process creates a set of one or more disk container files that act as snapshots of your VM’s environment, settings, and data. The Amazon EC2 API ImportImage action uses those files to import your VM and create an AMI. To import using the CLI command, see import-image

You can reference the task ID from the VM import to pull in the AMI that the import created as the base image for your Image Builder recipe.

Note:

For .NET Core this operation is only available in asynchronous form. Please refer to ImportVmImageAsync.

Namespace: Amazon.Imagebuilder
Assembly: AWSSDK.Imagebuilder.dll
Version: 3.x.y.z

Syntax

C#
public abstract ImportVmImageResponse ImportVmImage(
         ImportVmImageRequest request
)

Parameters

request
Type: Amazon.Imagebuilder.Model.ImportVmImageRequest

Container for the necessary parameters to execute the ImportVmImage service method.

Return Value


The response from the ImportVmImage service method, as returned by Imagebuilder.

Exceptions

ExceptionCondition
ClientException These errors are usually caused by a client action, such as using an action or resource on behalf of a user that doesn't have permissions to use the action or resource, or specifying an invalid resource identifier.
ServiceException This exception is thrown when the service encounters an unrecoverable exception.
ServiceUnavailableException The service is unable to process your request at this time.

Version Information

.NET Framework:
Supported in: 4.5 and newer, 3.5

See Also