disableKinesisStreamingDestination method

Future<KinesisStreamingDestinationOutput> disableKinesisStreamingDestination({
  1. required String streamArn,
  2. required String tableName,
})

Stops replication from the DynamoDB table to the Kinesis data stream. This is done without deleting either of the resources.

May throw InternalServerError. May throw LimitExceededException. May throw ResourceInUseException. May throw ResourceNotFoundException.

Parameter streamArn : The ARN for a Kinesis data stream.

Parameter tableName : The name of the DynamoDB table.

Implementation

Future<KinesisStreamingDestinationOutput> disableKinesisStreamingDestination({
  required String streamArn,
  required String tableName,
}) async {
  ArgumentError.checkNotNull(streamArn, 'streamArn');
  _s.validateStringLength(
    'streamArn',
    streamArn,
    37,
    1024,
    isRequired: true,
  );
  ArgumentError.checkNotNull(tableName, 'tableName');
  _s.validateStringLength(
    'tableName',
    tableName,
    3,
    255,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'DynamoDB_20120810.DisableKinesisStreamingDestination'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'StreamArn': streamArn,
      'TableName': tableName,
    },
  );

  return KinesisStreamingDestinationOutput.fromJson(jsonResponse.body);
}