Skip to content

get_experiment_run async

get_experiment_run(
    application_identifier: Identifier,
    experiment_definition_identifier: Identifier,
    run: PositiveInteger,
    *,
    config_overrides: Optional[AsyncAppConfigClientConfig] = None,
) -> ExperimentRun

Retrieves information about an experiment run, including its status, start time, and exposure settings.

Parameters:

  • application_identifier (Identifier) –

    The application ID or name.

  • experiment_definition_identifier (Identifier) –

    The experiment definition ID or name.

  • run (PositiveInteger) –

    The run number to retrieve.

Raises:

Examples:

To get an experiment run The following GetExperimentRun example retrieves the details of an experiment run.

>>> await client.get_experiment_run(application_identifier='339ohji', experiment_definition_identifier='bsxyd7k', run=1)
Source code in docs_src/capo_appconfig/_services/async_app_config.py
async def get_experiment_run(
    self,
    application_identifier: "capo_appconfig.types.identifier.Identifier",
    experiment_definition_identifier: "capo_appconfig.types.identifier.Identifier",
    run: "capo_appconfig.types.positive_integer.PositiveInteger",
    *,
    config_overrides: Optional[AsyncAppConfigClientConfig] = None,
) -> "capo_appconfig.types.experiment_run.ExperimentRun":
    """<p>Retrieves information about an experiment run, including its status, start time, and exposure settings.</p>

    Args:
        application_identifier: <p>The application ID or name.</p>
        experiment_definition_identifier: <p>The experiment definition ID or name.</p>
        run: <p>The run number to retrieve.</p>

    Raises:
        capo_appconfig.errors.bad_request_exception.BadRequestException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
        capo_appconfig.errors.internal_server_exception.InternalServerException: <p>There was an internal failure in the AppConfig service.</p>
        capo_appconfig.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource could not be found.</p>
        capo_appconfig.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        To get an experiment run
        The following GetExperimentRun example retrieves the details of an experiment run.

        >>> await client.get_experiment_run(application_identifier='339ohji', experiment_definition_identifier='bsxyd7k', run=1)
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_appconfig.types.get_experiment_run_request.GetExperimentRunRequest]",
    ) -> AsyncOperationResponse[
        "capo_appconfig.types.experiment_run.ExperimentRun"
    ]:
        import capo_appconfig._operations.amazon_app_config.get_experiment_run

        (
            output,
            http_response,
        ) = await capo_appconfig._operations.amazon_app_config.get_experiment_run.async_get_experiment_run(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetExperimentRun")
    )
    input_: capo_appconfig.types.get_experiment_run_request.GetExperimentRunRequest = {
        "application_identifier": application_identifier,
        "experiment_definition_identifier": experiment_definition_identifier,
        "run": run,
    }

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output