listMountTargets method

Future<ListMountTargetsResponse> listMountTargets({
  1. String? accessPointId,
  2. String? fileSystemId,
  3. int? maxResults,
  4. String? nextToken,
})

Returns resource information for all mount targets with optional filtering by file system, access point, and VPC.

May throw InternalServerException. May throw ResourceNotFoundException. May throw ValidationException.

Parameter accessPointId : Optional filter to list only mount targets associated with the specified access point ID or Amazon Resource Name (ARN).

Parameter fileSystemId : Optional filter to list only mount targets associated with the specified S3 File System ID or Amazon Resource Name (ARN). If provided, only mount targets for this file system will be returned in the response.

Parameter maxResults : The maximum number of mount targets to return in a single response.

Parameter nextToken : A pagination token returned from a previous call to continue listing mount targets.

Implementation

Future<ListMountTargetsResponse> listMountTargets({
  String? accessPointId,
  String? fileSystemId,
  int? maxResults,
  String? nextToken,
}) async {
  final $query = <String, List<String>>{
    if (accessPointId != null) 'accessPointId': [accessPointId],
    if (fileSystemId != null) 'fileSystemId': [fileSystemId],
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/mount-targets',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListMountTargetsResponse.fromJson(response);
}