stop_experiment_run
¶
stop_experiment_run(
experiment_id: ExperimentId,
run_id: ExperimentRunId,
*,
config_overrides: Optional[CloudWatchOmniClientConfig] = None,
detail: Optional[DetailText] = None,
) -> StopExperimentRunOutput
Stops a run. Applies to runs reported from the caller's code and to hosted runs. The run ends as DID_NOT_FINISH with statusReason STOPPED; a hosted run is STOPPING until its batch evaluation has stopped. Stopping a run that is STOPPING or has ended returns its current state. Fails with a ConflictException (RUN_TERMINAL) while a CompleteExperimentRun call is finishing the run; retry CompleteExperimentRun instead.
Parameters:
-
experiment_id(ExperimentId) –The ID of the experiment the run belongs to.
-
run_id(ExperimentRunId) –The ID of the run to stop.
-
detail(Optional[DetailText], default:None) –An optional reason for stopping the run, stored as the run's statusDetail. For example, "agent unreachable after 5 consecutive errors".
Raises:
-
AccessDeniedException–The caller is not authorized to perform this action.
-
ConflictException–The operation could not be completed because of a conflict with the current state of the resource.
-
InternalServerException–An unexpected error occurred while processing the request.
-
ResourceNotFoundException–The specified resource does not exist.
-
ThrottlingException–The request was throttled due to exceeding the allowed request rate.
-
ValidationException–A parameter is specified incorrectly.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
Stop a reported run The following example stops a run reported from the caller's code after the agent under test became unreachable. The run ends as DID_NOT_FINISH, and cases that were never reported count as not run. Payloads are shown as JSON; on the wire they are CBOR-encoded.
>>> client.stop_experiment_run(experiment_id='exp-01JD8K3M5N7P9Q2R4S6T8V0W1X', run_id='ci-build-4821', detail='agent unreachable after 5 consecutive errors')
Source code in docs_src/capo_cloudwatchomni/_services/cloud_watch_omni.py
7339 7340 7341 7342 7343 7344 7345 7346 7347 7348 7349 7350 7351 7352 7353 7354 7355 7356 7357 7358 7359 7360 7361 7362 7363 7364 7365 7366 7367 7368 7369 7370 7371 7372 7373 7374 7375 7376 7377 7378 7379 7380 7381 7382 7383 7384 7385 7386 7387 7388 7389 7390 7391 7392 7393 7394 7395 7396 7397 7398 7399 7400 7401 7402 7403 7404 7405 7406 7407 7408 7409 7410 7411 7412 7413 7414 7415 7416 7417 7418 7419 7420 7421 7422 7423 7424 7425 | |