listRecoveryPointsByLegalHold method

Future<ListRecoveryPointsByLegalHoldOutput> listRecoveryPointsByLegalHold({
  1. required String legalHoldId,
  2. int? maxResults,
  3. String? nextToken,
})

This action returns recovery point ARNs (Amazon Resource Names) of the specified legal hold.

May throw InvalidParameterValueException. May throw MissingParameterValueException. May throw ServiceUnavailableException.

Parameter legalHoldId : The ID of the legal hold.

Parameter maxResults : The maximum number of resource list items to be returned.

Parameter nextToken : The next item following a partial list of returned resources. For example, if a request is made to return MaxResults number of resources, NextToken allows you to return more items in your list starting at the location pointed to by the next token.

Implementation

Future<ListRecoveryPointsByLegalHoldOutput> listRecoveryPointsByLegalHold({
  required String legalHoldId,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    1000,
  );
  final $query = <String, List<String>>{
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/legal-holds/${Uri.encodeComponent(legalHoldId)}/recovery-points',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListRecoveryPointsByLegalHoldOutput.fromJson(response);
}