describeFileSystems method
Returns the description of a specific Amazon EFS file system if either the
file system CreationToken or the FileSystemId is
provided. Otherwise, it returns descriptions of all file systems owned by
the caller's AWS account in the AWS Region of the endpoint that you're
calling.
When retrieving all file system descriptions, you can optionally specify
the MaxItems parameter to limit the number of descriptions in
a response. Currently, this number is automatically set to 10. If more
file system descriptions remain, Amazon EFS returns a
NextMarker, an opaque token, in the response. In this case,
you should send a subsequent request with the Marker request
parameter set to the value of NextMarker.
To retrieve a list of your file system descriptions, this operation is
used in an iterative process, where DescribeFileSystems is
called first without the Marker and then the operation
continues to call it with the Marker parameter set to the
value of the NextMarker from the previous response until the
response has no NextMarker.
The order of file systems returned in the response of one
DescribeFileSystems call and the order of file systems
returned across the responses of a multi-call iteration is unspecified.
This operation requires permissions for the
elasticfilesystem:DescribeFileSystems action.
May throw BadRequest. May throw InternalServerError. May throw FileSystemNotFound.
Parameter creationToken :
(Optional) Restricts the list to the file system with this creation token
(String). You specify a creation token when you create an Amazon EFS file
system.
Parameter fileSystemId :
(Optional) ID of the file system whose description you want to retrieve
(String).
Parameter marker :
(Optional) Opaque pagination token returned from a previous
DescribeFileSystems operation (String). If present, specifies
to continue the list from where the returning call had left off.
Parameter maxItems :
(Optional) Specifies the maximum number of file systems to return in the
response (integer). This number is automatically set to 100. The response
is paginated at 100 per page if you have more than 100 file systems.
Implementation
Future<DescribeFileSystemsResponse> describeFileSystems({
String? creationToken,
String? fileSystemId,
String? marker,
int? maxItems,
}) async {
_s.validateStringLength(
'creationToken',
creationToken,
1,
64,
);
_s.validateStringLength(
'fileSystemId',
fileSystemId,
0,
128,
);
_s.validateStringLength(
'marker',
marker,
1,
128,
);
_s.validateNumRange(
'maxItems',
maxItems,
1,
1152921504606846976,
);
final $query = <String, List<String>>{
if (creationToken != null) 'CreationToken': [creationToken],
if (fileSystemId != null) 'FileSystemId': [fileSystemId],
if (marker != null) 'Marker': [marker],
if (maxItems != null) 'MaxItems': [maxItems.toString()],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri: '/2015-02-01/file-systems',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return DescribeFileSystemsResponse.fromJson(response);
}