Skip to content

list_connections async

list_connections(
    catalog: Catalog,
    *,
    config_overrides: Optional[AsyncPartnerCentralAccountClientConfig] = None,
    next_token: Optional[NextToken] = None,
    connection_type: Optional[ConnectionTypeFilter] = None,
    max_results: Optional[MaxResults] = None,
    other_participant_identifiers: Optional[ParticipantIdentifierList] = None,
) -> ListConnectionsResponse

Lists active connections for the partner account, with optional filtering by connection type and participant.

Parameters:

  • catalog (Catalog) –

    The catalog identifier for the partner account.

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

    The token for retrieving the next page of results in paginated responses.

  • connection_type (Optional[ConnectionTypeFilter], default: None ) –

    Filter results by connection type (e.g., reseller, distributor, technology partner).

  • max_results (Optional[MaxResults], default: None ) –

    The maximum number of connections to return in a single response.

  • other_participant_identifiers (Optional[ParticipantIdentifierList], default: None ) –

    Filter results by specific participant identifiers.

Raises:

  • AccessDeniedException –

    The request was denied due to insufficient permissions. The caller does not have the required permissions to perform this operation.

  • InternalServerException –

    An internal server error occurred while processing the request. This is typically a temporary condition and the request may be retried.

  • ThrottlingException –

    The request was throttled due to too many requests being sent in a short period of time. The client should implement exponential backoff and retry the request.

  • ValidationException –

    The request failed validation. One or more input parameters are invalid, missing, or do not meet the required format or constraints.

  • UnknownServiceError –

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

Source code in docs_src/capo_partnercentral_account/_services/async_partner_central_account.py
async def list_connections(
    self,
    catalog: "capo_partnercentral_account.types.catalog.Catalog",
    *,
    config_overrides: Optional[AsyncPartnerCentralAccountClientConfig] = None,
    next_token: Optional[
        "capo_partnercentral_account.types.next_token.NextToken"
    ] = None,
    connection_type: Optional[
        "capo_partnercentral_account.types.connection_type_filter.ConnectionTypeFilter"
    ] = None,
    max_results: Optional[
        "capo_partnercentral_account.types.max_results.MaxResults"
    ] = None,
    other_participant_identifiers: Optional[
        "capo_partnercentral_account.types.participant_identifier_list.ParticipantIdentifierList"
    ] = None,
) -> "capo_partnercentral_account.types.list_connections_response.ListConnectionsResponse":
    """<p>Lists active connections for the partner account, with optional filtering by connection type and participant.</p>

    Args:
        catalog: <p>The catalog identifier for the partner account.</p>
        next_token: <p>The token for retrieving the next page of results in paginated responses.</p>
        connection_type: <p>Filter results by connection type (e.g., reseller, distributor, technology partner).</p>
        max_results: <p>The maximum number of connections to return in a single response.</p>
        other_participant_identifiers: <p>Filter results by specific participant identifiers.</p>

    Raises:
        capo_partnercentral_account.errors.access_denied_exception.AccessDeniedException: <p>The request was denied due to insufficient permissions. The caller does not have the required permissions to perform this operation.</p>
        capo_partnercentral_account.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred while processing the request. This is typically a temporary condition and the request may be retried.</p>
        capo_partnercentral_account.errors.throttling_exception.ThrottlingException: <p>The request was throttled due to too many requests being sent in a short period of time. The client should implement exponential backoff and retry the request.</p>
        capo_partnercentral_account.errors.validation_exception.ValidationException: <p>The request failed validation. One or more input parameters are invalid, missing, or do not meet the required format or constraints.</p>
        capo_partnercentral_account.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_partnercentral_account.types.list_connections_request.ListConnectionsRequest]",
    ) -> AsyncOperationResponse[
        "capo_partnercentral_account.types.list_connections_response.ListConnectionsResponse"
    ]:
        import capo_partnercentral_account._operations.partner_central_account.list_connections

        (
            output,
            http_response,
        ) = await capo_partnercentral_account._operations.partner_central_account.list_connections.async_list_connections(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListConnections")
    )
    input_: capo_partnercentral_account.types.list_connections_request.ListConnectionsRequest = {
        "catalog": catalog
    }
    if next_token is not None:
        input_["next_token"] = next_token
    if connection_type is not None:
        input_["connection_type"] = connection_type
    if max_results is not None:
        input_["max_results"] = max_results
    if other_participant_identifiers is not None:
        input_["other_participant_identifiers"] = other_participant_identifiers

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