Using the wsk CLI
You can use the --help
flag to navigate the list of supported commands:
Copied to your clipboardwsk --help____ ___ _ _ _ _ _/\ \ / _ \ _ __ ___ _ __ | | | | |__ (_)___| | __/\ /__\ \ | | | | '_ \ / _ \ '_ \| | | | '_ \| / __| |/ // \____ \ / | |_| | |_) | __/ | | | |/\| | | | | \__ \ <\ \ / \/ \___/| .__/ \___|_| |_|__/\__|_| |_|_|___/_|\_\\___\/ tm |_|Usage:wsk [command]Available Commands:action work with actionsactivation work with activationspackage work with packagesrule work with rulestrigger work with triggerssdk work with the sdkproperty work with whisk propertiesnamespace work with namespaceslist list entities in the current namespaceapi work with APIsFlags:--apihost HOST whisk API HOST--apiversion VERSION whisk API VERSION-u, --auth KEY authorization KEY--cert string client cert-d, --debug debug level output-i, --insecure bypass certificate checking--key string client key-v, --verbose verbose outputUse "wsk [command] --help" for more information about a command.
Suppose you want to get help on how to work with actions. You’d run:
Copied to your clipboardwsk action --help
This renders:
Copied to your clipboardwork with actionsUsage:wsk action [command]Available Commands:create create a new actionupdate update an existing action, or create an action if it does not existinvoke invoke actionget get actiondelete delete actionlist list all actions in a namespace or actions contained in a package
Now that you know the command you need for create an action, you can get help on this:
Copied to your clipboardwsk action create --help
This renders:
Copied to your clipboardcreate a new actionUsage:wsk action create ACTION_NAME ACTION [flags]Flags:-a, --annotation KEY VALUE annotation values in KEY VALUE format (default [])-A, --annotation-file FILE FILE containing annotation values in JSON format--copy treat ACTION as the name of an existing action--docker string use provided docker image (a path on DockerHub) to run the action--kind KIND the KIND of the action runtime (example: swift:default, nodejs:default)-l, --logsize LIMIT the maximum log size LIMIT in MB for the action (default 10)--main string the name of the action entry point (function or fully-qualified method name when applicable)-m, --memory LIMIT the maximum memory LIMIT in MB for the action (default 256)--native treat ACTION as native action (zip file provides a compatible executable to run)-p, --param KEY VALUE parameter values in KEY VALUE format (default [])-P, --param-file FILE FILE containing parameter values in JSON format--sequence treat ACTION as comma separated sequence of actions to invoke-t, --timeout LIMIT the timeout LIMIT in milliseconds after which the action is terminated (default 60000)--web string treat ACTION as a web action, a raw HTTP web action, or as a standard action; yes | true = web action, raw = raw HTTP web action, no | false = standard action--web-secure SECRET secure the web action. where SECRET is true, false, or any string. Only valid when the ACTION is a web action