listBackupSelections method

Future<ListBackupSelectionsOutput> listBackupSelections({
  1. required String backupPlanId,
  2. int? maxResults,
  3. String? nextToken,
})

Returns an array containing metadata of the resources associated with the target backup plan.

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

Parameter backupPlanId : Uniquely identifies a backup plan.

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

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

Implementation

Future<ListBackupSelectionsOutput> listBackupSelections({
  required String backupPlanId,
  int? maxResults,
  String? nextToken,
}) async {
  ArgumentError.checkNotNull(backupPlanId, 'backupPlanId');
  _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:
        '/backup/plans/${Uri.encodeComponent(backupPlanId)}/selections/',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListBackupSelectionsOutput.fromJson(response);
}