如何使用.net删除亚马逊冰川的档案文件

时间:2014-12-29 07:35:23

标签: amazon-web-services amazon-s3 amazon-ec2 amazon

enter image description here在.net的哪个模块中我们必须上传代码以从Vault中删除存档文件![图像显示了我到目前为止所做的事情。现在我想要我在哪个模块中有代码我已经阅读过提供的支持文档

using System;
using Amazon.Glacier;
using Amazon.Glacier.Transfer;
using Amazon.Runtime; 

namespace glacier.amazon.com.docsamples
{
  class ArchiveDeleteHighLevel
  {
    static string vaultName = "examplevault";
    static string archiveId = "*** Provide archive ID ***";

    public static void Main(string[] args)
    {
      try
      {
        var manager = new ArchiveTransferManager(Amazon.RegionEndpoint.USEast1);
        manager.DeleteArchive(vaultName, archiveId);
        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();
    }
  }
}

0 个答案:

没有答案