deleteApplicationCloudWatchLoggingOption method

Future<DeleteApplicationCloudWatchLoggingOptionResponse> deleteApplicationCloudWatchLoggingOption({
  1. required String applicationName,
  2. required String cloudWatchLoggingOptionId,
  3. required int currentApplicationVersionId,
})

Deletes an Amazon CloudWatch log stream from an Kinesis Data Analytics application.

May throw ResourceNotFoundException. May throw ResourceInUseException. May throw InvalidArgumentException. May throw ConcurrentModificationException. May throw InvalidRequestException. May throw InvalidApplicationConfigurationException.

Parameter applicationName : The application name.

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

Parameter currentApplicationVersionId : The version ID of the application. You can retrieve the application version ID using DescribeApplication.

Implementation

Future<DeleteApplicationCloudWatchLoggingOptionResponse>
    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_20180523.DeleteApplicationCloudWatchLoggingOption'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ApplicationName': applicationName,
      'CloudWatchLoggingOptionId': cloudWatchLoggingOptionId,
      'CurrentApplicationVersionId': currentApplicationVersionId,
    },
  );

  return DeleteApplicationCloudWatchLoggingOptionResponse.fromJson(
      jsonResponse.body);
}