resume-auto-follow-pattern.asciidoc 2.9 KB

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