

AWS Data Pipeline 不再提供給新客戶。的現有客戶 AWS Data Pipeline 可以繼續正常使用服務。[進一步了解](https://aws.amazon.com/blogs/big-data/migrate-workloads-from-aws-data-pipeline/)

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

# SnsAlarm
<a name="dp-object-snsalarm"></a>

 當活動失敗或成功完成時，傳送 Amazon SNS 通知訊息。

## 範例
<a name="snsalarm-example"></a>

以下為此物件類型的範例。`node.input` 和 `node.output` 的值來自在其 `onSuccess` 欄位中參考此物件的資料節點或活動。

```
{
  "id" : "SuccessNotify",
  "name" : "SuccessNotify",
  "type" : "SnsAlarm",
  "topicArn" : "arn:aws:sns:us-east-1:28619EXAMPLE:ExampleTopic",
  "subject" : "COPY SUCCESS: #{node.@scheduledStartTime}",
  "message" : "Files were copied from #{node.input} to #{node.output}."
}
```

## 語法
<a name="snsalarm-syntax"></a>


****  

| 必要欄位 | Description | 槽類型 | 
| --- | --- | --- | 
| message | Amazon SNS 通知的內文文字。 | String | 
| role | 用來建立 Amazon SNS 警示的 IAM 角色。 | String | 
| subject | Amazon SNS 通知訊息的主旨行。 | String | 
| topicArn | 訊息的目的地 Amazon SNS 主題 ARN。 | String | 

 


****  

| 選用欄位 | Description | 槽類型 | 
| --- | --- | --- | 
| parent | 目前物件的父系，其插槽會被繼承。 | 參考物件，例如 "parent":{"ref":"myBaseObjectId"} | 

 


****  

| 執行時間欄位 | Description | 槽類型 | 
| --- | --- | --- | 
| 節點 | 即將執行此動作的節點。 | 參考物件，例如 "node":{"ref":"myRunnableObjectId"} | 
| @version | 建立物件使用的管道版本。 | String | 

 


****  

| 系統欄位 | Description | 槽類型 | 
| --- | --- | --- | 
| @error | 描述格式錯誤物件的錯誤。 | String | 
| @pipelineId | 此物件所屬管道的 ID。 | String | 
| @sphere | 物件範圍代表其在生命週期中的位置：Component 物件會引發執行 Attempt 物件的 Instance 物件。 | String | 