

 **此頁面僅適用於使用 Vaults 和 2012 年原始 REST API 的 Amazon Glacier 服務的現有客戶。**

如果您要尋找封存儲存解決方案，建議您在 Amazon Glacier Instant Retrieval、S3 Glacier Flexible Retrieval 和 S3 Glacier Deep Archive 中使用 Amazon Glacier 儲存類別。 Amazon S3 若要進一步了解這些儲存選項，請參閱 [Amazon Glacier 儲存類別](https://aws.amazon.com/s3/storage-classes/glacier/)。

Amazon Glacier （原始獨立保存庫型服務） 不再接受新客戶。Amazon Glacier 是一項獨立服務，具有自己的 APIs，可將資料存放在保存庫中，並與 Amazon S3 和 Amazon S3 Glacier 儲存類別不同。您現有的資料將在 Amazon Glacier 中無限期保持安全且可存取。不需要遷移。對於低成本、長期的封存儲存， AWS 建議使用 [Amazon S3 Glacier 儲存類別](https://aws.amazon.com/s3/storage-classes/glacier/)，透過 S3 儲存貯體型 APIs、完整 AWS 區域 可用性、降低成本 AWS 和服務整合，提供卓越的客戶體驗。如果您想要增強功能，請考慮使用我們的解決方案指南，將資料從 Amazon S3 Glacier 保存庫傳輸至 Amazon S3 Glacier 儲存類別，以遷移至 Amazon S3 Glacier 儲存類別。 [AWS Amazon Glacier Amazon S3 ](https://aws.amazon.com/solutions/guidance/data-transfer-from-amazon-s3-glacier-vaults-to-amazon-s3/)

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 使用 AWS SDKs Amazon Glacier 程式碼範例
<a name="service_code_examples"></a>

下列程式碼範例示範如何使用 Amazon Glacier 搭配 AWS 軟體開發套件 (SDK)。

*Actions* 是大型程式的程式碼摘錄，必須在內容中執行。雖然動作會告訴您如何呼叫個別服務函數，但您可以在其相關情境中查看內容中的動作。

*案例*是向您展示如何呼叫服務中的多個函數或與其他 AWS 服務組合來完成特定任務的程式碼範例。

如需 AWS SDK 開發人員指南和程式碼範例的完整清單，請參閱 [搭配 AWS SDK 使用 Amazon Glacier](sdk-general-information-section.md)。此主題也包含有關入門的資訊和舊版 SDK 的詳細資訊。

**Contents**
+ [基本概念](service_code_examples_basics.md)
  + [您好，Amazon Glacier](example_glacier_Hello_section.md)
  + [動作](service_code_examples_actions.md)
    + [`AddTagsToVault`](example_glacier_AddTagsToVault_section.md)
    + [`CreateVault`](example_glacier_CreateVault_section.md)
    + [`DeleteArchive`](example_glacier_DeleteArchive_section.md)
    + [`DeleteVault`](example_glacier_DeleteVault_section.md)
    + [`DeleteVaultNotifications`](example_glacier_DeleteVaultNotifications_section.md)
    + [`DescribeJob`](example_glacier_DescribeJob_section.md)
    + [`DescribeVault`](example_glacier_DescribeVault_section.md)
    + [`GetJobOutput`](example_glacier_GetJobOutput_section.md)
    + [`GetVaultNotifications`](example_glacier_GetVaultNotifications_section.md)
    + [`InitiateJob`](example_glacier_InitiateJob_section.md)
    + [`ListJobs`](example_glacier_ListJobs_section.md)
    + [`ListTagsForVault`](example_glacier_ListTagsForVault_section.md)
    + [`ListVaults`](example_glacier_ListVaults_section.md)
    + [`SetVaultNotifications`](example_glacier_SetVaultNotifications_section.md)
    + [`UploadArchive`](example_glacier_UploadArchive_section.md)
    + [`UploadMultipartPart`](example_glacier_UploadMultipartPart_section.md)
+ [案例](service_code_examples_scenarios.md)
  + [封存檔案、取得通知並啟動工作](example_glacier_Usage_UploadNotifyInitiate_section.md)
  + [取得封存內容並刪除封存](example_glacier_Usage_RetrieveDelete_section.md)