public class VaultVersionedKeyValueTemplate extends Object implements VaultVersionedKeyValueOperations
VaultVersionedKeyValueOperations
.VaultKeyValueOperationsSupport.KeyValueBackend
Constructor and Description |
---|
VaultVersionedKeyValueTemplate(VaultOperations vaultOperations,
String path)
|
Modifier and Type | Method and Description |
---|---|
void |
delete(String path)
Delete the secret at
path . |
void |
delete(String path,
Versioned.Version... versionsToDelete)
Delete one or more
versions of the secret at path . |
void |
destroy(String path,
Versioned.Version... versionsToDelete)
Permanently remove the specified
versions of the secret at
path . |
Versioned<Map<String,Object>> |
get(String path,
Versioned.Version version)
Read the requested
Versioned.Version of the secret at path . |
<T> Versioned<T> |
get(String path,
Versioned.Version version,
Class<T> responseType)
Read the requested
Versioned.Version of the secret at path and deserialize
the secret to the given responseType . |
VaultKeyValueOperationsSupport.KeyValueBackend |
getApiVersion() |
List<String> |
list(String path)
Enumerate keys from a Vault path.
|
VaultKeyValueMetadataOperations |
opsForKeyValueMetadata()
|
Versioned.Metadata |
put(String path,
Object body)
Write the
versioned secret at path . |
void |
undelete(String path,
Versioned.Version... versionsToDelete)
Undelete (restore) one or more
versions of the secret at
path . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
get, get
delete, getApiVersion, list
public VaultVersionedKeyValueTemplate(VaultOperations vaultOperations, String path)
vaultOperations
- must not be null.path
- must not be empty or null.@Nullable public Versioned<Map<String,Object>> get(String path, Versioned.Version version)
VaultVersionedKeyValueOperations
Versioned.Version
of the secret at path
.get
in interface VaultVersionedKeyValueOperations
path
- must not be null.version
- must not be null.@Nullable public <T> Versioned<T> get(String path, Versioned.Version version, Class<T> responseType)
VaultVersionedKeyValueOperations
Versioned.Version
of the secret at path
and deserialize
the secret to the given responseType
.get
in interface VaultVersionedKeyValueOperations
path
- must not be null.version
- must not be null.responseType
- must not be null.public Versioned.Metadata put(String path, Object body)
VaultVersionedKeyValueOperations
versioned secret
at path
. body
may be
either plain secrets (e.g. map) or Versioned
objects. Using
Versioned
will apply versioning for Compare-and-Set (CAS).put
in interface VaultVersionedKeyValueOperations
path
- must not be null.body
- must not be null.Versioned.Metadata
.public void delete(String path, Versioned.Version... versionsToDelete)
VaultVersionedKeyValueOperations
versions
of the secret at path
.delete
in interface VaultVersionedKeyValueOperations
path
- must not be null.versionsToDelete
- must not be null or empty.public void undelete(String path, Versioned.Version... versionsToDelete)
VaultVersionedKeyValueOperations
versions
of the secret at
path
.undelete
in interface VaultVersionedKeyValueOperations
path
- must not be null.versionsToDelete
- must not be null or empty.public void destroy(String path, Versioned.Version... versionsToDelete)
VaultVersionedKeyValueOperations
versions
of the secret at
path
.destroy
in interface VaultVersionedKeyValueOperations
path
- must not be null.versionsToDelete
- must not be null or empty.public VaultKeyValueMetadataOperations opsForKeyValueMetadata()
VaultVersionedKeyValueOperations
opsForKeyValueMetadata
in interface VaultVersionedKeyValueOperations
@Nullable public List<String> list(String path)
VaultKeyValueOperationsSupport
path
- must not be null.public VaultKeyValueOperationsSupport.KeyValueBackend getApiVersion()
public void delete(String path)
VaultKeyValueOperationsSupport
path
.delete
in interface VaultKeyValueOperationsSupport
path
- must not be null.Copyright © 2016–2021 Pivotal Software, Inc.. All rights reserved.