listDirectories method
Lists directories created within an account.
May throw AccessDeniedException.
May throw InternalServiceException.
May throw InvalidArnException.
May throw InvalidNextTokenException.
May throw LimitExceededException.
May throw RetryableConflictException.
May throw ValidationException.
Parameter maxResults :
The maximum number of results to retrieve.
Parameter nextToken :
The pagination token.
Parameter state :
The state of the directories in the list. Can be either Enabled, Disabled,
or Deleted.
Implementation
Future<ListDirectoriesResponse> listDirectories({
int? maxResults,
String? nextToken,
DirectoryState? state,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
1152921504606846976,
);
final $payload = <String, dynamic>{
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
if (state != null) 'state': state.value,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/amazonclouddirectory/2017-01-11/directory/list',
exceptionFnMap: _exceptionFns,
);
return ListDirectoriesResponse.fromJson(response);
}