rebootWorkspaces method
Future<RebootWorkspacesResult>
rebootWorkspaces({
- required List<
RebootRequest> rebootWorkspaceRequests,
Reboots the specified WorkSpaces.
You cannot reboot a WorkSpace unless its state is AVAILABLE
or UNHEALTHY
.
This operation is asynchronous and returns before the WorkSpaces have rebooted.
Parameter rebootWorkspaceRequests
:
The WorkSpaces to reboot. You can specify up to 25 WorkSpaces.
Implementation
Future<RebootWorkspacesResult> rebootWorkspaces({
required List<RebootRequest> rebootWorkspaceRequests,
}) async {
ArgumentError.checkNotNull(
rebootWorkspaceRequests, 'rebootWorkspaceRequests');
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'WorkspacesService.RebootWorkspaces'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'RebootWorkspaceRequests': rebootWorkspaceRequests,
},
);
return RebootWorkspacesResult.fromJson(jsonResponse.body);
}