Skip to content

delete_event_source_mapping async

delete_event_source_mapping(
    uuid: UUIDString, *, config_overrides: Optional[AsyncLambdaClientConfig] = None
) -> EventSourceMappingConfiguration

Deletes an event source mapping. You can get the identifier of a mapping from the output of ListEventSourceMappings.

When you delete an event source mapping, it enters a Deleting state and might not be completely deleted for several seconds.

Parameters:

  • uuid (UUIDString) –

    The identifier of the event source mapping.

Raises:

Examples:

To delete a Lambda function event source mapping The following example deletes an event source mapping. To get a mapping's UUID, use ListEventSourceMappings.

>>> await client.delete_event_source_mapping(uuid='14e0db71-xmpl-4eb5-b481-8945cf9d10c2')
Source code in docs_src/capo_lambda/_services/async__lambda.py
async def delete_event_source_mapping(
    self,
    uuid: "capo_lambda.types.uuid_string.UUIDString",
    *,
    config_overrides: Optional[AsyncLambdaClientConfig] = None,
) -> "capo_lambda.types.event_source_mapping_configuration.EventSourceMappingConfiguration":
    """<p>Deletes an <a href="https://docs.aws.amazon.com/lambda/latest/dg/intro-invocation-modes.html">event source mapping</a>. You can get the identifier of a mapping from the output of <a>ListEventSourceMappings</a>.</p> <p>When you delete an event source mapping, it enters a <code>Deleting</code> state and might not be completely deleted for several seconds.</p>

    Args:
        uuid: <p>The identifier of the event source mapping.</p>

    Raises:
        capo_lambda.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One of the parameters in the request is not valid.</p>
        capo_lambda.errors.resource_conflict_exception.ResourceConflictException: <p>The resource already exists, or another operation is in progress.</p>
        capo_lambda.errors.resource_in_use_exception.ResourceInUseException: <p>The operation conflicts with the resource's availability. For example, you tried to update an event source mapping in the CREATING state, or you tried to delete an event source mapping currently UPDATING.</p>
        capo_lambda.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
        capo_lambda.errors.service_exception.ServiceException: <p>The Lambda service encountered an internal error.</p>
        capo_lambda.errors.too_many_requests_exception.TooManyRequestsException: <p>The request throughput limit was exceeded. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html#api-requests">Lambda quotas</a>.</p>
        capo_lambda.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        To delete a Lambda function event source mapping
        The following example deletes an event source mapping. To get a mapping's UUID, use ListEventSourceMappings.

        >>> await client.delete_event_source_mapping(uuid='14e0db71-xmpl-4eb5-b481-8945cf9d10c2')
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_lambda.types.delete_event_source_mapping_request.DeleteEventSourceMappingRequest]",
    ) -> AsyncOperationResponse[
        "capo_lambda.types.event_source_mapping_configuration.EventSourceMappingConfiguration"
    ]:
        import capo_lambda._operations.aws_gir_api_service.delete_event_source_mapping

        (
            output,
            http_response,
        ) = await capo_lambda._operations.aws_gir_api_service.delete_event_source_mapping.async_delete_event_source_mapping(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteEventSourceMapping")
    )
    input_: capo_lambda.types.delete_event_source_mapping_request.DeleteEventSourceMappingRequest = {
        "uuid": uuid
    }

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