describeWorkspaceDirectories method
Describes the available directories that are registered with Amazon WorkSpaces.
May throw InvalidParameterValuesException.
Parameter directoryIds
:
The identifiers of the directories. If the value is null, all directories
are retrieved.
Parameter limit
:
The maximum number of directories to return.
Parameter nextToken
:
If you received a NextToken
from a previous call that was
paginated, provide this token to receive the next set of results.
Implementation
Future<DescribeWorkspaceDirectoriesResult> describeWorkspaceDirectories({
List<String>? directoryIds,
int? limit,
String? nextToken,
}) async {
_s.validateNumRange(
'limit',
limit,
1,
25,
);
_s.validateStringLength(
'nextToken',
nextToken,
1,
2048,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'WorkspacesService.DescribeWorkspaceDirectories'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (directoryIds != null) 'DirectoryIds': directoryIds,
if (limit != null) 'Limit': limit,
if (nextToken != null) 'NextToken': nextToken,
},
);
return DescribeWorkspaceDirectoriesResult.fromJson(jsonResponse.body);
}