createSnapshot method
Creates a snapshot of a Simple AD or Microsoft AD directory in the Amazon Web Services cloud.
May throw ClientException.
May throw EntityDoesNotExistException.
May throw InvalidParameterException.
May throw ServiceException.
May throw SnapshotLimitExceededException.
Parameter directoryId :
The identifier of the directory of which to take a snapshot.
Parameter name :
The descriptive name to apply to the snapshot.
Implementation
Future<CreateSnapshotResult> createSnapshot({
required String directoryId,
String? name,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'DirectoryService_20150416.CreateSnapshot'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'DirectoryId': directoryId,
if (name != null) 'Name': name,
},
);
return CreateSnapshotResult.fromJson(jsonResponse.body);
}