Skip to content

update_connection_preferences async

update_connection_preferences(
    catalog: Catalog,
    revision: Revision,
    access_type: AccessType,
    *,
    config_overrides: Optional[AsyncPartnerCentralAccountClientConfig] = None,
    excluded_participant_identifiers: Optional[ParticipantIdentifierList] = None,
) -> UpdateConnectionPreferencesResponse

Updates the connection preferences for a partner account, modifying access settings and exclusions.

Parameters:

  • catalog (Catalog) –

    The catalog identifier for the partner account.

  • revision (Revision) –

    The revision number of the connection preferences for optimistic locking.

  • access_type (AccessType) –

    The access type setting for connections (e.g., open, restricted, invitation-only).

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

    The updated list of participant identifiers to exclude from connections.

Raises:

  • AccessDeniedException –

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

  • ConflictException –

    The request could not be completed due to a conflict with the current state of the resource. This typically occurs when trying to create a resource that already exists or modify a resource that has been changed by another process.

  • 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 update_connection_preferences(
    self,
    catalog: "capo_partnercentral_account.types.catalog.Catalog",
    revision: "capo_partnercentral_account.types.revision.Revision",
    access_type: "capo_partnercentral_account.types.access_type.AccessType",
    *,
    config_overrides: Optional[AsyncPartnerCentralAccountClientConfig] = None,
    excluded_participant_identifiers: Optional[
        "capo_partnercentral_account.types.participant_identifier_list.ParticipantIdentifierList"
    ] = None,
) -> "capo_partnercentral_account.types.update_connection_preferences_response.UpdateConnectionPreferencesResponse":
    """<p>Updates the connection preferences for a partner account, modifying access settings and exclusions.</p>

    Args:
        catalog: <p>The catalog identifier for the partner account.</p>
        revision: <p>The revision number of the connection preferences for optimistic locking.</p>
        access_type: <p>The access type setting for connections (e.g., open, restricted, invitation-only).</p>
        excluded_participant_identifiers: <p>The updated list of participant identifiers to exclude from connections.</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.conflict_exception.ConflictException: <p>The request could not be completed due to a conflict with the current state of the resource. This typically occurs when trying to create a resource that already exists or modify a resource that has been changed by another process.</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.update_connection_preferences_request.UpdateConnectionPreferencesRequest]",
    ) -> AsyncOperationResponse[
        "capo_partnercentral_account.types.update_connection_preferences_response.UpdateConnectionPreferencesResponse"
    ]:
        import capo_partnercentral_account._operations.partner_central_account.update_connection_preferences

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateConnectionPreferences")
    )
    input_: capo_partnercentral_account.types.update_connection_preferences_request.UpdateConnectionPreferencesRequest = {
        "catalog": catalog,
        "revision": revision,
        "access_type": access_type,
    }
    if excluded_participant_identifiers is not None:
        input_["excluded_participant_identifiers"] = (
            excluded_participant_identifiers
        )

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