Skip to content

delete_expression async

delete_expression(
    domain_name: DomainName,
    expression_name: StandardName,
    *,
    config_overrides: Optional[AsyncCloudSearchClientConfig] = None,
) -> DeleteExpressionResponse

Removes an Expression from the search domain. For more information, see Configuring Expressions in the Amazon CloudSearch Developer Guide.

Parameters:

Raises:

Source code in docs_src/capo_cloudsearch/_services/async_cloud_search.py
async def delete_expression(
    self,
    domain_name: "capo_cloudsearch.types.domain_name.DomainName",
    expression_name: "capo_cloudsearch.types.standard_name.StandardName",
    *,
    config_overrides: Optional[AsyncCloudSearchClientConfig] = None,
) -> "capo_cloudsearch.types.delete_expression_response.DeleteExpressionResponse":
    """<p>Removes an <code><a>Expression</a></code> from the search domain. For more information, see <a href="http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-expressions.html" target="_blank">Configuring Expressions</a> in the <i>Amazon CloudSearch Developer Guide</i>.</p>

    Args:
        expression_name: <p>The name of the <code><a>Expression</a></code> to delete.</p>

    Raises:
        capo_cloudsearch.errors.base_exception.BaseException: <p>An error occurred while processing the request.</p>
        capo_cloudsearch.errors.internal_exception.InternalException: <p>An internal error occurred while processing the request. If this problem persists, report an issue from the <a href="http://status.aws.amazon.com/" target="_blank">Service Health Dashboard</a>.</p>
        capo_cloudsearch.errors.invalid_type_exception.InvalidTypeException: <p>The request was rejected because it specified an invalid type definition.</p>
        capo_cloudsearch.errors.resource_not_found_exception.ResourceNotFoundException: <p>The request was rejected because it attempted to reference a resource that does not exist.</p>
        capo_cloudsearch.errors.validation_exception.ValidationException: <p>The request was rejected because it has invalid parameters.</p>
        capo_cloudsearch.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_cloudsearch.types.delete_expression_request.DeleteExpressionRequest]",
    ) -> AsyncOperationResponse[
        "capo_cloudsearch.types.delete_expression_response.DeleteExpressionResponse"
    ]:
        import capo_cloudsearch._operations.a9_search_cloud_config_service2013.delete_expression

        (
            output,
            http_response,
        ) = await capo_cloudsearch._operations.a9_search_cloud_config_service2013.delete_expression.async_delete_expression(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteExpression")
    )
    input_: capo_cloudsearch.types.delete_expression_request.DeleteExpressionRequest = {
        "domain_name": domain_name,
        "expression_name": expression_name,
    }

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