pause-auto-follow-pattern.asciidoc 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. [role="xpack"]
  2. [testenv="platinum"]
  3. [[ccr-pause-auto-follow-pattern]]
  4. === Pause auto-follow pattern API
  5. ++++
  6. <titleabbrev>Pause auto-follow pattern</titleabbrev>
  7. ++++
  8. Pauses an auto-follow pattern.
  9. [[ccr-pause-auto-follow-pattern-request]]
  10. ==== {api-request-title}
  11. `POST /_ccr/auto_follow/<auto_follow_pattern_name>/pause`
  12. [[ccr-pause-auto-follow-pattern-prereqs]]
  13. ==== {api-prereq-title}
  14. * If the {es} {security-features} are enabled, you must have `manage_ccr` cluster
  15. privileges on the cluster that contains the follower index. For more information,
  16. see <<security-privileges>>.
  17. [[ccr-pause-auto-follow-pattern-desc]]
  18. ==== {api-description-title}
  19. This API pauses an <<ccr-auto-follow,auto-follow pattern>>. When this API returns, the auto-follow pattern
  20. is inactive and ignores any new index created on the remote cluster that matches any of
  21. the auto-follow's patterns. Paused auto-follow patterns appear with the `active` field
  22. set to `false` in the <<ccr-get-auto-follow-pattern, GET auto-follow patterns API>>.
  23. You can resume auto-following with the <<ccr-resume-auto-follow-pattern,resume auto-follow pattern API>>.
  24. Once resumed, the auto-follow pattern is active again and automatically configure
  25. follower indices for newly created indices on the remote cluster that match its patterns.
  26. Remote indices created while the
  27. pattern was paused will also be followed, unless they have been deleted or closed in the
  28. meantime.
  29. [[ccr-pause-auto-follow-pattern-path-parms]]
  30. ==== {api-path-parms-title}
  31. `<auto_follow_pattern_name>`::
  32. (Required, string) Name of the auto-follow pattern to pause.
  33. [[ccr-pause-auto-follow-pattern-examples]]
  34. ==== {api-examples-title}
  35. This example pauses an auto-follow pattern named `my_auto_follow_pattern`:
  36. //////////////////////////
  37. [source,console]
  38. --------------------------------------------------
  39. PUT /_ccr/auto_follow/my_auto_follow_pattern
  40. {
  41. "remote_cluster" : "remote_cluster",
  42. "leader_index_patterns" :
  43. [
  44. "leader_index"
  45. ],
  46. "follow_index_pattern" : "{{leader_index}}-follower"
  47. }
  48. --------------------------------------------------
  49. // TEST[setup:remote_cluster]
  50. // TESTSETUP
  51. //////////////////////////
  52. [source,console]
  53. --------------------------------------------------
  54. POST /_ccr/auto_follow/my_auto_follow_pattern/pause
  55. --------------------------------------------------
  56. // TEST
  57. The API returns the following result:
  58. [source,console-result]
  59. --------------------------------------------------
  60. {
  61. "acknowledged" : true
  62. }
  63. --------------------------------------------------