Skip to content

describe_event_source async

describe_event_source(
    event_source_arn: EventSourceArn,
    *,
    config_overrides: Optional[AsyncEventBridgeV2ClientConfig] = None,
) -> DescribeEventSourceResponse

Returns the full configuration and lifecycle state of an EventSource.

Raises:

  • AccessDeniedException –

    The caller does not have the permissions required to perform the operation. This error is also returned when the operation cannot use the AWS KMS key for the event bus.

  • InternalException –

    The request failed because of an internal service error. Retry the request.

  • InvalidInputException –

    A request parameter is missing or not valid.

  • ThrottlingException –

    The request was throttled because it exceeds a request rate limit. Retry the request with backoff.

  • ResourceNotFoundException –

    The resource does not exist.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_eventbridgev2/_services/async_event_bridge_v2.py
async def describe_event_source(
    self,
    event_source_arn: "capo_eventbridgev2.types.event_source_arn.EventSourceArn",
    *,
    config_overrides: Optional[AsyncEventBridgeV2ClientConfig] = None,
) -> "capo_eventbridgev2.types.describe_event_source_response.DescribeEventSourceResponse":
    """Returns the full configuration and lifecycle state of an EventSource.

    Raises:
        capo_eventbridgev2.errors.access_denied_exception.AccessDeniedException: The caller does not have the permissions required to perform the operation. This error is also returned when the operation cannot use the AWS KMS key for the event bus.
        capo_eventbridgev2.errors.internal_exception.InternalException: The request failed because of an internal service error. Retry the request.
        capo_eventbridgev2.errors.invalid_input_exception.InvalidInputException: A request parameter is missing or not valid.
        capo_eventbridgev2.errors.throttling_exception.ThrottlingException: The request was throttled because it exceeds a request rate limit. Retry the request with backoff.
        capo_eventbridgev2.errors.resource_not_found_exception.ResourceNotFoundException: The resource does not exist.
        capo_eventbridgev2.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_eventbridgev2.types.describe_event_source_request.DescribeEventSourceRequest]",
    ) -> AsyncOperationResponse[
        "capo_eventbridgev2.types.describe_event_source_response.DescribeEventSourceResponse"
    ]:
        import capo_eventbridgev2._operations.aws_events_v2.describe_event_source

        (
            output,
            http_response,
        ) = await capo_eventbridgev2._operations.aws_events_v2.describe_event_source.async_describe_event_source(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_eventbridgev2.types.describe_event_source_response.DescribeEventSourceResponse",
    ) -> dict[str, Any]:
        import capo_eventbridgev2.types.describe_event_source_response

        return capo_eventbridgev2.types.describe_event_source_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("DescribeEventSource", redact_output=_redact_output),
    )
    input_: capo_eventbridgev2.types.describe_event_source_request.DescribeEventSourceRequest = {
        "event_source_arn": event_source_arn
    }

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