File tree Expand file tree Collapse file tree 3 files changed +72
-1
lines changed
docs/rest_apis/data_stream_apis Expand file tree Collapse file tree 3 files changed +72
-1
lines changed Original file line number Diff line number Diff line change @@ -920,6 +920,7 @@ npm run docs:dev
920
920
- :heavy_check_mark : 迁移数据流 [ :link : ] ( https://elasticsearch.bookhub.tech/rest_apis/data_stream_apis/migrate_to_data_stream )
921
921
- :heavy_check_mark : 数据流统计 [ :link : ] ( https://elasticsearch.bookhub.tech/rest_apis/data_stream_apis/data_stream_stats )
922
922
- :heavy_check_mark : 推广数据流 [ :link : ] ( https://elasticsearch.bookhub.tech/rest_apis/data_stream_apis/promote_data_stream )
923
+ - :heavy_check_mark : 修改数据流 [ :link : ] ( https://elasticsearch.bookhub.tech/rest_apis/data_stream_apis/modify_data_stream )
923
924
- :heavy_check_mark : 文档 API [ :link : ] ( https://elasticsearch.bookhub.tech/rest_apis/document_apis/ )
924
925
- :heavy_check_mark : 读写 API [ :link : ] ( https://elasticsearch.bookhub.tech/rest_apis/document_apis/replication )
925
926
- :heavy_check_mark : 索引 API [ :link : ] ( https://elasticsearch.bookhub.tech/rest_apis/document_apis/docs_index )
Original file line number Diff line number Diff line change
1
+ # 修改数据流 API
2
+
3
+ 在单个原子操作中执行一个或多个[ 数据流] ( /data_streams ) 修改操作。
4
+
5
+ ``` bash
6
+ POST _data_stream/_modify
7
+ {
8
+ " actions" : [
9
+ {
10
+ " remove_backing_index" : {
11
+ " data_stream" : " my-logs" ,
12
+ " index" : " .ds-my-logs-2099.01.01-000001"
13
+ }
14
+ },
15
+ {
16
+ " add_backing_index" : {
17
+ " data_stream" : " my-logs" ,
18
+ " index" : " index-to-add"
19
+ }
20
+ }
21
+ ]
22
+ }
23
+ ```
24
+
25
+ ## 请求
26
+
27
+ ` POST /_data_stream/_modify `
28
+
29
+ ## 请求体
30
+
31
+ - ` actions `
32
+
33
+ (必填,对象数组)要执行的操作。
34
+
35
+ - ` actions ` 对象属性
36
+
37
+ - `<action>`
38
+
39
+ (必填,对象)键是操作类型。至少需要一个操作。
40
+
41
+ - 有效的 `<action>` 键
42
+
43
+ - `add_backing_index`
44
+
45
+ 添加现有索引作为数据流的后备索引。作为该操作的一部分,索引将被隐藏。
46
+
47
+ :::warning 警告
48
+ 使用 add_backing_index 操作添加索引可能会导致不当的数据流行为。这应该被视为专家级 API。
49
+ :::
50
+
51
+
52
+ - `remove_backing_index`
53
+
54
+ 从数据流中删除一个后备索引。作为该操作的一部分,索引将被取消隐藏。不能删除数据流的写索引。
55
+
56
+ - `<action>` 属性(对象主体包含的操作选项)
57
+
58
+ - `data_stream`
59
+
60
+ (必需*,字符串) 操作所针对的数据流。
61
+
62
+ - `index`
63
+
64
+ (必需*,字符串)操作索引。
65
+
66
+
67
+
68
+
69
+ > [ 原文链接] ( https://www.elastic.co/guide/en/elasticsearch/reference/current/modify-data-streams-api.html )
Original file line number Diff line number Diff line change @@ -161,7 +161,8 @@ const sidebars = {
161
161
'rest_apis/data_stream_apis/get_data_stream' ,
162
162
'rest_apis/data_stream_apis/migrate_to_data_stream' ,
163
163
'rest_apis/data_stream_apis/data_stream_stats' ,
164
- 'rest_apis/data_stream_apis/promote_data_stream'
164
+ 'rest_apis/data_stream_apis/promote_data_stream' ,
165
+ 'rest_apis/data_stream_apis/modify_data_stream'
165
166
]
166
167
} ,
167
168
{
You can’t perform that action at this time.
0 commit comments