RunPipelineActivity
Simulates the results of running a pipeline activity on a message payload.
Important
The RunPipelineActivity operation in AWS IoT Analytics is no longer available to new customers. Existing customers of AWS IoT Analytics can continue
to use the service as normal.
Learn more
Request Syntax
POST /pipelineactivities/run HTTP/1.1
Content-type: application/json
{
"payloads": [ blob
],
"pipelineActivity": {
"addAttributes": {
"attributes": {
"string
" : "string
"
},
"name": "string
",
"next": "string
"
},
"channel": {
"channelName": "string
",
"name": "string
",
"next": "string
"
},
"datastore": {
"datastoreName": "string
",
"name": "string
"
},
"deviceRegistryEnrich": {
"attribute": "string
",
"name": "string
",
"next": "string
",
"roleArn": "string
",
"thingName": "string
"
},
"deviceShadowEnrich": {
"attribute": "string
",
"name": "string
",
"next": "string
",
"roleArn": "string
",
"thingName": "string
"
},
"filter": {
"filter": "string
",
"name": "string
",
"next": "string
"
},
"lambda": {
"batchSize": number
,
"lambdaName": "string
",
"name": "string
",
"next": "string
"
},
"math": {
"attribute": "string
",
"math": "string
",
"name": "string
",
"next": "string
"
},
"removeAttributes": {
"attributes": [ "string
" ],
"name": "string
",
"next": "string
"
},
"selectAttributes": {
"attributes": [ "string
" ],
"name": "string
",
"next": "string
"
}
}
}
URI Request Parameters
The request does not use any URI parameters.
Request Body
The request accepts the following data in JSON format.
- payloads
-
The sample message payloads on which the pipeline activity is run.
Type: Array of Base64-encoded binary data objects
Array Members: Minimum number of 1 item. Maximum number of 10 items.
Required: Yes
- pipelineActivity
-
The pipeline activity that is run. This must not be a channel activity or a data store activity because these activities are used in a pipeline only to load the original message and to store the (possibly) transformed message. If a Lambda activity is specified, only short-running Lambda functions (those with a timeout of less than 30 seconds or less) can be used.
Type: PipelineActivity object
Required: Yes
Response Syntax
HTTP/1.1 200
Content-type: application/json
{
"logResult": "string",
"payloads": [ blob ]
}
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
- logResult
-
In case the pipeline activity fails, the log message that is generated.
Type: String
- payloads
-
The enriched or transformed sample message payloads as base64-encoded strings. (The results of running the pipeline activity on each input sample message payload, encoded in base64.)
Type: Array of Base64-encoded binary data objects
Array Members: Minimum number of 1 item. Maximum number of 10 items.
Errors
For information about the errors that are common to all actions, see Common Errors.
- InternalFailureException
-
There was an internal failure.
HTTP Status Code: 500
- InvalidRequestException
-
The request was not valid.
HTTP Status Code: 400
- ServiceUnavailableException
-
The service is temporarily unavailable.
HTTP Status Code: 503
- ThrottlingException
-
The request was denied due to request throttling.
HTTP Status Code: 400
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: