2018-10-26 11:23:35 -04:00
|
|
|
[role="xpack"]
|
|
|
|
[testenv="platinum"]
|
|
|
|
[[ccr-get-auto-follow-pattern]]
|
|
|
|
=== Get Auto-Follow Pattern API
|
|
|
|
++++
|
|
|
|
<titleabbrev>Get Auto-Follow Pattern</titleabbrev>
|
|
|
|
++++
|
|
|
|
|
2018-11-10 14:37:14 -05:00
|
|
|
beta[]
|
|
|
|
|
2018-10-26 11:23:35 -04:00
|
|
|
Get auto-follow patterns.
|
|
|
|
|
|
|
|
==== Description
|
|
|
|
|
2018-11-19 20:40:58 -05:00
|
|
|
This API gets configured {stack-ov}/ccr-auto-follow.html[auto-follow patterns].
|
|
|
|
This API will return the specified auto-follow pattern collection.
|
2018-10-26 11:23:35 -04:00
|
|
|
|
|
|
|
==== Request
|
|
|
|
|
|
|
|
//////////////////////////
|
|
|
|
|
|
|
|
[source,js]
|
|
|
|
--------------------------------------------------
|
|
|
|
PUT /_ccr/auto_follow/my_auto_follow_pattern
|
|
|
|
{
|
|
|
|
"remote_cluster" : "remote_cluster",
|
|
|
|
"leader_index_patterns" :
|
|
|
|
[
|
|
|
|
"leader_index*"
|
|
|
|
],
|
|
|
|
"follow_index_pattern" : "{{leader_index}}-follower"
|
|
|
|
}
|
|
|
|
--------------------------------------------------
|
|
|
|
// CONSOLE
|
|
|
|
// TEST[setup:remote_cluster]
|
|
|
|
// TESTSETUP
|
|
|
|
|
|
|
|
[source,js]
|
|
|
|
--------------------------------------------------
|
|
|
|
DELETE /_ccr/auto_follow/my_auto_follow_pattern
|
|
|
|
--------------------------------------------------
|
|
|
|
// CONSOLE
|
|
|
|
// TEST
|
|
|
|
// TEARDOWN
|
|
|
|
|
|
|
|
//////////////////////////
|
|
|
|
|
|
|
|
[source,js]
|
|
|
|
--------------------------------------------------
|
|
|
|
GET /_ccr/auto_follow/
|
|
|
|
--------------------------------------------------
|
|
|
|
// CONSOLE
|
|
|
|
|
|
|
|
[source,js]
|
|
|
|
--------------------------------------------------
|
|
|
|
GET /_ccr/auto_follow/<auto_follow_pattern_name>
|
|
|
|
--------------------------------------------------
|
|
|
|
// CONSOLE
|
|
|
|
// TEST[s/<auto_follow_pattern_name>/my_auto_follow_pattern/]
|
|
|
|
|
|
|
|
==== Path Parameters
|
|
|
|
`auto_follow_pattern_name`::
|
|
|
|
(string) specifies the auto-follow pattern collection that you want to
|
|
|
|
retrieve; if you do not specify a name, the API returns information for all
|
|
|
|
collections
|
|
|
|
|
|
|
|
==== Example
|
|
|
|
|
|
|
|
This example retrieves information about an auto-follow pattern collection
|
|
|
|
named `my_auto_follow_pattern`:
|
|
|
|
|
|
|
|
[source,js]
|
|
|
|
--------------------------------------------------
|
|
|
|
GET /_ccr/auto_follow/my_auto_follow_pattern
|
|
|
|
--------------------------------------------------
|
|
|
|
// CONSOLE
|
|
|
|
// TEST[setup:remote_cluster]
|
|
|
|
|
|
|
|
The API returns the following result:
|
|
|
|
|
|
|
|
[source,js]
|
|
|
|
--------------------------------------------------
|
|
|
|
{
|
|
|
|
"my_auto_follow_pattern" :
|
|
|
|
{
|
|
|
|
"remote_cluster" : "remote_cluster",
|
|
|
|
"leader_index_patterns" :
|
|
|
|
[
|
|
|
|
"leader_index*"
|
|
|
|
],
|
|
|
|
"follow_index_pattern" : "{{leader_index}}-follower"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
--------------------------------------------------
|
|
|
|
// TESTRESPONSE
|