public class SecretDocument extends Object
SecretDocument
is basically an object with an id
and a body
represented as Map
of String
and Object
. It can be created
from
an Id and VaultResponse
.
A secret document can hold simple properties, list
properties and nested objects as Map
s.
Constructor and Description |
---|
SecretDocument()
Create a new, empty
SecretDocument . |
SecretDocument(Map<String,Object> body)
Create a new
SecretDocument given a body map . |
SecretDocument(String id) |
SecretDocument(String id,
Map<String,Object> body)
|
Modifier and Type | Method and Description |
---|---|
static SecretDocument |
from(String id,
VaultResponse vaultResponse)
|
Object |
get(String key)
Retrieve a value from the secret document by its
key . |
Map<String,Object> |
getBody() |
String |
getId() |
void |
put(String key,
Object value)
Set a value in the secret document.
|
void |
setId(String id)
Set the Id.
|
public SecretDocument()
SecretDocument
.public SecretDocument(Map<String,Object> body)
SecretDocument
given a body map
.body
- must not be null.public SecretDocument(@Nullable String id, Map<String,Object> body)
id
- may be null.body
- must not be null.public SecretDocument(String id)
public static SecretDocument from(@Nullable String id, VaultResponse vaultResponse)
id
- must not be null.vaultResponse
- must not be null.SecretDocument
.public Map<String,Object> getBody()
SecretDocument
@Nullable public Object get(String key)
key
.key
- must not be null.Copyright © 2016–2019 Pivotal Software, Inc.. All rights reserved.