

 **此页面仅适用于使用文件库和 2012 年原始 REST API 的 Amazon Glacier 服务的现有客户。**

如果您正在寻找归档存储解决方案，建议使用 Amazon S3 中的 Amazon Glacier 存储类别 S3 Glacier Instant Retrieval、S3 Glacier Flexible Retrieval 和 S3 Glacier Deep Archive。要了解有关这些存储选项的更多信息，请参阅 [Amazon Glacier 存储类别](https://www.amazonaws.cn/s3/storage-classes/glacier/)。

Amazon Glacier（最初基于保管库的独立服务）不再接受新客户。Amazon Glacier 是一项独立的服务 APIs ，拥有自己的服务，可将数据存储在文件库中，不同于亚马逊 S3 和 Amazon S3 Glacier 存储类别。在 Amazon Glacier 中，您现有的数据将确保安全，并且可以无限期地访问。无需进行迁移。对于低成本、长期的存档存储， Amazon 建议[使用 Amazon S3 Glacier 存储类别，这些存储类别](https://www.amazonaws.cn/s3/storage-classes/glacier/)基于S3存储桶 APIs、完全 Amazon Web Services 区域 可用性、更低的成本和 Amazon 服务集成，可提供卓越的客户体验。如果您希望加强功能，可以考虑使用我们的 [Amazon 将数据从 Amazon Glacier 文件库传输到 Amazon S3 Glacier 存储类别的解决方案指南](https://www.amazonaws.cn/solutions/guidance/data-transfer-from-amazon-s3-glacier-vaults-to-amazon-s3/)，迁移到 Amazon S3 Glacier 存储类别。

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# 删除 Amazon Glacier 中的档案
<a name="deleting-an-archive"></a>

无法使用 Amazon Glacier（Amazon Glacier）管理控制台删除档案。要删除档案，必须使用 Amazon Command Line Interface (CLI) 或编写代码，直接使用 REST API 或使用 适用于 Java 的 Amazon SDK 和.NET 包装器库发出删除请求。以下主题说明了如何使用 适用于 Java 的 Amazon SDK 和.NET 包装器库、REST API 和。 Amazon CLI

**Topics**
+ [使用适用于 Java 的 Amazon SDK 在 Amazon Glacier 中删除档案](deleting-an-archive-using-java.md)
+ [使用 Amazon Glacier 删除档案 适用于 .NET 的 Amazon SDK](deleting-an-archive-using-dot-net.md)
+ [使用 REST API 删除 Amazon Glacier 档案](deleting-an-archive-using-rest.md)
+ [使用 Amazon Glacier 删除档案 Amazon Command Line Interface](deleting-an-archive-using-cli.md)

您可以从文件库一次删除一个档案。要删除档案，您必须在删除请求中提供档案 ID。您可以通过下载包含下载档案的文件库的文件库清单来获取档案 ID。有关下载文件库清单的更多信息，请参阅[在 Amazon Glacier 中下载文件库清单](vault-inventory.md)。

在删除档案后，您仍可能成功请求启动对已删除档案的检索任务，但档案检索任务会失败。

在您删除档案时，对相应档案 ID 正在进行的档案检索可能成功，也可能不成功，具体取决于下面的场景：

 
+ 如果 Amazon Glacier 收到删除档案请求时，档案检索任务正在积极地为下载准备数据，则档案检索操作可能会失败。
+ 如果 Amazon Glacier 收到删除档案请求时，档案检索任务已成功地为下载准备好档案，则您将能够下载输出。

有关档案检索的更多信息，请参阅[在 Amazon Glacier 中下载档案](downloading-an-archive.md)。

此操作是幂等的。删除已删除的档案不会导致错误。

删除档案后，如果您立即下载文件库清单，则它可能会在列表中包括已删除的档案，因为 Amazon Glacier 每天大约只准备一次文件库清单。

**注意**  
有关自动删除文件库档案的信息，请参阅[在 Amazon S3 Glacier 中自动删除文件库档案](https://www.amazonaws.cn/solutions/guidance/automated-deletion-of-vault-archives-in-amazon-s3-glacier/)。