deleteApplicationCloudWatchLoggingOption method

Future<void> deleteApplicationCloudWatchLoggingOption({
  1. required String applicationName,
  2. required String cloudWatchLoggingOptionId,
  3. required int currentApplicationVersionId,
})
Deletes a CloudWatch log stream from an application. For more information about using CloudWatch log streams with Amazon Kinesis Analytics applications, see Working with Amazon CloudWatch Logs.

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

Parameter applicationName : The Kinesis Analytics application name.

Parameter cloudWatchLoggingOptionId : The CloudWatchLoggingOptionId of the CloudWatch logging option to delete. You can get the CloudWatchLoggingOptionId by using the DescribeApplication operation.

Parameter currentApplicationVersionId : The version ID of the Kinesis Analytics application.

Implementation

Future<void> deleteApplicationCloudWatchLoggingOption({
  required String applicationName,
  required String cloudWatchLoggingOptionId,
  required int currentApplicationVersionId,
}) async {
  ArgumentError.checkNotNull(applicationName, 'applicationName');
  _s.validateStringLength(
    'applicationName',
    applicationName,
    1,
    128,
    isRequired: true,
  );
  ArgumentError.checkNotNull(
      cloudWatchLoggingOptionId, 'cloudWatchLoggingOptionId');
  _s.validateStringLength(
    'cloudWatchLoggingOptionId',
    cloudWatchLoggingOptionId,
    1,
    50,
    isRequired: true,
  );
  ArgumentError.checkNotNull(
      currentApplicationVersionId, 'currentApplicationVersionId');
  _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.DeleteApplicationCloudWatchLoggingOption'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ApplicationName': applicationName,
      'CloudWatchLoggingOptionId': cloudWatchLoggingOptionId,
      'CurrentApplicationVersionId': currentApplicationVersionId,
    },
  );
}