describeMountTargets method

Future<DescribeMountTargetsResponse> describeMountTargets({
  1. String? accessPointId,
  2. String? fileSystemId,
  3. String? marker,
  4. int? maxItems,
  5. String? mountTargetId,
})

Returns the descriptions of all the current mount targets, or a specific mount target, for a file system. When requesting all of the current mount targets, the order of mount targets returned in the response is unspecified.

This operation requires permissions for the elasticfilesystem:DescribeMountTargets action, on either the file system ID that you specify in FileSystemId, or on the file system of the mount target that you specify in MountTargetId.

May throw BadRequest. May throw InternalServerError. May throw FileSystemNotFound. May throw MountTargetNotFound. May throw AccessPointNotFound.

Parameter accessPointId : (Optional) The ID of the access point whose mount targets that you want to list. It must be included in your request if a FileSystemId or MountTargetId is not included in your request. Accepts either an access point ID or ARN as input.

Parameter fileSystemId : (Optional) ID of the file system whose mount targets you want to list (String). It must be included in your request if an AccessPointId or MountTargetId is not included. Accepts either a file system ID or ARN as input.

Parameter marker : (Optional) Opaque pagination token returned from a previous DescribeMountTargets operation (String). If present, it specifies to continue the list from where the previous returning call left off.

Parameter maxItems : (Optional) Maximum number of mount targets to return in the response. Currently, this number is automatically set to 10, and other values are ignored. The response is paginated at 100 per page if you have more than 100 mount targets.

Parameter mountTargetId : (Optional) ID of the mount target that you want to have described (String). It must be included in your request if FileSystemId is not included. Accepts either a mount target ID or ARN as input.

Implementation

Future<DescribeMountTargetsResponse> describeMountTargets({
  String? accessPointId,
  String? fileSystemId,
  String? marker,
  int? maxItems,
  String? mountTargetId,
}) async {
  _s.validateStringLength(
    'fileSystemId',
    fileSystemId,
    0,
    128,
  );
  _s.validateStringLength(
    'marker',
    marker,
    1,
    128,
  );
  _s.validateNumRange(
    'maxItems',
    maxItems,
    1,
    1152921504606846976,
  );
  _s.validateStringLength(
    'mountTargetId',
    mountTargetId,
    13,
    45,
  );
  final $query = <String, List<String>>{
    if (accessPointId != null) 'AccessPointId': [accessPointId],
    if (fileSystemId != null) 'FileSystemId': [fileSystemId],
    if (marker != null) 'Marker': [marker],
    if (maxItems != null) 'MaxItems': [maxItems.toString()],
    if (mountTargetId != null) 'MountTargetId': [mountTargetId],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/2015-02-01/mount-targets',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return DescribeMountTargetsResponse.fromJson(response);
}