Amazon Kinesis Analytics
kinesisanalytics (API Version 2018-05-23)

AddApplicationInput

Adds a streaming source to your SQL-based Amazon Kinesis Data Analytics application.

You can add a streaming source when you create an application, or you can use this operation to add a streaming source after you create an application. For more information, see CreateApplication.

Any configuration update, including adding a streaming source using this operation, results in a new version of the application. You can use the DescribeApplication operation to find the current application version.

Request Syntax

{ "ApplicationName": "string", "CurrentApplicationVersionId": number, "Input": { "InputParallelism": { "Count": number }, "InputProcessingConfiguration": { "InputLambdaProcessor": { "ResourceARN": "string" } }, "InputSchema": { "RecordColumns": [ { "Mapping": "string", "Name": "string", "SqlType": "string" } ], "RecordEncoding": "string", "RecordFormat": { "MappingParameters": { "CSVMappingParameters": { "RecordColumnDelimiter": "string", "RecordRowDelimiter": "string" }, "JSONMappingParameters": { "RecordRowPath": "string" } }, "RecordFormatType": "string" } }, "KinesisFirehoseInput": { "ResourceARN": "string" }, "KinesisStreamsInput": { "ResourceARN": "string" }, "NamePrefix": "string" } }

Request Parameters

The request accepts the following data in JSON format.

ApplicationName

The name of your existing application to which you want to add the streaming source.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 128.

Pattern: [a-zA-Z0-9_.-]+

Required: Yes

CurrentApplicationVersionId

The current version of your application. You can use the DescribeApplication operation to find the current application version.

Type: Long

Valid Range: Minimum value of 1. Maximum value of 999999999.

Required: Yes

Input

The Input to add.

Type: Input object

Required: Yes

Response Syntax

{ "ApplicationARN": "string", "ApplicationVersionId": number, "InputDescriptions": [ { "InAppStreamNames": [ "string" ], "InputId": "string", "InputParallelism": { "Count": number }, "InputProcessingConfigurationDescription": { "InputLambdaProcessorDescription": { "ResourceARN": "string", "RoleARN": "string" } }, "InputSchema": { "RecordColumns": [ { "Mapping": "string", "Name": "string", "SqlType": "string" } ], "RecordEncoding": "string", "RecordFormat": { "MappingParameters": { "CSVMappingParameters": { "RecordColumnDelimiter": "string", "RecordRowDelimiter": "string" }, "JSONMappingParameters": { "RecordRowPath": "string" } }, "RecordFormatType": "string" } }, "InputStartingPositionConfiguration": { "InputStartingPosition": "string" }, "KinesisFirehoseInputDescription": { "ResourceARN": "string", "RoleARN": "string" }, "KinesisStreamsInputDescription": { "ResourceARN": "string", "RoleARN": "string" }, "NamePrefix": "string" } ] }

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.

ApplicationARN

The Amazon Resource Name (ARN) of the application.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 2048.

Pattern: arn:.*

ApplicationVersionId

Provides the current application version.

Type: Long

Valid Range: Minimum value of 1. Maximum value of 999999999.

InputDescriptions

Describes the application input configuration.

Type: Array of InputDescription objects

Errors

CodeValidationException

The user-provided application code (query) is not valid. This can be a simple syntax error.

HTTP Status Code: 400

ConcurrentModificationException

Exception thrown as a result of concurrent modifications to an application. This error can be the result of attempting to modify an application without using the current application ID.

HTTP Status Code: 400

InvalidArgumentException

The specified input parameter value is not valid.

HTTP Status Code: 400

InvalidRequestException

The request JSON is not valid for the operation.

HTTP Status Code: 400

ResourceInUseException

The application is not available for this operation.

HTTP Status Code: 400

ResourceNotFoundException

Specified application can't be found.

HTTP Status Code: 400

See Also

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