@@ -33,6 +33,7 @@ async def delete_policy(
33
33
error_trace : t .Optional [bool ] = None ,
34
34
filter_path : t .Optional [t .Union [str , t .Sequence [str ]]] = None ,
35
35
human : t .Optional [bool ] = None ,
36
+ master_timeout : t .Optional [t .Union [str , t .Literal [- 1 ], t .Literal [0 ]]] = None ,
36
37
pretty : t .Optional [bool ] = None ,
37
38
) -> ObjectApiResponse [t .Any ]:
38
39
"""
@@ -41,6 +42,7 @@ async def delete_policy(
41
42
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-enrich-policy-api.html>`_
42
43
43
44
:param name: Enrich policy to delete.
45
+ :param master_timeout: Period to wait for a connection to the master node.
44
46
"""
45
47
if name in SKIP_IN_PATH :
46
48
raise ValueError ("Empty value passed for parameter 'name'" )
@@ -53,6 +55,8 @@ async def delete_policy(
53
55
__query ["filter_path" ] = filter_path
54
56
if human is not None :
55
57
__query ["human" ] = human
58
+ if master_timeout is not None :
59
+ __query ["master_timeout" ] = master_timeout
56
60
if pretty is not None :
57
61
__query ["pretty" ] = pretty
58
62
__headers = {"accept" : "application/json" }
@@ -73,6 +77,7 @@ async def execute_policy(
73
77
error_trace : t .Optional [bool ] = None ,
74
78
filter_path : t .Optional [t .Union [str , t .Sequence [str ]]] = None ,
75
79
human : t .Optional [bool ] = None ,
80
+ master_timeout : t .Optional [t .Union [str , t .Literal [- 1 ], t .Literal [0 ]]] = None ,
76
81
pretty : t .Optional [bool ] = None ,
77
82
wait_for_completion : t .Optional [bool ] = None ,
78
83
) -> ObjectApiResponse [t .Any ]:
@@ -82,6 +87,7 @@ async def execute_policy(
82
87
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/execute-enrich-policy-api.html>`_
83
88
84
89
:param name: Enrich policy to execute.
90
+ :param master_timeout: Period to wait for a connection to the master node.
85
91
:param wait_for_completion: If `true`, the request blocks other enrich policy
86
92
execution requests until complete.
87
93
"""
@@ -96,6 +102,8 @@ async def execute_policy(
96
102
__query ["filter_path" ] = filter_path
97
103
if human is not None :
98
104
__query ["human" ] = human
105
+ if master_timeout is not None :
106
+ __query ["master_timeout" ] = master_timeout
99
107
if pretty is not None :
100
108
__query ["pretty" ] = pretty
101
109
if wait_for_completion is not None :
@@ -118,6 +126,7 @@ async def get_policy(
118
126
error_trace : t .Optional [bool ] = None ,
119
127
filter_path : t .Optional [t .Union [str , t .Sequence [str ]]] = None ,
120
128
human : t .Optional [bool ] = None ,
129
+ master_timeout : t .Optional [t .Union [str , t .Literal [- 1 ], t .Literal [0 ]]] = None ,
121
130
pretty : t .Optional [bool ] = None ,
122
131
) -> ObjectApiResponse [t .Any ]:
123
132
"""
@@ -127,6 +136,7 @@ async def get_policy(
127
136
128
137
:param name: Comma-separated list of enrich policy names used to limit the request.
129
138
To return information for all enrich policies, omit this parameter.
139
+ :param master_timeout: Period to wait for a connection to the master node.
130
140
"""
131
141
__path_parts : t .Dict [str , str ]
132
142
if name not in SKIP_IN_PATH :
@@ -142,6 +152,8 @@ async def get_policy(
142
152
__query ["filter_path" ] = filter_path
143
153
if human is not None :
144
154
__query ["human" ] = human
155
+ if master_timeout is not None :
156
+ __query ["master_timeout" ] = master_timeout
145
157
if pretty is not None :
146
158
__query ["pretty" ] = pretty
147
159
__headers = {"accept" : "application/json" }
@@ -165,6 +177,7 @@ async def put_policy(
165
177
filter_path : t .Optional [t .Union [str , t .Sequence [str ]]] = None ,
166
178
geo_match : t .Optional [t .Mapping [str , t .Any ]] = None ,
167
179
human : t .Optional [bool ] = None ,
180
+ master_timeout : t .Optional [t .Union [str , t .Literal [- 1 ], t .Literal [0 ]]] = None ,
168
181
match : t .Optional [t .Mapping [str , t .Any ]] = None ,
169
182
pretty : t .Optional [bool ] = None ,
170
183
range : t .Optional [t .Mapping [str , t .Any ]] = None ,
@@ -178,6 +191,7 @@ async def put_policy(
178
191
:param name: Name of the enrich policy to create or update.
179
192
:param geo_match: Matches enrich data to incoming documents based on a `geo_shape`
180
193
query.
194
+ :param master_timeout: Period to wait for a connection to the master node.
181
195
:param match: Matches enrich data to incoming documents based on a `term` query.
182
196
:param range: Matches a number, date, or IP address in incoming documents to
183
197
a range in the enrich index based on a `term` query.
@@ -194,6 +208,8 @@ async def put_policy(
194
208
__query ["filter_path" ] = filter_path
195
209
if human is not None :
196
210
__query ["human" ] = human
211
+ if master_timeout is not None :
212
+ __query ["master_timeout" ] = master_timeout
197
213
if pretty is not None :
198
214
__query ["pretty" ] = pretty
199
215
if not __body :
0 commit comments