Skip to content

get_experiment_definition

get_experiment_definition(
    application_identifier: Identifier,
    experiment_definition_identifier: Identifier,
    *,
    config_overrides: Optional[AppConfigClientConfig] = None,
) -> ExperimentDefinition

Retrieves information about an experiment definition.

Parameters:

  • application_identifier (Identifier) –

    The application ID or name.

  • experiment_definition_identifier (Identifier) –

    The experiment definition ID or name.

Raises:

Examples:

To get an experiment definition The following GetExperimentDefinition example retrieves the details of an experiment definition.

>>> client.get_experiment_definition(application_identifier='339ohji', experiment_definition_identifier='bsxyd7k')
Source code in docs_src/capo_appconfig/_services/app_config.py
def get_experiment_definition(
    self,
    application_identifier: "capo_appconfig.types.identifier.Identifier",
    experiment_definition_identifier: "capo_appconfig.types.identifier.Identifier",
    *,
    config_overrides: Optional[AppConfigClientConfig] = None,
) -> "capo_appconfig.types.experiment_definition.ExperimentDefinition":
    """<p>Retrieves information about an experiment definition.</p>

    Args:
        application_identifier: <p>The application ID or name.</p>
        experiment_definition_identifier: <p>The experiment definition ID or name.</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 definition
        The following GetExperimentDefinition example retrieves the details of an experiment definition.

        >>> client.get_experiment_definition(application_identifier='339ohji', experiment_definition_identifier='bsxyd7k')
    """

    def _handler(
        req: "OperationRequest[capo_appconfig.types.get_experiment_definition_request.GetExperimentDefinitionRequest]",
    ) -> OperationResponse[
        "capo_appconfig.types.experiment_definition.ExperimentDefinition"
    ]:
        import capo_appconfig._operations.amazon_app_config.get_experiment_definition

        output, http_response = (
            capo_appconfig._operations.amazon_app_config.get_experiment_definition.get_experiment_definition(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetExperimentDefinition")
    )
    input_: capo_appconfig.types.get_experiment_definition_request.GetExperimentDefinitionRequest = {
        "application_identifier": application_identifier,
        "experiment_definition_identifier": experiment_definition_identifier,
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output