stop_experiment_run
async
¶
stop_experiment_run(
experiment_id: ExperimentId,
run_id: ExperimentRunId,
*,
config_overrides: Optional[AsyncCloudWatchOmniClientConfig] = 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.
>>> await 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/async_cloud_watch_omni.py
7430 7431 7432 7433 7434 7435 7436 7437 7438 7439 7440 7441 7442 7443 7444 7445 7446 7447 7448 7449 7450 7451 7452 7453 7454 7455 7456 7457 7458 7459 7460 7461 7462 7463 7464 7465 7466 7467 7468 7469 7470 7471 7472 7473 7474 7475 7476 7477 7478 7479 7480 7481 7482 7483 7484 7485 7486 7487 7488 7489 7490 7491 7492 7493 7494 7495 7496 7497 7498 7499 7500 7501 7502 7503 7504 7505 7506 7507 7508 7509 7510 7511 7512 7513 7514 7515 7516 7517 | |