getStream method
Returns detailed information about a specific data capture stream for an Amazon Keyspaces table. The information includes the stream's Amazon Resource Name (ARN), creation time, current status, retention period, shard composition, and associated table details. This operation helps you monitor and manage the configuration of your Amazon Keyspaces data streams.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter streamArn :
The Amazon Resource Name (ARN) of the stream for which detailed
information is requested. This uniquely identifies the specific stream you
want to get information about.
Parameter maxResults :
The maximum number of shard objects to return in a single
GetStream request. The default value is 100. The minimum
value is 1 and the maximum value is 100.
Parameter nextToken :
An optional pagination token provided by a previous GetStream
operation. If this parameter is specified, the response includes only
records beyond the token, up to the value specified by
MaxResults.
Parameter shardFilter :
Optional filter criteria to apply when retrieving shards. You can filter
shards based on their parent shardID to get a list of
children shards to narrow down the results returned by the
GetStream operation.
Implementation
Future<GetStreamOutput> getStream({
required String streamArn,
int? maxResults,
String? nextToken,
ShardFilter? shardFilter,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'KeyspacesStreams.GetStream'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'streamArn': streamArn,
if (maxResults != null) 'maxResults': maxResults,
if (nextToken != null) 'nextToken': nextToken,
if (shardFilter != null) 'shardFilter': shardFilter,
},
);
return GetStreamOutput.fromJson(jsonResponse.body);
}