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 Create new secrets
Vietnamese English
Create new secrets

Use .create() function to create a new secret

SecretCreateParams createParams = new SecretCreateParams.Builder()
        .setKey("key")
        .setValue("value")
        .setDescription("description")
        .build();
Secret newSecret = client.secrets().create(createParams, Secret.class);

Create a new secret with a specific environment:

SecretCreateParams createParams = new SecretCreateParams.Builder()
        .setKey("key")
        .setValue("value")
        .setDescription("description")
        .setEnvironmentName("environment")
        .build();
Secret newSecret = client.secrets().create(createParams, Secret.class);
 
Was this page helpful?
No
Yes
Join Our Community