Skip to content

get_event_source_mapping async

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

Returns details about an event source mapping. You can get the identifier of a mapping from the output of ListEventSourceMappings.

Parameters:

  • uuid (UUIDString) –

    The identifier of the event source mapping.

Raises:

Examples:

To get a Lambda function's event source mapping The following example returns details about an event source mapping. To get a mapping's UUID, use ListEventSourceMappings.

>>> await client.get_event_source_mapping(uuid='14e0db71-xmpl-4eb5-b481-8945cf9d10c2')
Source code in docs_src/capo_lambda/_services/async__lambda.py
async def get_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>Returns details about an event source mapping. You can get the identifier of a mapping from the output of <a>ListEventSourceMappings</a>.</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_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 get a Lambda function's event source mapping
        The following example returns details about an event source mapping. To get a mapping's UUID, use ListEventSourceMappings.

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

    async def _handler(
        req: "AsyncOperationRequest[capo_lambda.types.get_event_source_mapping_request.GetEventSourceMappingRequest]",
    ) -> AsyncOperationResponse[
        "capo_lambda.types.event_source_mapping_configuration.EventSourceMappingConfiguration"
    ]:
        import capo_lambda._operations.aws_gir_api_service.get_event_source_mapping

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetEventSourceMapping")
    )
    input_: capo_lambda.types.get_event_source_mapping_request.GetEventSourceMappingRequest = {
        "uuid": uuid
    }

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