printf

Format a string using printf and environment variables

Input

(required*)

arg name JSON type example description
envs map {"UAA_URL": "https://GUID.predix-uaa.predix.io"} env var mappings to add to current process
fmts map {"issuer_url": "${UAA_URL}/oauth/token" var names and printf format strings

Examples:

  • format some strings based on environment variables
{
    "envs": {
        "FIRST_NAME": "ernesto",
        "LAST_NAME": "alfonso"
    },
    "fmts": {
        "config": "${HOME}/.config",
        "random": "${RANDOM}-${RANDOM}-${RANDOM}",
        "full_name": "${FIRST_NAME}-${LAST_NAME}"
    }
}

Output

output name JSON type example description
"<VAR 1>" string "home/vagrant.config" result of printf execution
"<VAR 2>" string "10403-6129-3149" result of printf execution
string   result of printf execution

Example:

{
  "random": "10403-6129-3149", 
  "config": "/home/vagrant/.config", 
  "full_name": "ernesto-alfonso"
}

Idempotence

Always idempotent