post-pause-follow.asciidoc 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. [role="xpack"]
  2. [[ccr-post-pause-follow]]
  3. === Pause follower API
  4. ++++
  5. <titleabbrev>Pause follower</titleabbrev>
  6. ++++
  7. Pauses a follower index.
  8. [[ccr-post-pause-follow-request]]
  9. ==== {api-request-title}
  10. //////////////////////////
  11. [source,console]
  12. --------------------------------------------------
  13. PUT /follower_index/_ccr/follow?wait_for_active_shards=1
  14. {
  15. "remote_cluster" : "remote_cluster",
  16. "leader_index" : "leader_index"
  17. }
  18. --------------------------------------------------
  19. // TESTSETUP
  20. // TEST[setup:remote_cluster_and_leader_index]
  21. //////////////////////////
  22. [source,console]
  23. --------------------------------------------------
  24. POST /<follower_index>/_ccr/pause_follow
  25. --------------------------------------------------
  26. // TEST[s/<follower_index>/follower_index/]
  27. [[ccr-post-pause-follow-prereqs]]
  28. ==== {api-prereq-title}
  29. * If the {es} {security-features} are enabled, you must have `manage_ccr` cluster
  30. privileges on the cluster that contains the follower index. For more information,
  31. see <<security-privileges>>.
  32. [[ccr-post-pause-follow-desc]]
  33. ==== {api-description-title}
  34. This API pauses a follower index. When this API returns, the follower index will
  35. not fetch any additional operations from the leader index. You can resume
  36. following with the <<ccr-post-resume-follow,resume follower API>>. Pausing and
  37. resuming a follower index can be used to change the configuration of the
  38. following task.
  39. [[ccr-post-pause-follow-path-parms]]
  40. ==== {api-path-parms-title}
  41. `<follower_index>`::
  42. (Required, string) The name of the follower index.
  43. [[ccr-post-pause-follow-query-params]]
  44. ==== {api-query-parms-title}
  45. `master_timeout`::
  46. (Optional, <<time-units, time units>>) Specifies the period of time to wait for
  47. a connection to the master node. If no response is received before the timeout
  48. expires, the request fails and returns an error. Defaults to `30s`.
  49. [[ccr-post-pause-follow-examples]]
  50. ==== {api-examples-title}
  51. This example pauses a follower index named `follower_index`:
  52. [source,console]
  53. --------------------------------------------------
  54. POST /follower_index/_ccr/pause_follow
  55. --------------------------------------------------
  56. // TEST
  57. The API returns the following result:
  58. [source,console-result]
  59. --------------------------------------------------
  60. {
  61. "acknowledged" : true
  62. }
  63. --------------------------------------------------