Stops the given simulation.
You can't restart a simulation after you stop it. If you want to restart a simulation, then you must stop it, delete it, and start a new instance of it.
Parameters:
Raises:
Source code in docs_src/capo_simspaceweaver/_services/sim_space_weaver.py
| def stop_simulation(
self,
simulation: "capo_simspaceweaver.types.sim_space_weaver_resource_name.SimSpaceWeaverResourceName",
*,
config_overrides: Optional[SimSpaceWeaverClientConfig] = None,
) -> "capo_simspaceweaver.types.stop_simulation_output.StopSimulationOutput":
"""<p>Stops the given simulation.</p> <important> <p>You can't restart a simulation after you stop it. If you want to restart a simulation, then you must stop it, delete it, and start a new instance of it.</p> </important>
Args:
simulation: <p>The name of the simulation.</p>
Raises:
capo_simspaceweaver.errors.access_denied_exception.AccessDeniedException: <p/>
capo_simspaceweaver.errors.conflict_exception.ConflictException: <p/>
capo_simspaceweaver.errors.internal_server_exception.InternalServerException: <p/>
capo_simspaceweaver.errors.resource_not_found_exception.ResourceNotFoundException: <p/>
capo_simspaceweaver.errors.validation_exception.ValidationException: <p/>
capo_simspaceweaver.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_simspaceweaver.types.stop_simulation_input.StopSimulationInput]",
) -> OperationResponse[
"capo_simspaceweaver.types.stop_simulation_output.StopSimulationOutput"
]:
import capo_simspaceweaver._operations.sim_space_weaver.stop_simulation
output, http_response = (
capo_simspaceweaver._operations.sim_space_weaver.stop_simulation.stop_simulation(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("StopSimulation")
)
input_: capo_simspaceweaver.types.stop_simulation_input.StopSimulationInput = {
"simulation": simulation
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|