Skip to content

Commit

Permalink
Merge pull request #127 from StackStorm/jinpingh-patch-1
Browse files Browse the repository at this point in the history
Passing true to decrypt of st2kv function does not work
  • Loading branch information
jinpingh authored Feb 13, 2019
2 parents c77f1e6 + d52e556 commit a81f5ee
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion docs/source/yaql.rst
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,12 @@ For the full list of built-in functions, see the `Standard Library section in YA
* ``"one, two, three, four".split(',').select(str($).trim())`` converts a comma separated
string to an array, trimming each element.


Named Parameters in Function
----------------------------

* Named parameters in function call must use the sign ``=>`` for assignment. Equal sign ``=`` in YAQL is used for evaluation and will result in the wrong value being passed for the parameter. For example, the built-in ``datetime`` function has parameters ``year, month, day, hour=0, minute=0, second=0, microsecond=0, offset=ZERO_TIMESPAN`` where year, month, and day are required parameters and the named parameters are optional. To assign value to hour, the function call will look like ``datetime(2020, 1, 1, hour=>12)``.

StackStorm Functions
--------------------

Expand All @@ -142,4 +148,4 @@ StackStorm Functions
value for the user scoped key named ``my_key_y``. Please note that the key name should be in quotes
otherwise YAQL treats a key name with a dot like ``system.shared_key_x`` as a dict access. The value
can be encrypted in the StackStorm datastore. To decrypt the retrieved value, the input argument
``decrypt`` must be set to true such as ``st2kv('st2_key_id', decrypt=true)``.
``decrypt`` must be set to true such as ``st2kv('st2_key_id', decrypt=>true)``.

0 comments on commit a81f5ee

Please sign in to comment.