CreatePipeline
Creates a pipeline. A pipeline consumes messages from a channel and allows you to process
the messages before storing them in a data store. You must specify both a channel
and a datastore
activity and, optionally, as many as 23 additional activities in
the pipelineActivities
array.
Important
The CreatePipeline operation in Amazon IoT Analytics is no longer available to new customers. Existing customers of Amazon IoT Analytics can continue
to use the service as normal.
Learn more
Request Syntax
POST /pipelines HTTP/1.1
Content-type: application/json
{
"pipelineActivities": [
{
"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
"
}
}
],
"pipelineName": "string
",
"tags": [
{
"key": "string
",
"value": "string
"
}
]
}
URI Request Parameters
The request does not use any URI parameters.
Request Body
The request accepts the following data in JSON format.
- pipelineActivities
-
A list of
PipelineActivity
objects. Activities perform transformations on your messages, such as removing, renaming or adding message attributes; filtering messages based on attribute values; invoking your Lambda unctions on messages for advanced processing; or performing mathematical transformations to normalize device data.The list can be 2-25
PipelineActivity
objects and must contain both achannel
and adatastore
activity. Each entry in the list must contain only one activity. For example:pipelineActivities = [ { "channel": { ... } }, { "lambda": { ... } }, ... ]
Type: Array of PipelineActivity objects
Array Members: Minimum number of 1 item. Maximum number of 25 items.
Required: Yes
- pipelineName
-
The name of the pipeline.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 128.
Pattern:
(^(?!_{2}))(^[a-zA-Z0-9_]+$)
Required: Yes
-
Metadata which can be used to manage the pipeline.
Type: Array of Tag objects
Array Members: Minimum number of 1 item. Maximum number of 50 items.
Required: No
Response Syntax
HTTP/1.1 201
Content-type: application/json
{
"pipelineArn": "string",
"pipelineName": "string"
}
Response Elements
If the action is successful, the service sends back an HTTP 201 response.
The following data is returned in JSON format by the service.
- pipelineArn
-
The ARN of the pipeline.
Type: String
- pipelineName
-
The name of the pipeline.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 128.
Pattern:
(^(?!_{2}))(^[a-zA-Z0-9_]+$)
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
- LimitExceededException
-
The command caused an internal limit to be exceeded.
HTTP Status Code: 410
- ResourceAlreadyExistsException
-
A resource with the same name already exists.
HTTP Status Code: 409
- 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 Amazon SDKs, see the following: