Skip to content

delete_experiment_definition async

delete_experiment_definition(
    application_identifier: Identifier,
    experiment_definition_identifier: Identifier,
    *,
    config_overrides: Optional[AsyncAppConfigClientConfig] = None,
    delete_type: Optional[DeleteType] = None,
) -> None

Deletes an experiment definition. You can archive the definition to hide it from the active list while preserving it for future reference, or permanently delete it along with all associated run history.

Parameters:

  • application_identifier (Identifier) –

    The application ID or name.

  • experiment_definition_identifier (Identifier) –

    The experiment definition ID or name.

  • delete_type (Optional[DeleteType], default: None ) –

    The type of deletion to perform. Valid values include archive (hide but preserve) and permanent (delete permanently).

Raises:

Examples:

To delete an experiment definition The following DeleteExperimentDefinition example archives (soft-deletes) the specified experiment definition.

>>> await client.delete_experiment_definition(application_identifier='339ohji', experiment_definition_identifier='bsxyd7k')
Source code in docs_src/capo_appconfig/_services/async_app_config.py
async def delete_experiment_definition(
    self,
    application_identifier: "capo_appconfig.types.identifier.Identifier",
    experiment_definition_identifier: "capo_appconfig.types.identifier.Identifier",
    *,
    config_overrides: Optional[AsyncAppConfigClientConfig] = None,
    delete_type: Optional["capo_appconfig.types.delete_type.DeleteType"] = None,
) -> None:
    """<p>Deletes an experiment definition. You can archive the definition to hide it from the active list while preserving it for future reference, or permanently delete it along with all associated run history.</p>

    Args:
        application_identifier: <p>The application ID or name.</p>
        experiment_definition_identifier: <p>The experiment definition ID or name.</p>
        delete_type: <p>The type of deletion to perform. Valid values include archive (hide but preserve) and permanent (delete permanently).</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.conflict_exception.ConflictException: <p>The request could not be processed because of conflict in the current state of the resource.</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 delete an experiment definition
        The following DeleteExperimentDefinition example archives (soft-deletes) the specified experiment definition.

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

    async def _handler(
        req: "AsyncOperationRequest[capo_appconfig.types.delete_experiment_definition_request.DeleteExperimentDefinitionRequest]",
    ) -> AsyncOperationResponse[None]:
        import capo_appconfig._operations.amazon_app_config.delete_experiment_definition

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteExperimentDefinition")
    )
    input_: capo_appconfig.types.delete_experiment_definition_request.DeleteExperimentDefinitionRequest = {
        "application_identifier": application_identifier,
        "experiment_definition_identifier": experiment_definition_identifier,
    }
    if delete_type is not None:
        input_["delete_type"] = delete_type

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