

AWS Data Pipeline is no longer available to new customers. Existing customers of AWS Data Pipeline can continue to use the service as normal. [Learn more](https://aws.amazon.com/blogs/big-data/migrate-workloads-from-aws-data-pipeline/)

# Actions
<a name="dp-object-actions"></a>

The following are the AWS Data Pipeline action objects:

**Topics**
+ [SnsAlarm](dp-object-snsalarm.md)
+ [Terminate](dp-object-terminate.md)

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

 Sends an Amazon SNS notification message when an activity fails or finishes successfully. 

## Example
<a name="snsalarm-example"></a>

The following is an example of this object type. The values for `node.input` and `node.output` come from the data node or activity that references this object in its `onSuccess` field. 

```
{
  "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}."
}
```

## Syntax
<a name="snsalarm-syntax"></a>


****  

| Required Fields | Description | Slot Type | 
| --- | --- | --- | 
| message | The body text of the Amazon SNS notification. | String | 
| role | The IAM role to use to create the Amazon SNS alarm. | String | 
| subject | The subject line of the Amazon SNS notification message. | String | 
| topicArn | The destination Amazon SNS topic ARN for the message. | String | 

 


****  

| Optional Fields | Description | Slot Type | 
| --- | --- | --- | 
| parent | Parent of the current object from which slots will be inherited. | Reference Object, e.g. "parent":\$1"ref":"myBaseObjectId"\$1 | 

 


****  

| Runtime Fields | Description | Slot Type | 
| --- | --- | --- | 
| node | The node for which this action is being performed. | Reference Object, e.g. "node":\$1"ref":"myRunnableObjectId"\$1 | 
| @version | Pipeline version the object was created with. | String | 

 


****  

| System Fields | Description | Slot Type | 
| --- | --- | --- | 
| @error | Error describing the ill-formed object. | String | 
| @pipelineId | Id of the pipeline to which this object belongs to. | String | 
| @sphere | The sphere of an object denotes its place in the lifecycle: Component Objects give rise to Instance Objects which execute Attempt Objects. | String | 

# Terminate
<a name="dp-object-terminate"></a>

An action to trigger the cancellation of a pending or unfinished activity, resource, or data node. AWS Data Pipeline attempts to put the activity, resource, or data node into the CANCELLED state if it does not start by the `lateAfterTimeout` value. 

You cannot terminate actions that include `onSuccess`, `OnFail`, or `onLateAction` resources.

## Example
<a name="terminate-example"></a>

The following is an example of this object type. In this example, the `onLateAction` field of `MyActivity` contains a reference to the action `DefaultAction1`. When you provide an action for `onLateAction`, you must also provide a `lateAfterTimeout` value to indicate the period of time since the scheduled start of the pipeline after which the activity is considered late.

```
{
  "name" : "MyActivity",
  "id" : "DefaultActivity1",
  "schedule" : {
    "ref" : "MySchedule"
  },
  "runsOn" : {
    "ref" : "MyEmrCluster"
  },
  "lateAfterTimeout" : "1 Hours",
  "type" : "EmrActivity",
  "onLateAction" : {
    "ref" : "DefaultAction1"
  },
  "step" : [
    "s3://amzn-s3-demo-bucket/myPath/myStep.jar,firstArg,secondArg",
    "s3://amzn-s3-demo-bucket/myPath/myOtherStep.jar,anotherArg"
  ]
},
{
  "name" : "TerminateTasks",
  "id" : "DefaultAction1",
  "type" : "Terminate"
}
```

## Syntax
<a name="terminate-syntax"></a>


****  

| Optional Fields | Description | Slot Type | 
| --- | --- | --- | 
| parent | Parent of the current object from which slots are inherited. | Reference Object, for example "parent":\$1"ref":"myBaseObjectId"\$1 | 

 


****  

| Runtime Fields | Description | Slot Type | 
| --- | --- | --- | 
| node | The node for which this action is being performed. | Reference Object, for example "node":\$1"ref":"myRunnableObjectId"\$1 | 
| @version | Pipeline version that the object was created with. | String | 

 


****  

| System Fields | Description | Slot Type | 
| --- | --- | --- | 
| @error | Error describing the ill-formed object. | String | 
| @pipelineId | ID of the pipeline to which this object belongs. | String | 
| @sphere | The sphere of an object denotes its place in the lifecycle: Component Objects give rise to Instance Objects, which execute Attempt Objects. | String | 