lr_hashicorp_vault_save_secret_from_json

Extracts the secret from the response received from HashiCorp Vault and saves it in a parameter.

Arguments

NameComments
JSONThe json response received from Vault.
SecretThe secret that will be extracted from “data” field, e.g. “username”.
ResultParamNameThe name of the parameter in which the response will be stored.

Return Values

Returns 0 on success, or 1 for an error.

Parameterization

All string input arguments can be passed using standard parameterization.

Examples

C language

Copy code
lr_hashicorp_vault_save_secret_from_json ("JSON={response}",
            "Secret=username"
            "ResultParamName=data",
            LAST);

Java and .NET

Copy code
lr.hashicorp_vault_save_secret_from_json (new String[] {
             "JSON={response}",
             "Secret=username",
             "ResultParamName=data"});

JavaScript

Copy code
lr.hashicorpVaultSaveSecretFromJson ({ json: "{response}",
                secret: "username",
                resultParamName: "data"});