Class VaultMetadataResponse

java.lang.Object
org.springframework.vault.support.VaultMetadataResponse

public class VaultMetadataResponse extends Object
Value object to bind Vault HTTP kv read metadata API responses.
Since:
2.3
Author:
Zakaria Amine, Jeroen Willemsen
  • Method Details

    • builder

    • isCasRequired

      public boolean isCasRequired()
      Returns:
      whether compare-and-swap is required (i.e. optimistic locking).
    • getCreatedTime

      public Instant getCreatedTime()
      Returns:
      the metadata creation time
    • getCurrentVersion

      public int getCurrentVersion()
      Returns:
      the active secret version
    • getDeleteVersionAfter

      @Nullable public Duration getDeleteVersionAfter()
      Returns:
      the duration after which a secret is to be deleted. Period.ZERO for unlimited duration. Versions prior to Vault 1.2 may return null.
    • getCustomMetadata

      public Map<String,String> getCustomMetadata()
      Returns:
      the custom metadata. Entries can be any arbitrary key-value pairs
      Since:
      3.1
    • getMaxVersions

      public int getMaxVersions()
      Returns:
      max secret versions accepted by this key
    • getOldestVersion

      public int getOldestVersion()
      Returns:
      oldest key version
    • getUpdatedTime

      public Instant getUpdatedTime()
      Returns:
      the metadata update time
    • getVersions

      public List<Versioned.Metadata> getVersions()
      Follows the following format. "versions": { "1": { "created_time": "2020-05-18T12:23:09.895587932Z", "deletion_time": "2020-05-18T12:31:00.66257744Z", "destroyed": false }, "2": { "created_time": "2020-05-18T12:23:10.122081788Z", "deletion_time": "", "destroyed": false } }
      Returns:
      the key versions and their details