addApplicationInput method
Adds a streaming source to your SQL-based 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.
May throw CodeValidationException.
May throw ConcurrentModificationException.
May throw InvalidArgumentException.
May throw InvalidRequestException.
May throw ResourceInUseException.
May throw ResourceNotFoundException.
Parameter applicationName :
The name of your existing application to which you want to add the
streaming source.
Parameter currentApplicationVersionId :
The current version of your application. You must provide the
ApplicationVersionID or the ConditionalToken.You
can use the DescribeApplication operation to find the current
application version.
Parameter input :
The Input to add.
Implementation
Future<AddApplicationInputResponse> addApplicationInput({
required String applicationName,
required int currentApplicationVersionId,
required Input input,
}) async {
_s.validateNumRange(
'currentApplicationVersionId',
currentApplicationVersionId,
1,
999999999,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'KinesisAnalytics_20180523.AddApplicationInput'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ApplicationName': applicationName,
'CurrentApplicationVersionId': currentApplicationVersionId,
'Input': input,
},
);
return AddApplicationInputResponse.fromJson(jsonResponse.body);
}