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 ResourceNotFoundException. May throw ResourceInUseException. May throw InvalidArgumentException. May throw ConcurrentModificationException. May throw CodeValidationException. May throw InvalidRequestException.
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 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 {
ArgumentError.checkNotNull(applicationName, 'applicationName');
_s.validateStringLength(
'applicationName',
applicationName,
1,
128,
isRequired: true,
);
ArgumentError.checkNotNull(
currentApplicationVersionId, 'currentApplicationVersionId');
_s.validateNumRange(
'currentApplicationVersionId',
currentApplicationVersionId,
1,
999999999,
isRequired: true,
);
ArgumentError.checkNotNull(input, 'input');
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);
}