resume-auto-follow-pattern.asciidoc 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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. ..New API reference
  8. [sidebar]
  9. --
  10. For the most up-to-date API details, refer to {api-es}/group/endpoint-ccr[Cross-cluster replication APIs].
  11. --
  12. Resumes a {ccr} <<ccr-auto-follow,auto-follow pattern>>.
  13. [[ccr-resume-auto-follow-pattern-request]]
  14. ==== {api-request-title}
  15. `POST /_ccr/auto_follow/<auto_follow_pattern_name>/resume`
  16. [[ccr-resume-auto-follow-pattern-prereqs]]
  17. ==== {api-prereq-title}
  18. * If the {es} {security-features} are enabled, you must have `manage_ccr` cluster
  19. privileges on the cluster that contains the follower index. For more information,
  20. see <<security-privileges>>.
  21. [[ccr-resume-auto-follow-pattern-desc]]
  22. ==== {api-description-title}
  23. This API resumes an <<ccr-auto-follow,auto-follow pattern>> that has been paused with the
  24. <<ccr-pause-auto-follow-pattern, pause auto-follow pattern API>>. When this API
  25. returns, the auto-follow pattern will resume configuring following indices for
  26. newly created indices on the remote cluster that match its patterns. Remote
  27. indices created while the pattern was paused will also be followed, unless they
  28. have been deleted or closed in the meantime.
  29. [[ccr-resume-auto-follow-pattern-path-parms]]
  30. ==== {api-path-parms-title}
  31. `<auto_follow_pattern_name>`::
  32. (Required, string) Specifies the name of the auto-follow pattern to resume.
  33. [[ccr-resume-auto-follow-pattern-query-params]]
  34. ==== {api-query-parms-title}
  35. include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=master-timeout]
  36. [[ccr-resume-auto-follow-pattern-examples]]
  37. ==== {api-examples-title}
  38. This example resumes the activity of a paused auto-follow pattern
  39. named `my_auto_follow_pattern`:
  40. //////////////////////////
  41. [source,console]
  42. --------------------------------------------------
  43. PUT /_ccr/auto_follow/my_auto_follow_pattern
  44. {
  45. "remote_cluster" : "remote_cluster",
  46. "leader_index_patterns" :
  47. [
  48. "leader_index"
  49. ],
  50. "follow_index_pattern" : "{{leader_index}}-follower"
  51. }
  52. --------------------------------------------------
  53. // TEST[setup:remote_cluster]
  54. // TESTSETUP
  55. [source,console]
  56. --------------------------------------------------
  57. DELETE /_ccr/auto_follow/my_auto_follow_pattern
  58. --------------------------------------------------
  59. // TEST
  60. // TEARDOWN
  61. [source,console]
  62. --------------------------------------------------
  63. POST /_ccr/auto_follow/my_auto_follow_pattern/pause
  64. --------------------------------------------------
  65. // TEST
  66. //////////////////////////
  67. [source,console]
  68. --------------------------------------------------
  69. POST /_ccr/auto_follow/my_auto_follow_pattern/resume
  70. --------------------------------------------------
  71. // TEST
  72. The API returns the following result:
  73. [source,console-result]
  74. --------------------------------------------------
  75. {
  76. "acknowledged" : true
  77. }
  78. --------------------------------------------------