Skip to content

Latest commit

 

History

History
105 lines (68 loc) · 2.95 KB

File metadata and controls

105 lines (68 loc) · 2.95 KB

eventing-function-setup

Manage Events

SYNOPSIS

couchbase-cli eventing-function-setup [--cluster <url>] [--username <user>]
    [--password <password>]  [--import] [--export] [--export-all]
    [--delete] [--list] [--deploy] [--undeploy] [--name <name>]
    [--file <file>]

DESCRIPTION

This command is used to manage functions in the Event service

OPTIONS

--import

Import function(s) from a file. This option requires --file to be specified. The file provided should be from the --export option.

--export

Export a named function to a file. This option requires --file and --name to be specified.

--export-all

Export all functions to a file. This option requires --file to be specified.

--delete

Deletes a named function. Functions can only be deleted when in the un-deployed state. This option requires --name to be specified.

--list

List all functions.

--deploy

Deploys the named function. This option requires --name to be specified.

--undeploy

Undeploys the named function. This option requires --name to be specified.

--name <name>

The name of the function to take a action against. This is used by --export, --delete, --deploy and --undeply options only.

--file <file>

The file to import and export functions to. This is used by --export and --import options only.

EXAMPLES

To import functions from a file called functions.json:

$ couchbase-cli eventing-functions-setup -c 192.168.1.5 -u Administrator \
 -p password --import --file functions.json

To export a function called alert_function to a file called functions.json:

$ couchbase-cli eventing-functions-setup -c 192.168.1.5 -u Administrator \
 -p password --export --name alert_function --file functions.json

To export all functions to a file called functions.json:

$ couchbase-cli eventing-functions-setup -c 192.168.1.5 -u Administrator \
 -p password --export-all --file functions.json

To list all functions:

$ couchbase-cli eventing-functions-setup -c 192.168.1.5 -u Administrator \
 -p password --list

To delete a function called alert_function:

$ couchbase-cli eventing-functions-setup -c 192.168.1.5 -u Administrator \
 -p password --delete --name alert_function

To deploy a function called alert_function:

$ couchbase-cli eventing-functions-setup -c 192.168.1.5 -u Administrator \
 -p password --deploy --name alert_function

To undeploy a function called alert_function:

$ couchbase-cli eventing-functions-setup -c 192.168.1.5 -u Administrator \
 -p password --undeploy --name alert_function