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.
Constructs the import manifest for the image and then uploads it and the virtual machine image or disk image to Amazon S3. The S3 key to the uploaded manifest file is returned.
If an error occurs during upload of the image file the RetainArtifactsOnUploadError property governs whether the partially uploaded content is deleted or retained. If the content is retained, the import can be resumed. By default the RetainArtifactsOnUploadError property is false and the content deleted, avoiding storage charges for potentially orphaned content if the command is not re-run.
Version: (assembly version)
public String Upload( String imageFilepath, String fileFormat, Nullable<Int64> volumeSize, String keyPrefix, ImportProgressCallback progressCallback, Boolean resumeUpload )
The full path to the image file to be processed
The format of the image file (VMDK | RAW | VHD). If not specified, it will be inferred from the extension of the image file.
The requested size (in GiB) for the resulting image volume. If not specified a suitable value based on the size of the image file is used. Note that if importing a disk image that will be used as an EC2 instance, the minimum required boot volume size is 8GB.
Optional root-level key prefix that will be applied to the uploaded artifacts in S3. The artifacts will be placed beneath this (or the root if not set) in a key composed of a GUID.
Optional callback delegate for upload progress reporting
Set this to true if a previous upload failed part-way through processing and RetainArtifactsOnUploadError was set to true so the partially uploaded content was retained. The existing manifest will be inspected and uploads will resume of the retaining content.
Supported in: 4.5, 4.0, 3.5