public class Variables extends Object
This class provides APIs to retrieve and set individual variable secrets,
as well as fetch multiple secrets in a single batch request. Instances are
typically obtained via Conjur.variables().
| Constructor and Description |
|---|
Variables(Credentials credentials)
Deprecated.
Prefer
Conjur.variables() so variables and resources can share a single underlying client. |
Variables(Credentials credentials,
SSLContext sslContext)
Deprecated.
Prefer
Conjur.variables() so variables and resources can share a single underlying client. |
Variables(Token token)
Deprecated.
Prefer
Conjur.variables() so variables and resources can share a single underlying client. |
Variables(Token token,
SSLContext sslContext)
Deprecated.
Prefer
Conjur.variables() so variables and resources can share a single underlying client. |
| Modifier and Type | Method and Description |
|---|---|
void |
addSecret(String variableId,
String secret)
Set the secret value for a Conjur variable.
|
Map<String,String> |
retrieveBatchSecrets(String... variableIds)
Fetch multiple secret values in one invocation.
|
String |
retrieveSecret(String variableId)
Retrieve the secret value for a Conjur variable.
|
@Deprecated public Variables(Credentials credentials)
Conjur.variables() so variables and resources can share a single underlying client.credentials - credentials used to authenticate requests@Deprecated public Variables(Credentials credentials, SSLContext sslContext)
Conjur.variables() so variables and resources can share a single underlying client.credentials - credentials used to authenticate requestssslContext - the SSLContext to use for HTTPS connections@Deprecated public Variables(Token token)
Conjur.variables() so variables and resources can share a single underlying client.token - authorization token used for requests@Deprecated public Variables(Token token, SSLContext sslContext)
Conjur.variables() so variables and resources can share a single underlying client.token - authorization token used for requestssslContext - the SSLContext to use for HTTPS connectionspublic String retrieveSecret(String variableId)
variableId - variable identifier (without account/kind prefix)public void addSecret(String variableId, String secret)
variableId - variable identifier (without account/kind prefix)secret - secret value to storeCopyright © 2026. All rights reserved.