listTapePools method

Future<ListTapePoolsOutput> listTapePools({
  1. int? limit,
  2. String? marker,
  3. List<String>? poolARNs,
})

Lists custom tape pools. You specify custom tape pools to list by specifying one or more custom tape pool Amazon Resource Names (ARNs). If you don't specify a custom tape pool ARN, the operation lists all custom tape pools.

This operation supports pagination. You can optionally specify the Limit parameter in the body to limit the number of tape pools in the response. If the number of tape pools 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 tape pools.

May throw InvalidGatewayRequestException. May throw InternalServerError.

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

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

Parameter poolARNs : The Amazon Resource Name (ARN) of each of the custom tape pools you want to list. If you don't specify a custom tape pool ARN, the response lists all custom tape pools.

Implementation

Future<ListTapePoolsOutput> listTapePools({
  int? limit,
  String? marker,
  List<String>? poolARNs,
}) 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.ListTapePools'
  };
  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 (poolARNs != null) 'PoolARNs': poolARNs,
    },
  );

  return ListTapePoolsOutput.fromJson(jsonResponse.body);
}