Class QuorumApprovalPendingException

All Implemented Interfaces:
Serializable

public class QuorumApprovalPendingException extends KeyManagementSdkException
The operation was not performed: the tenant's quorum policy gates it, so the Admin API recorded a quorum request instead and answered 202 Accepted.

Thrown by an operation that is gated only when the tenant's quorum policy enables it: a key metadata update that weakens the key, or a rotation. The request waits until QuorumRequestReceipt.requiredApprovals() people other than the requester approve it in the Admin Console, and then the Admin API runs the operation exactly as this call would have run it. One rejection, the requester's cancellation or the expiry ends it without running. A destruction request is always gated, so it never throws this: it returns the QuorumRequestReceipt itself.


 try {
     sdk.keys().update("payments-signing-key", update);
 } catch (QuorumApprovalPendingException pending) {
     log.info("Waiting for {} approvals: request {}", pending.getReceipt().requiredApprovals(),
             pending.getReceipt().requestId());
 }
 
See Also:
  • Field Details

    • STATUS

      public static final int STATUS
      HTTP status of the answer that carries a quorum request.
      See Also:
  • Constructor Details

    • QuorumApprovalPendingException

      public QuorumApprovalPendingException(QuorumRequestReceipt receipt)
      Creates the exception from the quorum request the Admin API answered with. Its message names the request id and the operation as TerminalSafe.text(String) renders them.
      Parameters:
      receipt - the quorum request; must not be null
  • Method Details

    • getReceipt

      public QuorumRequestReceipt getReceipt()
      Returns:
      the quorum request the operation now waits on
    • getRequestId

      public String getRequestId()
      The request id is a UUID: the SDK refuses a quorum answer whose id is not one. A caller that displays the receipt's other members renders them through TerminalSafe.text(String).
      Returns:
      the quorum request id, the value quorumRequests().get(...) and quorumRequests().cancel(...) take