listRecoveryPoints method

Future<ListRecoveryPointsResponse> listRecoveryPoints({
  1. DateTime? endTime,
  2. int? maxResults,
  3. String? namespaceArn,
  4. String? namespaceName,
  5. String? nextToken,
  6. DateTime? startTime,
})

Returns an array of recovery points.

May throw InternalServerException. May throw ValidationException.

Parameter endTime : The time when creation of the recovery point 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 recovery points.

Parameter namespaceName : The name of the namespace to list recovery points for.

Parameter nextToken : If your initial ListRecoveryPoints operation returns a nextToken, you can include the returned nextToken in following ListRecoveryPoints operations, which returns results in the next page.

Parameter startTime : The time when the recovery point's creation was initiated.

Implementation

Future<ListRecoveryPointsResponse> listRecoveryPoints({
  DateTime? endTime,
  int? maxResults,
  String? namespaceArn,
  String? namespaceName,
  String? nextToken,
  DateTime? startTime,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'RedshiftServerless.ListRecoveryPoints'
  };
  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 (startTime != null) 'startTime': unixTimestampToJson(startTime),
    },
  );

  return ListRecoveryPointsResponse.fromJson(jsonResponse.body);
}