listTagsForStream method
Lists the tags for the specified Kinesis data stream. This operation has a limit of five transactions per second per account.
May throw ResourceNotFoundException. May throw InvalidArgumentException. May throw LimitExceededException.
Parameter streamName
:
The name of the stream.
Parameter exclusiveStartTagKey
:
The key to use as the starting point for the list of tags. If this
parameter is set, ListTagsForStream
gets all tags that occur
after ExclusiveStartTagKey
.
Parameter limit
:
The number of tags to return. If this number is less than the total number
of tags associated with the stream, HasMoreTags
is set to
true
. To list additional tags, set
ExclusiveStartTagKey
to the last key in the response.
Implementation
Future<ListTagsForStreamOutput> listTagsForStream({
required String streamName,
String? exclusiveStartTagKey,
int? limit,
}) async {
ArgumentError.checkNotNull(streamName, 'streamName');
_s.validateStringLength(
'streamName',
streamName,
1,
128,
isRequired: true,
);
_s.validateStringLength(
'exclusiveStartTagKey',
exclusiveStartTagKey,
1,
128,
);
_s.validateNumRange(
'limit',
limit,
1,
50,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'Kinesis_20131202.ListTagsForStream'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'StreamName': streamName,
if (exclusiveStartTagKey != null)
'ExclusiveStartTagKey': exclusiveStartTagKey,
if (limit != null) 'Limit': limit,
},
);
return ListTagsForStreamOutput.fromJson(jsonResponse.body);
}