resume-auto-follow-pattern.asciidoc 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. [role="xpack"]
  2. [testenv="platinum"]
  3. [[ccr-resume-auto-follow-pattern]]
  4. === Resume auto-follow pattern API
  5. ++++
  6. <titleabbrev>Resume auto-follow pattern</titleabbrev>
  7. ++++
  8. Resumes an auto-follow pattern.
  9. [[ccr-resume-auto-follow-pattern-request]]
  10. ==== {api-request-title}
  11. `POST /_ccr/auto_follow/<auto_follow_pattern_name>/resume`
  12. [[ccr-resume-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-resume-auto-follow-pattern-desc]]
  18. ==== {api-description-title}
  19. This API resumes an <<ccr-auto-follow,auto-follow pattern>> that has been paused with the
  20. <<ccr-pause-auto-follow-pattern, pause auto-follow pattern API>>. When this API
  21. returns, the auto-follow pattern will resume configuring following indices for
  22. newly created indices on the remote cluster that match its patterns. Remote
  23. indices created while the pattern was paused will also be followed, unless they
  24. have been deleted or closed in the meantime.
  25. [[ccr-resume-auto-follow-pattern-path-parms]]
  26. ==== {api-path-parms-title}
  27. `<auto_follow_pattern_name>`::
  28. (Required, string) Specifies the name of the auto-follow pattern to resume.
  29. [[ccr-resume-auto-follow-pattern-examples]]
  30. ==== {api-examples-title}
  31. This example resumes the activity of a paused auto-follow pattern
  32. named `my_auto_follow_pattern`:
  33. //////////////////////////
  34. [source,console]
  35. --------------------------------------------------
  36. PUT /_ccr/auto_follow/my_auto_follow_pattern
  37. {
  38. "remote_cluster" : "remote_cluster",
  39. "leader_index_patterns" :
  40. [
  41. "leader_index"
  42. ],
  43. "follow_index_pattern" : "{{leader_index}}-follower"
  44. }
  45. --------------------------------------------------
  46. // TEST[setup:remote_cluster]
  47. // TESTSETUP
  48. [source,console]
  49. --------------------------------------------------
  50. DELETE /_ccr/auto_follow/my_auto_follow_pattern
  51. --------------------------------------------------
  52. // TEST
  53. // TEARDOWN
  54. [source,console]
  55. --------------------------------------------------
  56. POST /_ccr/auto_follow/my_auto_follow_pattern/pause
  57. --------------------------------------------------
  58. // TEST
  59. //////////////////////////
  60. [source,console]
  61. --------------------------------------------------
  62. POST /_ccr/auto_follow/my_auto_follow_pattern/resume
  63. --------------------------------------------------
  64. // TEST
  65. The API returns the following result:
  66. [source,console-result]
  67. --------------------------------------------------
  68. {
  69. "acknowledged" : true
  70. }
  71. --------------------------------------------------