Package org.springframework.vault.core
Interface VaultKeyValueOperations
- All Superinterfaces:
VaultKeyValueOperationsSupport
Interface that specifies a basic set of Vault operations using Vault's Key/Value secret
backend. Paths used in this operations interface are relative and outgoing requests
prepend paths with the according operation-specific prefix.
This API supports both, versioned and unversioned key-value backends. Versioned usage
is limited as updates requiring compare-and-set (CAS) are not possible. Use
VaultVersionedKeyValueOperations
in such cases instead.- Since:
- 2.1
- Author:
- Mark Paluch, Younghwan Jang
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.vault.core.VaultKeyValueOperationsSupport
VaultKeyValueOperationsSupport.KeyValueBackend
-
Method Summary
Modifier and TypeMethodDescriptionRead the secret atpath
.<T> VaultResponseSupport<T>
Read the secret atpath
.boolean
Update the secret atpath
without removing the existing secrets.void
Write the secret atpath
.Methods inherited from interface org.springframework.vault.core.VaultKeyValueOperationsSupport
delete, getApiVersion, list
-
Method Details
-
get
Read the secret atpath
.- Specified by:
get
in interfaceVaultKeyValueOperationsSupport
- Parameters:
path
- must not be null.- Returns:
- the data. May be null if the path does not exist.
-
get
Read the secret atpath
.- Parameters:
path
- must not be null.responseType
- must not be null.- Returns:
- the data. May be null if the path does not exist.
-
patch
Update the secret atpath
without removing the existing secrets. Requires a Key-Value version 2 mount to ensure an atomic update.- Parameters:
path
- must not be null.patch
- must not be null.- Returns:
true
if the patch operation is successful,false
otherwise.- Since:
- 2.3
-
put
Write the secret atpath
.- Parameters:
path
- must not be null.body
- must not be null.
-