listTapes method

Future<ListTapesOutput> listTapes({
  1. int? limit,
  2. String? marker,
  3. List<String>? tapeARNs,
})

Lists virtual tapes in your virtual tape library (VTL) and your virtual tape shelf (VTS). You specify the tapes to list by specifying one or more tape Amazon Resource Names (ARNs). If you don't specify a tape ARN, the operation lists all virtual tapes in both your VTL and VTS.

This operation supports pagination. By default, the operation returns a maximum of up to 100 tapes. You can optionally specify the Limit parameter in the body to limit the number of tapes in the response. If the number of tapes returned in the response is truncated, the response includes a Marker element that you can use in your subsequent request to retrieve the next set of tapes. This operation is only supported in the tape gateway type.

May throw InvalidGatewayRequestException. May throw InternalServerError.

Parameter limit : An optional number limit for the tapes in the list returned by this call.

Parameter marker : A string that indicates the position at which to begin the returned list of tapes.

Implementation

Future<ListTapesOutput> listTapes({
  int? limit,
  String? marker,
  List<String>? tapeARNs,
}) async {
  _s.validateNumRange(
    'limit',
    limit,
    1,
    1152921504606846976,
  );
  _s.validateStringLength(
    'marker',
    marker,
    1,
    1000,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'StorageGateway_20130630.ListTapes'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (limit != null) 'Limit': limit,
      if (marker != null) 'Marker': marker,
      if (tapeARNs != null) 'TapeARNs': tapeARNs,
    },
  );

  return ListTapesOutput.fromJson(jsonResponse.body);
}