Skip to content

cub trigger rename

cub trigger rename

Rename a trigger

Synopsis

Rename a trigger: change its slug. A display name that is the same as the slug changes with it; --display-name sets the display name instead.

A trigger keeps its identity: everything that refers to it by ID keeps doing so. A where expression that names it by slug, such as "Slug = 'old-name'", stops matching it.

Gates are found by the trigger's ID, so approving and clearing them are unaffected, but gate names in units' ValidationErrors and ValidationWarnings, and their Values keys, keep the old slug until each unit is next resolved.

--dry-run reports whether the rename would succeed without making it.

Examples:

  # Rename a trigger
  cub trigger rename my-trigger my-new-trigger --force

  # Rename it and set its display name
  cub trigger rename my-trigger my-new-trigger --display-name "My new trigger" --force
cub trigger rename <trigger> <new-slug> [flags]

Options

      --display-name string   display name to give the trigger, instead of following the slug
      --dry-run               report what the command would write, and write nothing
      --force                 rename the trigger even though units' gate names keep its old slug until they are next resolved
  -h, --help                  help for rename
  -o, --output string         Output format. One of: json, yaml, name, wide, mutations, jq=<expr>, yq=<expr>, custom-columns=<spec>
      --quiet                 No default output.

Options inherited from parent commands

      --component string   the Component of --variant, when that names the variant alone; --variant <component>/<variant> says the same in one flag
      --context string     The context to use for this command
      --debug              Debug output
      --space string       space to operate in, by slug or UUID. Omitted, a list or bulk operation spans the organization and a single entity is named as <space>/<slug>
      --variant string     variant to operate in, as <component>/<variant>, or as <variant> with --component: the space naming that Component whose Variant label is <variant>. The same scope as --space, named by what it is rather than by the space's slug; the two cannot be combined

SEE ALSO