cli
cli copied to clipboard
Doc: Clarify CLI `trigger` help
It's not obvious to understand how to add a trigger after the function has been created and fn create trigger --help
doesn't really help.
COMMAND OPTIONS
--source value, -s value trigger source
--type value, -t value Todo
--annotation value fn annotation (can be specified multiple times)
I assume that --type
should be "HTTP" but what is --annotation
and --source
for?
Adding a simple example might be alleviate any potential confusion.
I was looking at the code and for the --type value, it says:
Class of trigger, e.g schedule, http, queue
However, I am not sure all of these are supported (HTTP probably is).
For source, it says that this is an "URI path for the trigger (sayHello
, say/hello
)" -- changing it to this would probably help a bit, right?
There's also a comment for annotations, but it basically says it's a map of annotations that get attached and talks about its length.
CC'ing @JadeRedworth as she was the one that added this code :)