listSnapshots method
Returns a list of snapshots.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ValidationException.
Parameter endTime :
The timestamp showing when the snapshot creation finished.
Parameter maxResults :
An optional parameter that specifies the maximum number of results to
return. You can use nextToken to display the next page of
results.
Parameter namespaceArn :
The Amazon Resource Name (ARN) of the namespace from which to list all
snapshots.
Parameter namespaceName :
The namespace from which to list all snapshots.
Parameter nextToken :
If nextToken is returned, there are more results available.
The value of nextToken is a unique pagination token for each
page. Make the call again using the returned token to retrieve the next
page.
Parameter ownerAccount :
The owner Amazon Web Services account of the snapshot.
Parameter startTime :
The time when the creation of the snapshot was initiated.
Implementation
Future<ListSnapshotsResponse> listSnapshots({
DateTime? endTime,
int? maxResults,
String? namespaceArn,
String? namespaceName,
String? nextToken,
String? ownerAccount,
DateTime? startTime,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'RedshiftServerless.ListSnapshots'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (endTime != null) 'endTime': unixTimestampToJson(endTime),
if (maxResults != null) 'maxResults': maxResults,
if (namespaceArn != null) 'namespaceArn': namespaceArn,
if (namespaceName != null) 'namespaceName': namespaceName,
if (nextToken != null) 'nextToken': nextToken,
if (ownerAccount != null) 'ownerAccount': ownerAccount,
if (startTime != null) 'startTime': unixTimestampToJson(startTime),
},
);
return ListSnapshotsResponse.fromJson(jsonResponse.body);
}