Skip to content

create_partner_event_source

create_partner_event_source(
    name: EventSourceName,
    account: AccountId,
    *,
    config_overrides: Optional[EventBridgeClientConfig] = None,
) -> CreatePartnerEventSourceResponse

Called by an SaaS partner to create a partner event source. This operation is not used by Amazon Web Services customers.

Each partner event source can be used by one Amazon Web Services account to create a matching partner event bus in that Amazon Web Services account. A SaaS partner must create one partner event source for each Amazon Web Services account that wants to receive those event types.

A partner event source creates events based on resources within the SaaS partner's service or application.

An Amazon Web Services account that creates a partner event bus that matches the partner event source can use that event bus to receive events from the partner, and then process them using Amazon Web Services Events rules and targets.

Partner event source names follow this format:

partner_name/event_namespace/event_name

  • partner_name is determined during partner registration, and identifies the partner to Amazon Web Services customers.

  • event_namespace is determined by the partner, and is a way for the partner to categorize their events.

  • event_name is determined by the partner, and should uniquely identify an event-generating resource within the partner system.

    The event_name must be unique across all Amazon Web Services customers. This is because the event source is a shared resource between the partner and customer accounts, and each partner event source unique in the partner account.

The combination of event_namespace and event_name should help Amazon Web Services customers decide whether to create an event bus to receive these events.

Parameters:

  • name (EventSourceName) –

    The name of the partner event source. This name must be unique and must be in the format partner_name/event_namespace/event_name . The Amazon Web Services account that wants to use this partner event source must create a partner event bus with a name that matches the name of the partner event source.

  • account (AccountId) –

    The Amazon Web Services account ID that is permitted to create a matching partner event bus for this partner event source.

Raises:

Source code in docs_src/capo_eventbridge/_services/event_bridge.py
def create_partner_event_source(
    self,
    name: "capo_eventbridge.types.event_source_name.EventSourceName",
    account: "capo_eventbridge.types.account_id.AccountId",
    *,
    config_overrides: Optional[EventBridgeClientConfig] = None,
) -> "capo_eventbridge.types.create_partner_event_source_response.CreatePartnerEventSourceResponse":
    """<p>Called by an SaaS partner to create a partner event source. This operation is not used by Amazon Web Services customers.</p> <p>Each partner event source can be used by one Amazon Web Services account to create a matching partner event bus in that Amazon Web Services account. A SaaS partner must create one partner event source for each Amazon Web Services account that wants to receive those event types. </p> <p>A partner event source creates events based on resources within the SaaS partner's service or application.</p> <p>An Amazon Web Services account that creates a partner event bus that matches the partner event source can use that event bus to receive events from the partner, and then process them using Amazon Web Services Events rules and targets.</p> <p>Partner event source names follow this format:</p> <p> <code> <i>partner_name</i>/<i>event_namespace</i>/<i>event_name</i> </code> </p> <ul> <li> <p> <i>partner_name</i> is determined during partner registration, and identifies the partner to Amazon Web Services customers. </p> </li> <li> <p> <i>event_namespace</i> is determined by the partner, and is a way for the partner to categorize their events.</p> </li> <li> <p> <i>event_name</i> is determined by the partner, and should uniquely identify an event-generating resource within the partner system. </p> <p>The <i>event_name</i> must be unique across all Amazon Web Services customers. This is because the event source is a shared resource between the partner and customer accounts, and each partner event source unique in the partner account.</p> </li> </ul> <p>The combination of <i>event_namespace</i> and <i>event_name</i> should help Amazon Web Services customers decide whether to create an event bus to receive these events.</p>

    Args:
        name: <p>The name of the partner event source. This name must be unique and must be in the format <code> <i>partner_name</i>/<i>event_namespace</i>/<i>event_name</i> </code>. The Amazon Web Services account that wants to use this partner event source must create a partner event bus with a name that matches the name of the partner event source.</p>
        account: <p>The Amazon Web Services account ID that is permitted to create a matching partner event bus for this partner event source.</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.limit_exceeded_exception.LimitExceededException: <p>The request failed because it attempted to create resource beyond the allowed service quota.</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_already_exists_exception.ResourceAlreadyExistsException: <p>The resource you are trying to create already exists.</p>
        capo_eventbridge.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_eventbridge.types.create_partner_event_source_request.CreatePartnerEventSourceRequest]",
    ) -> OperationResponse[
        "capo_eventbridge.types.create_partner_event_source_response.CreatePartnerEventSourceResponse"
    ]:
        import capo_eventbridge._operations.aws_events.create_partner_event_source

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreatePartnerEventSource")
    )
    input_: capo_eventbridge.types.create_partner_event_source_request.CreatePartnerEventSourceRequest = {
        "name": name,
        "account": account,
    }

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