resume-auto-follow-pattern.asciidoc 2.5 KB

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