updateApplication method
Updates an existing Amazon Kinesis Analytics application. Using this API,
you can update application code, input configuration, and output
configuration.
Note that Amazon Kinesis Analytics updates the
CurrentApplicationVersionId each time you update your
application.
This operation requires permission for the
kinesisanalytics:UpdateApplication action.
May throw CodeValidationException.
May throw ConcurrentModificationException.
May throw InvalidArgumentException.
May throw ResourceInUseException.
May throw ResourceNotFoundException.
May throw UnsupportedOperationException.
Parameter applicationName :
Name of the Amazon Kinesis Analytics application to update.
Parameter applicationUpdate :
Describes application updates.
Parameter currentApplicationVersionId :
The current application version ID. You can use the DescribeApplication
operation to get this value.
Implementation
Future<void> updateApplication({
required String applicationName,
required ApplicationUpdate applicationUpdate,
required int currentApplicationVersionId,
}) 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_20150814.UpdateApplication'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ApplicationName': applicationName,
'ApplicationUpdate': applicationUpdate,
'CurrentApplicationVersionId': currentApplicationVersionId,
},
);
}