110 lines
2.8 KiB
Plaintext
110 lines
2.8 KiB
Plaintext
[role="xpack"]
|
|
[testenv="platinum"]
|
|
[[ccr-get-auto-follow-pattern]]
|
|
=== Get auto-follow pattern API
|
|
++++
|
|
<titleabbrev>Get auto-follow pattern</titleabbrev>
|
|
++++
|
|
|
|
Get auto-follow patterns.
|
|
|
|
[[ccr-get-auto-follow-pattern-request]]
|
|
==== {api-request-title}
|
|
|
|
//////////////////////////
|
|
|
|
[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/]
|
|
|
|
[[ccr-get-auto-follow-pattern-prereqs]]
|
|
==== {api-prereq-title}
|
|
|
|
* If the {es} {security-features} are enabled, you must have `manage_ccr` cluster
|
|
privileges on the cluster that contains the follower index. For more information,
|
|
see {stack-ov}/security-privileges.html[Security privileges].
|
|
|
|
[[ccr-get-auto-follow-pattern-desc]]
|
|
==== {api-description-title}
|
|
|
|
This API gets configured {stack-ov}/ccr-auto-follow.html[auto-follow patterns].
|
|
This API will return the specified auto-follow pattern collection.
|
|
|
|
[[ccr-get-auto-follow-pattern-path-parms]]
|
|
==== {api-path-parms-title}
|
|
|
|
`<auto_follow_pattern_name>` (Optional)::
|
|
(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.
|
|
|
|
[[ccr-get-auto-follow-pattern-examples]]
|
|
==== {api-examples-title}
|
|
|
|
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]
|
|
--------------------------------------------------
|
|
{
|
|
"patterns": [
|
|
{
|
|
"name": "my_auto_follow_pattern",
|
|
"pattern": {
|
|
"remote_cluster" : "remote_cluster",
|
|
"leader_index_patterns" :
|
|
[
|
|
"leader_index*"
|
|
],
|
|
"follow_index_pattern" : "{{leader_index}}-follower"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
--------------------------------------------------
|
|
// TESTRESPONSE
|