Skip to content

Configurations

Basic Usage

import { response } from "sdk/http";
import { configurations } from "sdk/core";

configurations.set("ENV_VAR_1", "ENV_VAR_1");
configurations.set("ENV_VAR_2", "ENV_VAR_2");

let credentials = {
    envVar1: configurations.get("ENV_VAR_1"),
    envVar2: configurations.get("ENV_VAR_2")
};

response.println(JSON.stringify(credentials));

Functions


Function Description Returns
get(key, defaultValue)() Returns the value for the specified key, or the default value string
set(key, value) Sets a value, for the specified key -
getKeys() Returns an arrays of keys array of string
load(path) Loads a configuration from a properties file at path -
update() Updates the loaded configurations -