pause-auto-follow-pattern.asciidoc 2.6 KB

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