describeRecoverySnapshots method

Future<DescribeRecoverySnapshotsResponse> describeRecoverySnapshots({
  1. required String sourceServerID,
  2. DescribeRecoverySnapshotsRequestFilters? filters,
  3. int? maxResults,
  4. String? nextToken,
  5. RecoverySnapshotsOrder? order,
})

Lists all Recovery Snapshots for a single Source Server.

May throw AccessDeniedException. May throw InternalServerException. May throw ThrottlingException. May throw UninitializedAccountException. May throw ValidationException.

Parameter sourceServerID : Filter Recovery Snapshots by Source Server ID.

Parameter filters : A set of filters by which to return Recovery Snapshots.

Parameter maxResults : Maximum number of Recovery Snapshots to retrieve.

Parameter nextToken : The token of the next Recovery Snapshot to retrieve.

Parameter order : The sorted ordering by which to return Recovery Snapshots.

Implementation

Future<DescribeRecoverySnapshotsResponse> describeRecoverySnapshots({
  required String sourceServerID,
  DescribeRecoverySnapshotsRequestFilters? filters,
  int? maxResults,
  String? nextToken,
  RecoverySnapshotsOrder? order,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    1152921504606846976,
  );
  final $payload = <String, dynamic>{
    'sourceServerID': sourceServerID,
    if (filters != null) 'filters': filters,
    if (maxResults != null) 'maxResults': maxResults,
    if (nextToken != null) 'nextToken': nextToken,
    if (order != null) 'order': order.value,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/DescribeRecoverySnapshots',
    exceptionFnMap: _exceptionFns,
  );
  return DescribeRecoverySnapshotsResponse.fromJson(response);
}