listStreams method
Returns an array of stream ARNs associated with the current account and
endpoint. If the TableName
parameter is present, then
ListStreams
will return only the streams ARNs for that table.
May throw ResourceNotFoundException. May throw InternalServerError.
Parameter exclusiveStartStreamArn
:
The ARN (Amazon Resource Name) of the first item that this operation will
evaluate. Use the value that was returned for
LastEvaluatedStreamArn
in the previous operation.
Parameter limit
:
The maximum number of streams to return. The upper limit is 100.
Parameter tableName
:
If this parameter is provided, then only the streams associated with this
table name are returned.
Implementation
Future<ListStreamsOutput> listStreams({
String? exclusiveStartStreamArn,
int? limit,
String? tableName,
}) async {
_s.validateStringLength(
'exclusiveStartStreamArn',
exclusiveStartStreamArn,
37,
1024,
);
_s.validateNumRange(
'limit',
limit,
1,
1152921504606846976,
);
_s.validateStringLength(
'tableName',
tableName,
3,
255,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'DynamoDBStreams_20120810.ListStreams'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (exclusiveStartStreamArn != null)
'ExclusiveStartStreamArn': exclusiveStartStreamArn,
if (limit != null) 'Limit': limit,
if (tableName != null) 'TableName': tableName,
},
);
return ListStreamsOutput.fromJson(jsonResponse.body);
}