Amazon.EC2.Import.DiskImageImporter.StartVolumeConversion C# (CSharp) Метод

StartVolumeConversion() публичный Метод

Initiates a conversion task to yield a new EBS volume for a set of image file artifacts uploaded previously to Amazon S3.
public StartVolumeConversion ( string availabilityZone, string description ) : ImportVolumeResponse
availabilityZone string The Availability Zone for the resulting Amazon EBS volume.
description string An optional description for the volume being imported.
Результат Amazon.EC2.Model.ImportVolumeResponse
        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);
        }