[[reference-watcher-put_watch]] //////// =========================================================================================================================== || || || || || || || ██████╗ ███████╗ █████╗ ██████╗ ███╗ ███╗███████╗ || || ██╔══██╗██╔════╝██╔══██╗██╔══██╗████╗ ████║██╔════╝ || || ██████╔╝█████╗ ███████║██║ ██║██╔████╔██║█████╗ || || ██╔══██╗██╔══╝ ██╔══██║██║ ██║██║╚██╔╝██║██╔══╝ || || ██║ ██║███████╗██║ ██║██████╔╝██║ ╚═╝ ██║███████╗ || || ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚═════╝ ╚═╝ ╚═╝╚══════╝ || || || || || || This file is autogenerated, DO NOT send pull requests that changes this file directly. || || You should update the script that does the generation, which can be found in: || || https://github.com/elastic/elastic-client-generator-js || || || || You can run the script with the following command: || || npm run elasticsearch -- --version || || || || || || || =========================================================================================================================== //////// [discrete] [[client.watcher.putWatch]] === client.watcher.putWatch Creates a new watch, or updates an existing one. {ref}/watcher-api-put-watch.html[{es} documentation] [discrete] ==== Function signature [source,ts] ---- (WatcherPutWatchRequest, options?): Promise ---- [discrete] ==== Request [pass] ++++
++++
interface WatcherPutWatchRequest extends <> {
  id: <>
  active?: boolean
  if_primary_term?: <>
  if_seq_no?: <>
  version?: <>
  actions?: Record>>
  condition?: <>
  input?: <>
  metadata?: <>
  throttle_period?: string
  transform?: <>
  trigger?: <>
}

[pass]
++++
++++ [discrete] ==== Response [pass] ++++
++++
interface WatcherPutWatchResponse {
  created: boolean
  _id: <>
  _primary_term: <>
  _seq_no: <>
  _version: <>
}

[pass]
++++
++++