Skip to content

list_experiment_definitions

list_experiment_definitions(
    *,
    config_overrides: Optional[AppConfigClientConfig] = None,
    application_identifier: Optional[Identifier] = None,
    configuration_profile_identifier: Optional[Identifier] = None,
    environment_identifier: Optional[Identifier] = None,
    status: Optional[ExperimentDefinitionStatus] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[NextToken] = None,
) -> ExperimentDefinitions

Lists the experiment definitions for an account. You can filter results by application, configuration profile, environment, or status.

Parameters:

  • application_identifier (Optional[Identifier], default: None ) –

    The application ID or name to filter results.

  • configuration_profile_identifier (Optional[Identifier], default: None ) –

    The configuration profile ID or name to filter results.

  • environment_identifier (Optional[Identifier], default: None ) –

    The environment ID or name to filter results.

  • status (Optional[ExperimentDefinitionStatus], default: None ) –

    A filter for the experiment definition status.

  • max_results (Optional[MaxResults], default: None ) –

    The maximum number of items to return for this call.

  • next_token (Optional[NextToken], default: None ) –

    A token to start the list from a previously truncated response.

Raises:

Examples:

To list experiment definitions The following ListExperimentDefinitions example lists the experiment definitions for an application.

>>> client.list_experiment_definitions(application_identifier='339ohji')
Source code in docs_src/capo_appconfig/_services/app_config.py
def list_experiment_definitions(
    self,
    *,
    config_overrides: Optional[AppConfigClientConfig] = None,
    application_identifier: Optional[
        "capo_appconfig.types.identifier.Identifier"
    ] = None,
    configuration_profile_identifier: Optional[
        "capo_appconfig.types.identifier.Identifier"
    ] = None,
    environment_identifier: Optional[
        "capo_appconfig.types.identifier.Identifier"
    ] = None,
    status: Optional[
        "capo_appconfig.types.experiment_definition_status.ExperimentDefinitionStatus"
    ] = None,
    max_results: Optional["capo_appconfig.types.max_results.MaxResults"] = None,
    next_token: Optional["capo_appconfig.types.next_token.NextToken"] = None,
) -> "capo_appconfig.types.experiment_definitions.ExperimentDefinitions":
    """<p>Lists the experiment definitions for an account. You can filter results by application, configuration profile, environment, or status.</p>

    Args:
        application_identifier: <p>The application ID or name to filter results.</p>
        configuration_profile_identifier: <p>The configuration profile ID or name to filter results.</p>
        environment_identifier: <p>The environment ID or name to filter results.</p>
        status: <p>A filter for the experiment definition status.</p>
        max_results: <p>The maximum number of items to return for this call.</p>
        next_token: <p>A token to start the list from a previously truncated response.</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 list experiment definitions
        The following ListExperimentDefinitions example lists the experiment definitions for an application.

        >>> client.list_experiment_definitions(application_identifier='339ohji')
    """

    def _handler(
        req: "OperationRequest[capo_appconfig.types.list_experiment_definitions_request.ListExperimentDefinitionsRequest]",
    ) -> OperationResponse[
        "capo_appconfig.types.experiment_definitions.ExperimentDefinitions"
    ]:
        import capo_appconfig._operations.amazon_app_config.list_experiment_definitions

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListExperimentDefinitions")
    )
    input_: capo_appconfig.types.list_experiment_definitions_request.ListExperimentDefinitionsRequest = {}
    if application_identifier is not None:
        input_["application_identifier"] = application_identifier
    if configuration_profile_identifier is not None:
        input_["configuration_profile_identifier"] = (
            configuration_profile_identifier
        )
    if environment_identifier is not None:
        input_["environment_identifier"] = environment_identifier
    if status is not None:
        input_["status"] = status
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

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