Skip to content

list_partner_event_sources

list_partner_event_sources(
    name_prefix: PartnerEventSourceNamePrefix,
    *,
    config_overrides: Optional[EventBridgeClientConfig] = None,
    next_token: Optional[NextToken] = None,
    limit: Optional[LimitMax100] = None,
) -> ListPartnerEventSourcesResponse

An SaaS partner can use this operation to list all the partner event source names that they have created. This operation is not used by Amazon Web Services customers.

Parameters:

  • name_prefix (PartnerEventSourceNamePrefix) –

    If you specify this, the results are limited to only those partner event sources that start with the string you specify.

  • next_token (Optional[NextToken], default: None ) –

    The token returned by a previous call, which you can use to retrieve the next set of results.

    The value of nextToken is a unique pagination token for each page. To retrieve the next page of results, make the call again using the returned token. Keep all other arguments unchanged.

    Using an expired pagination token results in an HTTP 400 InvalidToken error.

  • limit (Optional[LimitMax100], default: None ) –

    pecifying this limits the number of results returned by this operation. The operation also returns a NextToken which you can use in a subsequent operation to retrieve the next set of results.

Raises:

Source code in docs_src/capo_eventbridge/_services/event_bridge.py
def list_partner_event_sources(
    self,
    name_prefix: "capo_eventbridge.types.partner_event_source_name_prefix.PartnerEventSourceNamePrefix",
    *,
    config_overrides: Optional[EventBridgeClientConfig] = None,
    next_token: Optional["capo_eventbridge.types.next_token.NextToken"] = None,
    limit: Optional["capo_eventbridge.types.limit_max100.LimitMax100"] = None,
) -> "capo_eventbridge.types.list_partner_event_sources_response.ListPartnerEventSourcesResponse":
    """<p>An SaaS partner can use this operation to list all the partner event source names that they have created. This operation is not used by Amazon Web Services customers.</p>

    Args:
        name_prefix: <p>If you specify this, the results are limited to only those partner event sources that start with the string you specify.</p>
        next_token: <p>The token returned by a previous call, which you can use to retrieve the next set of results.</p> <p>The value of <code>nextToken</code> is a unique pagination token for each page. To retrieve the next page of results, make the call again using the returned token. Keep all other arguments unchanged.</p> <p> Using an expired pagination token results in an <code>HTTP 400 InvalidToken</code> error.</p>
        limit: <p>pecifying this limits the number of results returned by this operation. The operation also returns a NextToken which you can use in a subsequent operation to retrieve the next set of results.</p>

    Raises:
        capo_eventbridge.errors.internal_exception.InternalException: <p>This exception occurs due to unexpected causes.</p>
        capo_eventbridge.errors.operation_disabled_exception.OperationDisabledException: <p>The operation you are attempting is not available in this region.</p>
        capo_eventbridge.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_eventbridge.types.list_partner_event_sources_request.ListPartnerEventSourcesRequest]",
    ) -> OperationResponse[
        "capo_eventbridge.types.list_partner_event_sources_response.ListPartnerEventSourcesResponse"
    ]:
        import capo_eventbridge._operations.aws_events.list_partner_event_sources

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListPartnerEventSources")
    )
    input_: capo_eventbridge.types.list_partner_event_sources_request.ListPartnerEventSourcesRequest = {
        "name_prefix": name_prefix
    }
    if next_token is not None:
        input_["next_token"] = next_token
    if limit is not None:
        input_["limit"] = limit

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