Skip to content

activate_event_source

activate_event_source(
    name: EventSourceName, *, config_overrides: Optional[EventBridgeClientConfig] = None
) -> None

Activates a partner event source that has been deactivated. Once activated, your matching event bus will start receiving events from the event source.

Parameters:

  • name (EventSourceName) –

    The name of the partner event source to activate.

Raises:

Source code in docs_src/capo_eventbridge/_services/event_bridge.py
def activate_event_source(
    self,
    name: "capo_eventbridge.types.event_source_name.EventSourceName",
    *,
    config_overrides: Optional[EventBridgeClientConfig] = None,
) -> None:
    """<p>Activates a partner event source that has been deactivated. Once activated, your matching event bus will start receiving events from the event source.</p>

    Args:
        name: <p>The name of the partner event source to activate.</p>

    Raises:
        capo_eventbridge.errors.concurrent_modification_exception.ConcurrentModificationException: <p>There is concurrent modification on a rule, target, archive, or replay.</p>
        capo_eventbridge.errors.internal_exception.InternalException: <p>This exception occurs due to unexpected causes.</p>
        capo_eventbridge.errors.invalid_state_exception.InvalidStateException: <p>The specified state is not a valid state for an event source.</p>
        capo_eventbridge.errors.operation_disabled_exception.OperationDisabledException: <p>The operation you are attempting is not available in this region.</p>
        capo_eventbridge.errors.resource_not_found_exception.ResourceNotFoundException: <p>An entity that you specified does not exist.</p>
        capo_eventbridge.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_eventbridge.types.activate_event_source_request.ActivateEventSourceRequest]",
    ) -> OperationResponse[None]:
        import capo_eventbridge._operations.aws_events.activate_event_source

        output, http_response = (
            capo_eventbridge._operations.aws_events.activate_event_source.activate_event_source(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ActivateEventSource")
    )
    input_: capo_eventbridge.types.activate_event_source_request.ActivateEventSourceRequest = {
        "name": name
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output