Create a ticket
Sign in Sign up
Locker support Locker support
Results

No results found.

Home Locker Secrets Manager Developer tools Secrets - SDK Java Usages Get a secret value
Vietnamese English
Get a secret value

This function will get the secret value by a key.

// Get a secret by secret key
Secret secret = client.secrets().retrieve("java_key_1", Secret.class);
String secretValue = client.secrets().retrieve("java_key_1", String.class);

You could get a secret value by a secret key and specific environment name

// Get a secret by secret key and specific environment name
Secret secret = client.secrets().retrieve("java_key_1", Secret.class, "env_name");
String secret = client.secrets().retrieve("java_key_1", String.class, "env_name");
 
Was this page helpful?
No
Yes
Join Our Community