removeTagsFromStream method

Future<void> removeTagsFromStream({
  1. required String streamName,
  2. required List<String> tagKeys,
})

Removes tags from the specified Kinesis data stream. Removed tags are deleted and cannot be recovered after this operation successfully completes.

If you specify a tag that does not exist, it is ignored.

RemoveTagsFromStream has a limit of five transactions per second per account.

May throw ResourceNotFoundException. May throw ResourceInUseException. May throw InvalidArgumentException. May throw LimitExceededException.

Parameter streamName : The name of the stream.

Parameter tagKeys : A list of tag keys. Each corresponding tag is removed from the stream.

Implementation

Future<void> removeTagsFromStream({
  required String streamName,
  required List<String> tagKeys,
}) async {
  ArgumentError.checkNotNull(streamName, 'streamName');
  _s.validateStringLength(
    'streamName',
    streamName,
    1,
    128,
    isRequired: true,
  );
  ArgumentError.checkNotNull(tagKeys, 'tagKeys');
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'Kinesis_20131202.RemoveTagsFromStream'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'StreamName': streamName,
      'TagKeys': tagKeys,
    },
  );
}