Class PatchKeySpec

Object
PatchKeySpec

public final class PatchKeySpec extends Object
Specification for updating mutable key attributes via JSON Merge-Patch.

Only the following fields are supported:

  • expiresAt – new expiry timestamp (RFC 3339)
  • softLimitExpiration – new soft-limit expiry (RFC 3339)
  • softUsageLimit – new soft usage cap
  • maxUsageLimit – new hard usage cap

Any field left null will be omitted from the patch.

Usage example


 PatchKeySpec patch = new PatchKeySpec.Builder()
     .expiresAt(Instant.parse("2030-05-31T23:59:59Z"))
     .softLimitExpiration(Instant.parse("2029-12-31T23:59:59Z"))
     .softUsageLimit(40_000)
     .maxUsageLimit(50_000)
     .build();

 sdk.patchKey("my_MLKEM_Key", patch);
 
  • Method Details

    • getExpiresAt

      public Instant getExpiresAt()
    • getSoftLimitExpiration

      public Instant getSoftLimitExpiration()
    • getSoftUsageLimit

      public Integer getSoftUsageLimit()
    • getMaxUsageLimit

      public Integer getMaxUsageLimit()
    • toMergePatch

      public Map<String,Object> toMergePatch()
      Converts non-null fields into a JSON Merge-Patch document.