updateDirectorySetup method

Future<void> updateDirectorySetup({
  1. required String directoryId,
  2. required UpdateType updateType,
  3. bool? createSnapshotBeforeUpdate,
  4. DirectorySizeUpdateSettings? directorySizeUpdateSettings,
  5. NetworkUpdateSettings? networkUpdateSettings,
  6. OSUpdateSettings? oSUpdateSettings,
})

Updates directory configuration for the specified update type.

May throw AccessDeniedException. May throw ClientException. May throw DirectoryDoesNotExistException. May throw DirectoryInDesiredStateException. May throw DirectoryUnavailableException. May throw InvalidParameterException. May throw ServiceException. May throw SnapshotLimitExceededException. May throw UnsupportedOperationException.

Parameter directoryId : The identifier of the directory to update.

Parameter updateType : The type of update to perform on the directory.

Parameter createSnapshotBeforeUpdate : Specifies whether to create a directory snapshot before performing the update.

Parameter directorySizeUpdateSettings : Directory size configuration to apply during the update operation.

Parameter networkUpdateSettings : Network configuration to apply during the directory update operation.

Parameter oSUpdateSettings : Operating system configuration to apply during the directory update operation.

Implementation

Future<void> updateDirectorySetup({
  required String directoryId,
  required UpdateType updateType,
  bool? createSnapshotBeforeUpdate,
  DirectorySizeUpdateSettings? directorySizeUpdateSettings,
  NetworkUpdateSettings? networkUpdateSettings,
  OSUpdateSettings? oSUpdateSettings,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'DirectoryService_20150416.UpdateDirectorySetup'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'DirectoryId': directoryId,
      'UpdateType': updateType.value,
      if (createSnapshotBeforeUpdate != null)
        'CreateSnapshotBeforeUpdate': createSnapshotBeforeUpdate,
      if (directorySizeUpdateSettings != null)
        'DirectorySizeUpdateSettings': directorySizeUpdateSettings,
      if (networkUpdateSettings != null)
        'NetworkUpdateSettings': networkUpdateSettings,
      if (oSUpdateSettings != null) 'OSUpdateSettings': oSUpdateSettings,
    },
  );
}