

 **此頁面僅適用於使用 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/)

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

# 取得文件庫通知 (GET 通知的組態)
<a name="api-vault-notifications-get"></a>

## Description
<a name="api-vault-notifications-get-description"></a>

此操作擷取在文件庫 (請參閱 `notification-configuration` 上設定的 [設定保存庫通知組態 (PUT 通知的組態)](api-vault-notifications-put.md) 子資源。如果未設定文件庫的通知組態，則操作將傳回 `404 Not Found` 錯誤。如需文件庫通知的詳細資訊，請參閱 [在 Amazon Glacier 中設定保存庫通知](configuring-notifications.md)。

## 要求
<a name="api-vault-notifications-get-requests"></a>

要擷取通知組態資訊，請向文件庫的 `GET` 子資源的 URI 發送 `notification-configuration` 請求。

### 語法
<a name="api-vault-notifications-get-requests-syntax"></a>

```
1. GET /AccountId/vaults/VaultName/notification-configuration HTTP/1.1
2. Host: glacier.Region.amazonaws.com
3. Date: Date
4. Authorization: SignatureValue
5. x-amz-glacier-version: 2012-06-01
```

 

**注意**  
`AccountId` 值是擁有保存庫的帳戶 AWS 帳戶 ID。您可以指定 AWS 帳戶 ID 或選擇性地指定單一 '`-`' （連字號），在這種情況下，Amazon Glacier 會使用與用來簽署請求之登入資料相關聯的 AWS 帳戶 ID。如果您使用帳號 ID，請勿在 ID 中包含任何連字號 ('-')。

### 請求參數
<a name="api-vault-notifications-get-requests-parameters"></a>

此操作不使用請求參數。

### 請求標頭
<a name="api-vault-notifications-get-requests-headers"></a>

此操作僅使用所有操作常見的請求標頭。如需常見請求標頭的資訊，請參閱 [常見請求標題](api-common-request-headers.md)。

### 請求主體
<a name="api-vault-notifications-get-requests-elements"></a>

此操作沒有請求內文。

## 回應
<a name="api-vault-notifications-get-responses"></a>

### 語法
<a name="api-vault-notifications-get-responses-syntax"></a>

```
HTTP/1.1 200 OK
x-amzn-RequestId: x-amzn-RequestId
Date: Date
Content-Type: application/json
Content-Length: length
{
  "Events": [
    String,
    ...
  ],
  "SNSTopic": String
}
```

### 回應標頭
<a name="api-vault-notifications-get-responses-headers"></a>

此操作僅使用大部分回應常見的回應標頭。如需常見回應標頭的資訊，請參閱 [常見回應標頭](api-common-response-headers.md)。

### 回應內文
<a name="api-vault-notifications-get-responses-elements"></a>

回應內文包含以下 JSON 欄位。

 

**事件**  
一或多個事件的清單，Amazon Glacier (Amazon Glacier) 會將通知傳送至指定的 Amazon SNS 主題。如需有關可將文件庫設定為發佈通知的文件庫事件的詳細資訊，請參閱 [設定保存庫通知組態 (PUT 通知的組態)](api-vault-notifications-put.md)。  
*類型*：陣列

**SNSTopic**  
Amazon Simple Notification Service (Amazon SNS) 主題 Amazon Resource Name (ARN)。如需詳細資訊，請參閱《*Amazon Simple Notification Service 入門指南*》中的 [Amazon SNS 入門](https://docs.aws.amazon.com/sns/latest/gsg/Welcome.html)。  
*類型：*字串

### 錯誤
<a name="api-vault-notifications-get-responses-errors"></a>

如需 Amazon Glacier 例外狀況和錯誤訊息的相關資訊，請參閱 [錯誤回應](api-error-responses.md)。

## 範例
<a name="api-vault-notifications-get-examples"></a>

以下範例示範如何擷取文件庫的通知組態。

### 範例請求
<a name="api-vault-notifications-get-example-request"></a>

在這個範例中，將 `GET` 請求傳送到文件庫的 `notification-configuration` 子資源。

```
1. GET /-/vaults/examplevault/notification-configuration HTTP/1.1
2. Host: glacier.us-west-2.amazonaws.com
3. x-amz-Date: 20170210T120000Z
4. x-amz-glacier-version: 2012-06-01
5. Authorization: AWS4-HMAC-SHA256 Credential=AKIAIOSFODNN7EXAMPLE/20141123/us-west-2/glacier/aws4_request,SignedHeaders=host;x-amz-date;x-amz-glacier-version,Signature=9257c16da6b25a715ce900a5b45b03da0447acf430195dcb540091b12966f2a2
```

### 回應範例
<a name="api-vault-notifications-get-example-response"></a>

成功的回應以 JSON 格式顯示回應內文中的稽核記錄組態文件。此範例中的此設定示範如何將兩個事件 (`ArchiveRetrievalCompleted` 和 `InventoryRetrievalCompleted`) 的通知傳送到 Amazon SNS 主題 `arn:aws:sns:us-west-2:012345678901:mytopic`。

```
 1. HTTP/1.1 200 OK
 2. x-amzn-RequestId: AAABZpJrTyioDC_HsOmHae8EZp_uBSJr6cnGOLKp_XJCl-Q
 3. Date: Wed, 10 Feb 2017 12:00:00 GMT
 4. Content-Type: application/json
 5. Content-Length: 150
 6.   
 7. {
 8.   "Events": [
 9.     "ArchiveRetrievalCompleted",
10.     "InventoryRetrievalCompleted"
11.   ],
12.   "SNSTopic": "arn:aws:sns:us-west-2:012345678901:mytopic"
13. }
```

## 相關章節
<a name="related-sections-vault-notifications-get"></a>

 
+ [刪除保存庫通知 (DELETE 通知的組態)](api-vault-notifications-delete.md)
+ [設定保存庫通知組態 (PUT 通知的組態)](api-vault-notifications-put.md)
+ [Amazon Glacier 的 Identity and Access Management](security-iam.md)

## 另請參閱
<a name="api-vault-notifications-get_SeeAlso"></a>

如需在語言特定的 Amazon 開發套件之一中使用此 API 的詳細資訊，請參閱下列說明：
+  [AWS Command Line Interface](https://docs.aws.amazon.com/cli/latest/reference/glacier/get-vault-notifications.html) 