public ImportVolumeResponse StartVolumeConversion(string availabilityZone, string description)
{
if (string.IsNullOrEmpty(ManifestFileKey))
throw new InvalidOperationException("No Amazon S3 object key available; have the image artifacts been uploaded?");
var diskImageDetail = PopulateDiskImageDetail(ManifestFileKey);
var volumeDetail = PopulateVolumeDetail();
var request = new ImportVolumeRequest
{
AvailabilityZone = availabilityZone,
Description = string.IsNullOrEmpty(description) ? null : description,
Image = diskImageDetail,
Volume = volumeDetail
};
// allow any exception to propagate to the caller; this allows the calling tool to
// assist the user with re-executing the command by showing the appropriate command line
// or remediation needed to avoid re-uploading the artifacts
return EC2Client.ImportVolume(request);
}