Reboots the specified WorkSpaces.
You cannot reboot a WorkSpace unless its state is AVAILABLE, UNHEALTHY, or REBOOTING. Reboot a WorkSpace in the REBOOTING state only if your WorkSpace has been stuck in the REBOOTING state for over 20 minutes.
This operation is asynchronous and returns before the WorkSpaces have rebooted.
Parameters:
-
reboot_workspace_requests
(RebootWorkspaceRequests)
–
The WorkSpaces to reboot. You can specify up to 25 WorkSpaces.
Raises:
Source code in docs_src/capo_workspaces/_services/work_spaces.py
| def reboot_workspaces(
self,
reboot_workspace_requests: "capo_workspaces.types.reboot_workspace_requests.RebootWorkspaceRequests",
*,
config_overrides: Optional[WorkSpacesClientConfig] = None,
) -> "capo_workspaces.types.reboot_workspaces_result.RebootWorkspacesResult":
"""<p>Reboots the specified WorkSpaces.</p> <p>You cannot reboot a WorkSpace unless its state is <code>AVAILABLE</code>, <code>UNHEALTHY</code>, or <code>REBOOTING</code>. Reboot a WorkSpace in the <code>REBOOTING</code> state only if your WorkSpace has been stuck in the <code>REBOOTING</code> state for over 20 minutes.</p> <p>This operation is asynchronous and returns before the WorkSpaces have rebooted.</p>
Args:
reboot_workspace_requests: <p>The WorkSpaces to reboot. You can specify up to 25 WorkSpaces.</p>
Raises:
capo_workspaces.errors.operation_not_supported_exception.OperationNotSupportedException: <p>This operation is not supported.</p>
capo_workspaces.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_workspaces.types.reboot_workspaces_request.RebootWorkspacesRequest]",
) -> OperationResponse[
"capo_workspaces.types.reboot_workspaces_result.RebootWorkspacesResult"
]:
import capo_workspaces._operations.workspaces_service.reboot_workspaces
output, http_response = (
capo_workspaces._operations.workspaces_service.reboot_workspaces.reboot_workspaces(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("RebootWorkspaces")
)
input_: capo_workspaces.types.reboot_workspaces_request.RebootWorkspacesRequest = {
"reboot_workspace_requests": reboot_workspace_requests
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|