I am running localstack with ElasticSearch latest version which is 7.7.0
currently and when create a data stream I am getting and error.
"error" : "Incorrect HTTP method for uri [/_index_template/my-datastream?pretty] and method [PUT], allowed: [POST]",
Here is the curl (mappings are replaced with dotes to keep it simple):
curl -X PUT "localhost:4571/_index_template/my-datastream?pretty" -H 'Content-Type: application/json' -d'
{
"index_patterns": [
"audit-datastream*"
],
"template": {
"settings": {
"index": {
"lifecycle": {
"name": "my-policy"
},
"number_of_shards": "3",
"number_of_replicas": "1"
}
},
"mappings": {
"dynamic_templates": [
{
.....
}
]
}
},
"priority": 500,
"version": 1,
"data_stream": {}
}
'
CodePudding user response:
datastreams were added in 7.9 - https://www.elastic.co/guide/en/elasticsearch/reference/7.9/data-streams.html
ps - it's Elasticsearch, not ElasticSearch ;)