listIndexedRecoveryPoints method

Future<ListIndexedRecoveryPointsOutput> listIndexedRecoveryPoints({
  1. DateTime? createdAfter,
  2. DateTime? createdBefore,
  3. IndexStatus? indexStatus,
  4. int? maxResults,
  5. String? nextToken,
  6. String? resourceType,
  7. String? sourceResourceArn,
})

This operation returns a list of recovery points that have an associated index, belonging to the specified account.

Optional parameters you can include are: MaxResults; NextToken; SourceResourceArns; CreatedBefore; CreatedAfter; and ResourceType.

May throw InvalidParameterValueException. May throw ResourceNotFoundException. May throw ServiceUnavailableException.

Parameter createdAfter : Returns only indexed recovery points that were created after the specified date.

Parameter createdBefore : Returns only indexed recovery points that were created before the specified date.

Parameter indexStatus : Include this parameter to filter the returned list by the indicated statuses.

Accepted values: PENDING | ACTIVE | FAILED | DELETING

A recovery point with an index that has the status of ACTIVE can be included in a search.

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

Parameter nextToken : The next item following a partial list of returned recovery points.

For example, if a request is made to return MaxResults number of indexed recovery points, NextToken allows you to return more items in your list starting at the location pointed to by the next token.

Parameter resourceType : Returns a list of indexed recovery points for the specified resource type(s).

Accepted values include:

  • EBS for Amazon Elastic Block Store
  • S3 for Amazon Simple Storage Service (Amazon S3)

Parameter sourceResourceArn : A string of the Amazon Resource Name (ARN) that uniquely identifies the source resource.

Implementation

Future<ListIndexedRecoveryPointsOutput> listIndexedRecoveryPoints({
  DateTime? createdAfter,
  DateTime? createdBefore,
  IndexStatus? indexStatus,
  int? maxResults,
  String? nextToken,
  String? resourceType,
  String? sourceResourceArn,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    1000,
  );
  final $query = <String, List<String>>{
    if (createdAfter != null)
      'createdAfter': [_s.iso8601ToJson(createdAfter).toString()],
    if (createdBefore != null)
      'createdBefore': [_s.iso8601ToJson(createdBefore).toString()],
    if (indexStatus != null) 'indexStatus': [indexStatus.value],
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
    if (resourceType != null) 'resourceType': [resourceType],
    if (sourceResourceArn != null) 'sourceResourceArn': [sourceResourceArn],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/indexes/recovery-point',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListIndexedRecoveryPointsOutput.fromJson(response);
}