describeSharedDirectories method
Returns the shared directories in your account.
May throw EntityDoesNotExistException. May throw InvalidNextTokenException. May throw InvalidParameterException. May throw UnsupportedOperationException. May throw ClientException. May throw ServiceException.
Parameter ownerDirectoryId
:
Returns the identifier of the directory in the directory owner account.
Parameter limit
:
The number of shared directories to return in the response object.
Parameter nextToken
:
The DescribeSharedDirectoriesResult.NextToken
value from a
previous call to DescribeSharedDirectories. Pass null if this is
the first call.
Parameter sharedDirectoryIds
:
A list of identifiers of all shared directories in your account.
Implementation
Future<DescribeSharedDirectoriesResult> describeSharedDirectories({
required String ownerDirectoryId,
int? limit,
String? nextToken,
List<String>? sharedDirectoryIds,
}) async {
ArgumentError.checkNotNull(ownerDirectoryId, 'ownerDirectoryId');
_s.validateNumRange(
'limit',
limit,
0,
1152921504606846976,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'DirectoryService_20150416.DescribeSharedDirectories'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'OwnerDirectoryId': ownerDirectoryId,
if (limit != null) 'Limit': limit,
if (nextToken != null) 'NextToken': nextToken,
if (sharedDirectoryIds != null)
'SharedDirectoryIds': sharedDirectoryIds,
},
);
return DescribeSharedDirectoriesResult.fromJson(jsonResponse.body);
}