Get auto-follow patterns
Generally available; Added in 6.5.0
Get cross-cluster replication auto-follow patterns.
Required authorization
- Cluster privileges:
manage_ccr
Query parameters
-
master_timeout
string The period to wait for a connection to the master node. If the master node is not available before the timeout expires, the request fails and returns an error. It can also be set to
-1
to indicate that the request should never timeout.Values are
-1
or0
.
GET
/_ccr/auto_follow
Console
GET /_ccr/auto_follow/my_auto_follow_pattern
resp = client.ccr.get_auto_follow_pattern(
name="my_auto_follow_pattern",
)
const response = await client.ccr.getAutoFollowPattern({
name: "my_auto_follow_pattern",
});
response = client.ccr.get_auto_follow_pattern(
name: "my_auto_follow_pattern"
)
$resp = $client->ccr()->getAutoFollowPattern([
"name" => "my_auto_follow_pattern",
]);
curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_ccr/auto_follow/my_auto_follow_pattern"
Response examples (200)
A successful response from `GET /_ccr/auto_follow/my_auto_follow_pattern`, which gets auto-follow patterns.
{
"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"
}
}
]
}