AWS IoT Analytics
AWS IoT Analytics Documentation (API Version 2017-11-27)

CreatePipeline

Creates a pipeline. A pipeline consumes messages from one or more channels and allows you to process the messages before storing them in a data store.

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 pipeline activities.

The list can be 1-25 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 functions on messages for advanced processing; or performing mathematical transformations to normalize device data.

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: ^[a-zA-Z0-9_]+$

Required: Yes

tags

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: ^[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: 429

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: