elasticsearch/docs/reference/ccr/apis/auto-follow/get-auto-follow-pattern.asciidoc
Volodymyr Krasnikov 1e253a04fc
Propagate ?master_timeout query parameter from CCR apis to downstreams (#105168)
* Propagate ?master_timeout query parameter from crr put follow api

* Update docs/changelog/105168.yaml

* fix sily mistake

* spotless

* fix 2

* Add ?master_timeout query param to apis which use it

* Update rest api specs + yaml tests

* Add master_timeout (+timeout) to remaining api endpoints

* Update 105168.yaml

Correct message

* Enable randomly ?master_timeout param to ccr IT tests

* Add timeout param to RestCcrStatsAction

* propagate master_timeout param between put_follow -> resume_follow calls

* Propagate master_timeout down to persistent task layer

* Add transport version for ccr stats request object change

* Add BwC test for CcrStatsAction.Request obj
2024-04-02 13:39:01 -07:00

119 lines
3.2 KiB
Text

[role="xpack"]
[[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,console]
--------------------------------------------------
PUT /_ccr/auto_follow/my_auto_follow_pattern
{
"remote_cluster" : "remote_cluster",
"leader_index_patterns" :
[
"leader_index*"
],
"leader_index_exclusion_patterns":
[
"leader_index_001"
],
"follow_index_pattern" : "{{leader_index}}-follower"
}
--------------------------------------------------
// TEST[setup:remote_cluster]
// TESTSETUP
[source,console]
--------------------------------------------------
DELETE /_ccr/auto_follow/my_auto_follow_pattern
--------------------------------------------------
// TEST
// TEARDOWN
//////////////////////////
[source,console]
--------------------------------------------------
GET /_ccr/auto_follow/
--------------------------------------------------
[source,console]
--------------------------------------------------
GET /_ccr/auto_follow/<auto_follow_pattern_name>
--------------------------------------------------
// 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 <<security-privileges>>.
[[ccr-get-auto-follow-pattern-desc]]
==== {api-description-title}
This API gets configured <<ccr-auto-follow,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-query-params]]
==== {api-query-parms-title}
`master_timeout`::
(Optional, <<time-units, time units>>) Specifies the period of time to wait for
a connection to the master node. If no response is received before the timeout
expires, the request fails and returns an error. Defaults to `30s`.
[[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,console]
--------------------------------------------------
GET /_ccr/auto_follow/my_auto_follow_pattern
--------------------------------------------------
// TEST[setup:remote_cluster]
The API returns the following result:
[source,console-result]
--------------------------------------------------
{
"patterns": [
{
"name": "my_auto_follow_pattern",
"pattern": {
"active": true,
"remote_cluster" : "remote_cluster",
"leader_index_patterns" :
[
"leader_index*"
],
"leader_index_exclusion_patterns":
[
"leader_index_001"
],
"follow_index_pattern" : "{{leader_index}}-follower"
}
}
]
}
--------------------------------------------------