suspendMicrovm method
Suspends a running MicroVM, preserving its full memory and disk state. The MicroVM transitions through SUSPENDING to SUSPENDED. To restore, call ResumeMicrovm or send traffic to the endpoint if autoResumeEnabled is true.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter microvmIdentifier :
The ID of the MicroVM to suspend.
Implementation
Future<void> suspendMicrovm({
required String microvmIdentifier,
}) async {
final response = await _protocol.send(
payload: null,
method: 'POST',
requestUri:
'/2025-09-09/microvms/${Uri.encodeComponent(microvmIdentifier)}/suspend',
exceptionFnMap: _exceptionFns,
);
}