Amazon.Glacier.Transfer.ArchiveTransferManager.Download C# (CSharp) Метод

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

Downloads an archive from Amazon Glacier from the specified vault for the current user's account. Saves the archive to the specified file.

This method creates an Amazon SNS topic, and an Amazon SQS queue that is subscribed to that topic. It then initiates the archive retrieval job and polls the queue for the archive to be available. This polling takes about 4 hours. Once the archive is available, download will begin.

Additional options can be set using the UploadDirectoryOptions object. For example, you can set the FilesTransferProgress property to a delegate to track progress.

public Download ( string vaultName, string archiveId, string filePath ) : void
vaultName string The name of the vault to download the archive from.
archiveId string The unique ID of the archive to download.
filePath string The file path to save the archive at.
Результат void
        public void Download(string vaultName, string archiveId, string filePath)
        {
            Download(vaultName, archiveId, filePath, new DownloadOptions());
        }

Same methods

ArchiveTransferManager::Download ( string vaultName, string archiveId, string filePath, DownloadOptions options ) : void

Usage Example

Пример #1
0
        public void runDownload()
        {
            try
            {

                //var manager = new ArchiveTransferManager(Amazon.RegionEndpoint.USWest2);

                //var options = new DownloadOptions();
                //options.StreamTransferProgress += ArchiveDownloadHighLevel.progress;
                //// Download an archive.
                //Console.WriteLine("Intiating the archive retrieval job and then polling SQS queue for the archive to be available.");
                //Console.WriteLine("This polling takes about 4 hours. Once the archive is available, downloading will begin.");
                //manager.Download(vaultName, archiveId, downloadFilePath, options);
                //Console.WriteLine("To continue, press Enter");
                //Console.ReadKey();

                var manager = new ArchiveTransferManager(Amazon.RegionEndpoint.USEast1);
                var options = new DownloadOptions();
                options.StreamTransferProgress += DownloadFile.progress;
                Console.WriteLine("Intiating the archive retrieval job and then polling SQS queue for the archive to be available.");
                Console.WriteLine("This polling takes about 4 hours. Once the archive is available, downloading will begin.");
                manager.Download(vaultName, archiveToDownload, downloadFilePath, options);
                manager.Download(vaultName, archiveToDownload2, downloadFilePath2, options);

                Console.WriteLine("To continue, press Enter");
                Console.ReadKey();
            }
            catch (AmazonGlacierException e) { Console.WriteLine(e.Message); }
            catch (AmazonServiceException e) { Console.WriteLine(e.Message); }
            catch (Exception e) { Console.WriteLine(e.Message); }
            Console.WriteLine("To continue, press Enter");
            Console.ReadKey();
        }
All Usage Examples Of Amazon.Glacier.Transfer.ArchiveTransferManager::Download