Class MaterialOperations
java.lang.Object
co.ankatech.ankasecure.keymanagement.MaterialOperations
The material versions of a key: every version the key has had, with its status, and the revocation
of one version. Obtained from
AuthenticatedKeyManagementSdk.materials(). Destroying a version
is a request (AuthenticatedKeyManagementSdk.destruction()), never a direct operation.
List<MaterialVersionResponse> versions = sdk.materials().list("payments-signing-key");
-
Method Summary
Modifier and TypeMethodDescriptionReads one material version (GET /tenants/{t}/keys/{stableKid}/materials/{version}).Lists a key's material versions (GET /tenants/{t}/keys/{stableKid}/materials).revoke(String stableKid, int version, MaterialRevokeRequest request) Revokes one material version (POST /tenants/{t}/keys/{stableKid}/materials/{version}/revoke).
-
Method Details
-
list
Lists a key's material versions (GET /tenants/{t}/keys/{stableKid}/materials).- Parameters:
stableKid- the key's stable identifier; must not benull- Returns:
- every version, newest first
- Throws:
KeyManagementSdkException- when the call is refused
-
get
Reads one material version (GET /tenants/{t}/keys/{stableKid}/materials/{version}).- Parameters:
stableKid- the key's stable identifier; must not benullversion- the version number- Returns:
- the version
- Throws:
KeyManagementSdkException- when the version does not exist (404) or the call is refused
-
revoke
Revokes one material version (POST /tenants/{t}/keys/{stableKid}/materials/{version}/revoke).- Parameters:
stableKid- the key's stable identifier; must not benullversion- the version numberrequest- the revocation cause and reason; must not benull- Returns:
- the revoked version
- Throws:
KeyManagementSdkException- when the call is refused
-