Class QuorumRequestOperations
java.lang.Object
co.ankatech.ankasecure.keymanagement.QuorumRequestOperations
The workload's own quorum requests: the destruction requests and gated key changes it made. Obtained
from
AuthenticatedKeyManagementSdk.quorumRequests().
The Admin API shows a workload only the requests it made for key management operations; any other request answers 404 to it. A request is approved or rejected by people in the Admin Console; this SDK can read it and withdraw it while it waits, never decide it.
QuorumRequestResponse request = sdk.quorumRequests().get(receipt.requestId());
if ("PENDING".equals(request.getStatus())) {
sdk.quorumRequests().cancel(UUID.fromString(receipt.requestId()));
}
-
Method Summary
Modifier and TypeMethodDescriptionWithdraws one of the workload's waiting quorum requests (POST /tenants/{t}/quorum/requests/{id}/cancel).Reads one of the workload's quorum requests by the id aQuorumRequestReceiptcarries.Reads one of the workload's quorum requests (GET /tenants/{t}/quorum/requests/{id}).list(QuorumRequestListQuery query) Lists the workload's quorum requests (GET /tenants/{t}/quorum/requests).
-
Method Details
-
list
Lists the workload's quorum requests (GET /tenants/{t}/quorum/requests).- Parameters:
query- the filters and page; must not benull- Returns:
- one page of requests
- Throws:
KeyManagementSdkException- when the call is refused
-
get
Reads one of the workload's quorum requests (GET /tenants/{t}/quorum/requests/{id}).- Parameters:
requestId- the request id; must not benull- Returns:
- the request, with its status, approvals and decisions
- Throws:
KeyManagementSdkException- when the request is not one of the workload's (404) or the call is refused
-
get
Reads one of the workload's quorum requests by the id aQuorumRequestReceiptcarries.- Parameters:
requestId- the request id, a UUID; must not benull- Returns:
- the request
- Throws:
IllegalArgumentException- whenrequestIdis not a UUIDKeyManagementSdkException- when the call is refused
-
cancel
Withdraws one of the workload's waiting quorum requests (POST /tenants/{t}/quorum/requests/{id}/cancel). Only the requester can withdraw a request, and only while it waits.- Parameters:
requestId- the request id; must not benull- Returns:
- the cancelled request
- Throws:
KeyManagementSdkException- when the request has already been decided (409) or the call is refused
-