pause-auto-follow-pattern.asciidoc 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. [role="xpack"]
  2. [[ccr-pause-auto-follow-pattern]]
  3. === Pause auto-follow pattern API
  4. ++++
  5. <titleabbrev>Pause 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. Pauses a {ccr} <<ccr-auto-follow,auto-follow pattern>>.
  13. [[ccr-pause-auto-follow-pattern-request]]
  14. ==== {api-request-title}
  15. `POST /_ccr/auto_follow/<auto_follow_pattern_name>/pause`
  16. [[ccr-pause-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-pause-auto-follow-pattern-desc]]
  22. ==== {api-description-title}
  23. This API pauses an <<ccr-auto-follow,auto-follow pattern>>. When this API returns, the auto-follow pattern
  24. is inactive and ignores any new index created on the remote cluster that matches any of
  25. the auto-follow's patterns. Paused auto-follow patterns appear with the `active` field
  26. set to `false` in the <<ccr-get-auto-follow-pattern, GET auto-follow patterns API>>.
  27. You can resume auto-following with the <<ccr-resume-auto-follow-pattern,resume auto-follow pattern API>>.
  28. Once resumed, the auto-follow pattern is active again and automatically configure
  29. follower indices for newly created indices on the remote cluster that match its patterns.
  30. Remote indices created while the
  31. pattern was paused will also be followed, unless they have been deleted or closed in the
  32. meantime.
  33. [[ccr-pause-auto-follow-pattern-path-parms]]
  34. ==== {api-path-parms-title}
  35. `<auto_follow_pattern_name>`::
  36. (Required, string) Name of the auto-follow pattern to pause.
  37. [[ccr-pause-auto-follow-pattern-query-params]]
  38. ==== {api-query-parms-title}
  39. include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=master-timeout]
  40. [[ccr-pause-auto-follow-pattern-examples]]
  41. ==== {api-examples-title}
  42. This example pauses an auto-follow pattern named `my_auto_follow_pattern`:
  43. //////////////////////////
  44. [source,console]
  45. --------------------------------------------------
  46. PUT /_ccr/auto_follow/my_auto_follow_pattern
  47. {
  48. "remote_cluster" : "remote_cluster",
  49. "leader_index_patterns" :
  50. [
  51. "leader_index"
  52. ],
  53. "follow_index_pattern" : "{{leader_index}}-follower"
  54. }
  55. --------------------------------------------------
  56. // TEST[setup:remote_cluster]
  57. // TESTSETUP
  58. [source,console]
  59. --------------------------------------------------
  60. DELETE /_ccr/auto_follow/my_auto_follow_pattern
  61. --------------------------------------------------
  62. // TEST
  63. // TEARDOWN
  64. //////////////////////////
  65. [source,console]
  66. --------------------------------------------------
  67. POST /_ccr/auto_follow/my_auto_follow_pattern/pause
  68. --------------------------------------------------
  69. // TEST
  70. The API returns the following result:
  71. [source,console-result]
  72. --------------------------------------------------
  73. {
  74. "acknowledged" : true
  75. }
  76. --------------------------------------------------