rejectSharedDirectory method
Rejects a directory sharing request that was sent from the directory owner account.
May throw InvalidParameterException. May throw EntityDoesNotExistException. May throw DirectoryAlreadySharedException. May throw ClientException. May throw ServiceException.
Parameter sharedDirectoryId
:
Identifier of the shared directory in the directory consumer account. This
identifier is different for each directory owner account.
Implementation
Future<RejectSharedDirectoryResult> rejectSharedDirectory({
required String sharedDirectoryId,
}) async {
ArgumentError.checkNotNull(sharedDirectoryId, 'sharedDirectoryId');
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'DirectoryService_20150416.RejectSharedDirectory'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'SharedDirectoryId': sharedDirectoryId,
},
);
return RejectSharedDirectoryResult.fromJson(jsonResponse.body);
}