addApplicationInput method

Future<void> addApplicationInput({
  1. required String applicationName,
  2. required int currentApplicationVersionId,
  3. required Input input,
})
Adds a streaming source to your Amazon Kinesis application. For conceptual information, see Configuring Application Input.

You can add a streaming source either 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.

This operation requires permissions to perform the kinesisanalytics:AddApplicationInput action.

May throw ResourceNotFoundException. May throw ResourceInUseException. May throw InvalidArgumentException. May throw ConcurrentModificationException. May throw CodeValidationException. May throw UnsupportedOperationException.

Parameter applicationName : Name of your existing Amazon Kinesis Analytics application to which you want to add the streaming source.

Parameter currentApplicationVersionId : Current version of your Amazon Kinesis Analytics application. You can use the DescribeApplication operation to find the current application version.

Parameter input : The Input to add.

Implementation

Future<void> 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_20150814.AddApplicationInput'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ApplicationName': applicationName,
      'CurrentApplicationVersionId': currentApplicationVersionId,
      'Input': input,
    },
  );
}