put-auto-follow-pattern.asciidoc 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. [role="xpack"]
  2. [testenv="platinum"]
  3. [[ccr-put-auto-follow-pattern]]
  4. === Create Auto-Follow Pattern API
  5. ++++
  6. <titleabbrev>Create Auto-Follow Pattern</titleabbrev>
  7. ++++
  8. beta[]
  9. Creates an auto-follow pattern.
  10. ==== Description
  11. This API creates a new named collection of
  12. {stack-ov}/ccr-auto-follow.html[auto-follow patterns] against the remote cluster
  13. specified in the request body. Newly created indices on the remote cluster
  14. matching any of the specified patterns will be automatically configured as follower
  15. indices.
  16. ==== Request
  17. [source,js]
  18. --------------------------------------------------
  19. PUT /_ccr/auto_follow/<auto_follow_pattern_name>
  20. {
  21. "remote_cluster" : "<remote_cluster>",
  22. "leader_index_patterns" :
  23. [
  24. "<leader_index_pattern>"
  25. ],
  26. "follow_index_pattern" : "<follow_index_pattern>"
  27. }
  28. --------------------------------------------------
  29. // CONSOLE
  30. // TEST[setup:remote_cluster]
  31. // TEST[s/<auto_follow_pattern_name>/auto_follow_pattern_name/]
  32. // TEST[s/<remote_cluster>/remote_cluster/]
  33. // TEST[s/<leader_index_patterns>/leader_index*/]
  34. // TEST[s/<follow_index_pattern>/{{leader_index}}-follower/]
  35. //////////////////////////
  36. [source,js]
  37. --------------------------------------------------
  38. DELETE /_ccr/auto_follow/auto_follow_pattern_name
  39. --------------------------------------------------
  40. // CONSOLE
  41. // TEST[continued]
  42. //////////////////////////
  43. ==== Path Parameters
  44. `auto_follow_pattern_name` (required)::
  45. (string) name of the collection of auto-follow patterns
  46. ==== Request Body
  47. `remote_cluster`::
  48. (required string) the <<modules-remote-clusters,remote cluster>> containing the
  49. leader indices to match against
  50. `leader_index_patterns`::
  51. (array) an array of simple index patterns to match against indices in the
  52. remote cluster specified by the `remote_cluster` field
  53. `follow_index_pattern`::
  54. (string) the name of follower index; the template `{{leader_index}}` can be
  55. used to derive the name of the follower index from the name of the leader
  56. index
  57. include::../follow-request-body.asciidoc[]
  58. ==== Example
  59. This example creates an auto-follow pattern named `my_auto_follow_pattern`:
  60. [source,js]
  61. --------------------------------------------------
  62. PUT /_ccr/auto_follow/my_auto_follow_pattern
  63. {
  64. "remote_cluster" : "remote_cluster",
  65. "leader_index_patterns" :
  66. [
  67. "leader_index*"
  68. ],
  69. "follow_index_pattern" : "{{leader_index}}-follower",
  70. "max_read_request_operation_count" : 1024,
  71. "max_outstanding_read_requests" : 16,
  72. "max_read_request_size" : "1024k",
  73. "max_write_request_operation_count" : 32768,
  74. "max_write_request_size" : "16k",
  75. "max_outstanding_write_requests" : 8,
  76. "max_write_buffer_count" : 512,
  77. "max_write_buffer_size" : "512k",
  78. "max_retry_delay" : "10s",
  79. "read_poll_timeout" : "30s"
  80. }
  81. --------------------------------------------------
  82. // CONSOLE
  83. // TEST[setup:remote_cluster]
  84. The API returns the following result:
  85. [source,js]
  86. --------------------------------------------------
  87. {
  88. "acknowledged" : true
  89. }
  90. --------------------------------------------------
  91. // TESTRESPONSE
  92. //////////////////////////
  93. [source,js]
  94. --------------------------------------------------
  95. DELETE /_ccr/auto_follow/my_auto_follow_pattern
  96. --------------------------------------------------
  97. // CONSOLE
  98. // TEST[continued]
  99. //////////////////////////