Skip to content

list_partners

list_partners(
    catalog: Catalog,
    *,
    config_overrides: Optional[PartnerCentralAccountClientConfig] = None,
    next_token: Optional[NextToken] = None,
) -> ListPartnersResponse

Lists partner accounts in the catalog, providing a summary view of all partners.

Parameters:

  • catalog (Catalog) –

    The catalog identifier to list partners from.

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

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

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/partner_central_account.py
def list_partners(
    self,
    catalog: "capo_partnercentral_account.types.catalog.Catalog",
    *,
    config_overrides: Optional[PartnerCentralAccountClientConfig] = None,
    next_token: Optional[
        "capo_partnercentral_account.types.next_token.NextToken"
    ] = None,
) -> (
    "capo_partnercentral_account.types.list_partners_response.ListPartnersResponse"
):
    """<p>Lists partner accounts in the catalog, providing a summary view of all partners.</p>

    Args:
        catalog: <p>The catalog identifier to list partners from.</p>
        next_token: <p>The token for retrieving the next page of results in paginated responses.</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.
    """

    def _handler(
        req: "OperationRequest[capo_partnercentral_account.types.list_partners_request.ListPartnersRequest]",
    ) -> OperationResponse[
        "capo_partnercentral_account.types.list_partners_response.ListPartnersResponse"
    ]:
        import capo_partnercentral_account._operations.partner_central_account.list_partners

        output, http_response = (
            capo_partnercentral_account._operations.partner_central_account.list_partners.list_partners(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_partnercentral_account.types.list_partners_response.ListPartnersResponse",
    ) -> dict[str, Any]:
        import capo_partnercentral_account.types.list_partners_response

        return capo_partnercentral_account.types.list_partners_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("ListPartners", redact_output=_redact_output),
    )
    input_: capo_partnercentral_account.types.list_partners_request.ListPartnersRequest = {
        "catalog": catalog
    }
    if next_token is not None:
        input_["next_token"] = next_token

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