Skip to main content Link Menu Expand (external link) Document Search Copy Copied

auth0 rules create

Create a new rule.

To create interactively, use auth0 rules create with no arguments.

To create non-interactively, supply the name, template and other information through the flags.

Usage

auth0 rules create [flags]

Examples

  auth0 rules create
  auth0 rules create --enabled true
  auth0 rules create --enabled true --name "My Rule" 
  auth0 rules create --enabled true --name "My Rule" --template "Empty rule"
  auth0 rules create --enabled true --name "My Rule" --template "Empty rule" --script "$(cat path/to/script.js)"
  auth0 rules create -e true -n "My Rule" -t "Empty rule" -s "$(cat path/to/script.js)" --json
  echo "{\"name\":\"piping-name\",\"script\":\"console.log('test')\"}" | auth0 rules create

Flags

  -e, --enabled           Enable (or disable) a rule. (default true)
      --json              Output in json format.
  -n, --name string       Name of the rule.
  -s, --script string     Script contents for the rule.
  -t, --template string   Template to use for the rule.

Inherited Flags

      --debug           Enable debug mode.
      --no-color        Disable colors.
      --no-input        Disable interactivity.
      --tenant string   Specific tenant to use.