listAccesses method
Lists the details for all the accesses you have on your server.
May throw InternalServiceError.
May throw InvalidNextTokenException.
May throw InvalidRequestException.
May throw ResourceNotFoundException.
May throw ServiceUnavailableException.
Parameter serverId :
A system-assigned unique identifier for a server that has users assigned
to it.
Parameter maxResults :
The maximum number of items to return.
Parameter nextToken :
When you can get additional results from the ListAccesses
call, a NextToken parameter is returned in the output. You
can then pass in a subsequent command to the NextToken
parameter to continue listing additional accesses.
Implementation
Future<ListAccessesResponse> listAccesses({
required String serverId,
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
1000,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'TransferService.ListAccesses'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ServerId': serverId,
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
},
);
return ListAccessesResponse.fromJson(jsonResponse.body);
}