deleteApplicationReferenceDataSource method

Future<void> deleteApplicationReferenceDataSource({
  1. required String applicationName,
  2. required int currentApplicationVersionId,
  3. required String referenceId,
})
Deletes a reference data source configuration from the specified application configuration.

If the application is running, Amazon Kinesis Analytics immediately removes the in-application table that you created using the AddApplicationReferenceDataSource operation.

This operation requires permissions to perform the kinesisanalytics.DeleteApplicationReferenceDataSource action.

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

Parameter applicationName : Name of an existing application.

Parameter currentApplicationVersionId : Version of the application. You can use the DescribeApplication operation to get the current application version. If the version specified is not the current version, the ConcurrentModificationException is returned.

Parameter referenceId : ID of the reference data source. When you add a reference data source to your application using the AddApplicationReferenceDataSource, Amazon Kinesis Analytics assigns an ID. You can use the DescribeApplication operation to get the reference ID.

Implementation

Future<void> deleteApplicationReferenceDataSource({
  required String applicationName,
  required int currentApplicationVersionId,
  required String referenceId,
}) 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(referenceId, 'referenceId');
  _s.validateStringLength(
    'referenceId',
    referenceId,
    1,
    50,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target':
        'KinesisAnalytics_20150814.DeleteApplicationReferenceDataSource'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ApplicationName': applicationName,
      'CurrentApplicationVersionId': currentApplicationVersionId,
      'ReferenceId': referenceId,
    },
  );
}