pause-auto-follow-pattern.asciidoc 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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-query-params]]
  33. ==== {api-query-parms-title}
  34. `master_timeout`::
  35. (Optional, <<time-units, time units>>) Specifies the period of time to wait for
  36. a connection to the master node. If no response is received before the timeout
  37. expires, the request fails and returns an error. Defaults to `30s`.
  38. [[ccr-pause-auto-follow-pattern-examples]]
  39. ==== {api-examples-title}
  40. This example pauses an auto-follow pattern named `my_auto_follow_pattern`:
  41. //////////////////////////
  42. [source,console]
  43. --------------------------------------------------
  44. PUT /_ccr/auto_follow/my_auto_follow_pattern
  45. {
  46. "remote_cluster" : "remote_cluster",
  47. "leader_index_patterns" :
  48. [
  49. "leader_index"
  50. ],
  51. "follow_index_pattern" : "{{leader_index}}-follower"
  52. }
  53. --------------------------------------------------
  54. // TEST[setup:remote_cluster]
  55. // TESTSETUP
  56. [source,console]
  57. --------------------------------------------------
  58. DELETE /_ccr/auto_follow/my_auto_follow_pattern
  59. --------------------------------------------------
  60. // TEST
  61. // TEARDOWN
  62. //////////////////////////
  63. [source,console]
  64. --------------------------------------------------
  65. POST /_ccr/auto_follow/my_auto_follow_pattern/pause
  66. --------------------------------------------------
  67. // TEST
  68. The API returns the following result:
  69. [source,console-result]
  70. --------------------------------------------------
  71. {
  72. "acknowledged" : true
  73. }
  74. --------------------------------------------------