elasticsearch 8.13.2__py3-none-any.whl → 8.15.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- elasticsearch/_async/client/__init__.py +204 -169
- elasticsearch/_async/client/async_search.py +35 -20
- elasticsearch/_async/client/autoscaling.py +4 -4
- elasticsearch/_async/client/cat.py +785 -180
- elasticsearch/_async/client/ccr.py +20 -32
- elasticsearch/_async/client/cluster.py +94 -88
- elasticsearch/_async/client/connector.py +1470 -0
- elasticsearch/_async/client/dangling_indices.py +7 -11
- elasticsearch/_async/client/enrich.py +8 -8
- elasticsearch/_async/client/eql.py +17 -16
- elasticsearch/_async/client/esql.py +2 -2
- elasticsearch/_async/client/features.py +2 -2
- elasticsearch/_async/client/fleet.py +18 -17
- elasticsearch/_async/client/graph.py +4 -4
- elasticsearch/_async/client/ilm.py +36 -44
- elasticsearch/_async/client/indices.py +401 -411
- elasticsearch/_async/client/inference.py +65 -39
- elasticsearch/_async/client/ingest.py +22 -23
- elasticsearch/_async/client/license.py +18 -10
- elasticsearch/_async/client/logstash.py +6 -6
- elasticsearch/_async/client/migration.py +3 -3
- elasticsearch/_async/client/ml.py +383 -176
- elasticsearch/_async/client/monitoring.py +2 -2
- elasticsearch/_async/client/nodes.py +32 -32
- elasticsearch/_async/client/query_rules.py +384 -0
- elasticsearch/_async/client/rollup.py +13 -13
- elasticsearch/_async/client/search_application.py +15 -10
- elasticsearch/_async/client/searchable_snapshots.py +9 -13
- elasticsearch/_async/client/security.py +587 -104
- elasticsearch/_async/client/shutdown.py +7 -7
- elasticsearch/_async/client/slm.py +11 -13
- elasticsearch/_async/client/snapshot.py +39 -52
- elasticsearch/_async/client/sql.py +12 -14
- elasticsearch/_async/client/ssl.py +1 -1
- elasticsearch/_async/client/synonyms.py +8 -8
- elasticsearch/_async/client/tasks.py +9 -10
- elasticsearch/_async/client/text_structure.py +3 -3
- elasticsearch/_async/client/transform.py +89 -34
- elasticsearch/_async/client/watcher.py +30 -15
- elasticsearch/_async/client/xpack.py +6 -7
- elasticsearch/_otel.py +2 -6
- elasticsearch/_sync/client/__init__.py +204 -169
- elasticsearch/_sync/client/async_search.py +35 -20
- elasticsearch/_sync/client/autoscaling.py +4 -4
- elasticsearch/_sync/client/cat.py +785 -180
- elasticsearch/_sync/client/ccr.py +20 -32
- elasticsearch/_sync/client/cluster.py +94 -88
- elasticsearch/_sync/client/connector.py +1470 -0
- elasticsearch/_sync/client/dangling_indices.py +7 -11
- elasticsearch/_sync/client/enrich.py +8 -8
- elasticsearch/_sync/client/eql.py +17 -16
- elasticsearch/_sync/client/esql.py +2 -2
- elasticsearch/_sync/client/features.py +2 -2
- elasticsearch/_sync/client/fleet.py +18 -17
- elasticsearch/_sync/client/graph.py +4 -4
- elasticsearch/_sync/client/ilm.py +36 -44
- elasticsearch/_sync/client/indices.py +401 -411
- elasticsearch/_sync/client/inference.py +65 -39
- elasticsearch/_sync/client/ingest.py +22 -23
- elasticsearch/_sync/client/license.py +18 -10
- elasticsearch/_sync/client/logstash.py +6 -6
- elasticsearch/_sync/client/migration.py +3 -3
- elasticsearch/_sync/client/ml.py +383 -176
- elasticsearch/_sync/client/monitoring.py +2 -2
- elasticsearch/_sync/client/nodes.py +32 -32
- elasticsearch/_sync/client/query_rules.py +384 -0
- elasticsearch/_sync/client/rollup.py +13 -13
- elasticsearch/_sync/client/search_application.py +15 -10
- elasticsearch/_sync/client/searchable_snapshots.py +9 -13
- elasticsearch/_sync/client/security.py +587 -104
- elasticsearch/_sync/client/shutdown.py +7 -7
- elasticsearch/_sync/client/slm.py +11 -13
- elasticsearch/_sync/client/snapshot.py +39 -52
- elasticsearch/_sync/client/sql.py +12 -14
- elasticsearch/_sync/client/ssl.py +1 -1
- elasticsearch/_sync/client/synonyms.py +8 -8
- elasticsearch/_sync/client/tasks.py +9 -10
- elasticsearch/_sync/client/text_structure.py +3 -3
- elasticsearch/_sync/client/transform.py +89 -34
- elasticsearch/_sync/client/watcher.py +30 -15
- elasticsearch/_sync/client/xpack.py +6 -7
- elasticsearch/_version.py +1 -1
- elasticsearch/client.py +3 -3
- elasticsearch/helpers/vectorstore/_async/vectorstore.py +36 -6
- elasticsearch/helpers/vectorstore/_sync/vectorstore.py +36 -6
- elasticsearch/serializer.py +34 -1
- elasticsearch-8.15.0.dist-info/METADATA +177 -0
- elasticsearch-8.15.0.dist-info/RECORD +117 -0
- {elasticsearch-8.13.2.dist-info → elasticsearch-8.15.0.dist-info}/WHEEL +1 -2
- elasticsearch/_async/client/query_ruleset.py +0 -205
- elasticsearch/_sync/client/query_ruleset.py +0 -205
- elasticsearch-8.13.2.dist-info/METADATA +0 -147
- elasticsearch-8.13.2.dist-info/RECORD +0 -116
- elasticsearch-8.13.2.dist-info/top_level.txt +0 -1
- {elasticsearch-8.13.2.dist-info → elasticsearch-8.15.0.dist-info/licenses}/LICENSE +0 -0
- {elasticsearch-8.13.2.dist-info → elasticsearch-8.15.0.dist-info/licenses}/NOTICE +0 -0
|
@@ -0,0 +1,1470 @@
|
|
|
1
|
+
# Licensed to Elasticsearch B.V. under one or more contributor
|
|
2
|
+
# license agreements. See the NOTICE file distributed with
|
|
3
|
+
# this work for additional information regarding copyright
|
|
4
|
+
# ownership. Elasticsearch B.V. licenses this file to you under
|
|
5
|
+
# the Apache License, Version 2.0 (the "License"); you may
|
|
6
|
+
# not use this file except in compliance with the License.
|
|
7
|
+
# You may obtain a copy of the License at
|
|
8
|
+
#
|
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
#
|
|
11
|
+
# Unless required by applicable law or agreed to in writing,
|
|
12
|
+
# software distributed under the License is distributed on an
|
|
13
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
+
# KIND, either express or implied. See the License for the
|
|
15
|
+
# specific language governing permissions and limitations
|
|
16
|
+
# under the License.
|
|
17
|
+
|
|
18
|
+
import typing as t
|
|
19
|
+
|
|
20
|
+
from elastic_transport import ObjectApiResponse
|
|
21
|
+
|
|
22
|
+
from ._base import NamespacedClient
|
|
23
|
+
from .utils import SKIP_IN_PATH, _quote, _rewrite_parameters
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class ConnectorClient(NamespacedClient):
|
|
27
|
+
|
|
28
|
+
@_rewrite_parameters()
|
|
29
|
+
async def check_in(
|
|
30
|
+
self,
|
|
31
|
+
*,
|
|
32
|
+
connector_id: str,
|
|
33
|
+
error_trace: t.Optional[bool] = None,
|
|
34
|
+
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
35
|
+
human: t.Optional[bool] = None,
|
|
36
|
+
pretty: t.Optional[bool] = None,
|
|
37
|
+
) -> ObjectApiResponse[t.Any]:
|
|
38
|
+
"""
|
|
39
|
+
Updates the last_seen field in the connector, and sets it to current timestamp
|
|
40
|
+
|
|
41
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/check-in-connector-api.html>`_
|
|
42
|
+
|
|
43
|
+
:param connector_id: The unique identifier of the connector to be checked in
|
|
44
|
+
"""
|
|
45
|
+
if connector_id in SKIP_IN_PATH:
|
|
46
|
+
raise ValueError("Empty value passed for parameter 'connector_id'")
|
|
47
|
+
__path_parts: t.Dict[str, str] = {"connector_id": _quote(connector_id)}
|
|
48
|
+
__path = f'/_connector/{__path_parts["connector_id"]}/_check_in'
|
|
49
|
+
__query: t.Dict[str, t.Any] = {}
|
|
50
|
+
if error_trace is not None:
|
|
51
|
+
__query["error_trace"] = error_trace
|
|
52
|
+
if filter_path is not None:
|
|
53
|
+
__query["filter_path"] = filter_path
|
|
54
|
+
if human is not None:
|
|
55
|
+
__query["human"] = human
|
|
56
|
+
if pretty is not None:
|
|
57
|
+
__query["pretty"] = pretty
|
|
58
|
+
__headers = {"accept": "application/json"}
|
|
59
|
+
return await self.perform_request( # type: ignore[return-value]
|
|
60
|
+
"PUT",
|
|
61
|
+
__path,
|
|
62
|
+
params=__query,
|
|
63
|
+
headers=__headers,
|
|
64
|
+
endpoint_id="connector.check_in",
|
|
65
|
+
path_parts=__path_parts,
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
@_rewrite_parameters()
|
|
69
|
+
async def delete(
|
|
70
|
+
self,
|
|
71
|
+
*,
|
|
72
|
+
connector_id: str,
|
|
73
|
+
delete_sync_jobs: t.Optional[bool] = None,
|
|
74
|
+
error_trace: t.Optional[bool] = None,
|
|
75
|
+
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
76
|
+
human: t.Optional[bool] = None,
|
|
77
|
+
pretty: t.Optional[bool] = None,
|
|
78
|
+
) -> ObjectApiResponse[t.Any]:
|
|
79
|
+
"""
|
|
80
|
+
Deletes a connector.
|
|
81
|
+
|
|
82
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/delete-connector-api.html>`_
|
|
83
|
+
|
|
84
|
+
:param connector_id: The unique identifier of the connector to be deleted
|
|
85
|
+
:param delete_sync_jobs: A flag indicating if associated sync jobs should be
|
|
86
|
+
also removed. Defaults to false.
|
|
87
|
+
"""
|
|
88
|
+
if connector_id in SKIP_IN_PATH:
|
|
89
|
+
raise ValueError("Empty value passed for parameter 'connector_id'")
|
|
90
|
+
__path_parts: t.Dict[str, str] = {"connector_id": _quote(connector_id)}
|
|
91
|
+
__path = f'/_connector/{__path_parts["connector_id"]}'
|
|
92
|
+
__query: t.Dict[str, t.Any] = {}
|
|
93
|
+
if delete_sync_jobs is not None:
|
|
94
|
+
__query["delete_sync_jobs"] = delete_sync_jobs
|
|
95
|
+
if error_trace is not None:
|
|
96
|
+
__query["error_trace"] = error_trace
|
|
97
|
+
if filter_path is not None:
|
|
98
|
+
__query["filter_path"] = filter_path
|
|
99
|
+
if human is not None:
|
|
100
|
+
__query["human"] = human
|
|
101
|
+
if pretty is not None:
|
|
102
|
+
__query["pretty"] = pretty
|
|
103
|
+
__headers = {"accept": "application/json"}
|
|
104
|
+
return await self.perform_request( # type: ignore[return-value]
|
|
105
|
+
"DELETE",
|
|
106
|
+
__path,
|
|
107
|
+
params=__query,
|
|
108
|
+
headers=__headers,
|
|
109
|
+
endpoint_id="connector.delete",
|
|
110
|
+
path_parts=__path_parts,
|
|
111
|
+
)
|
|
112
|
+
|
|
113
|
+
@_rewrite_parameters()
|
|
114
|
+
async def get(
|
|
115
|
+
self,
|
|
116
|
+
*,
|
|
117
|
+
connector_id: str,
|
|
118
|
+
error_trace: t.Optional[bool] = None,
|
|
119
|
+
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
120
|
+
human: t.Optional[bool] = None,
|
|
121
|
+
pretty: t.Optional[bool] = None,
|
|
122
|
+
) -> ObjectApiResponse[t.Any]:
|
|
123
|
+
"""
|
|
124
|
+
Retrieves a connector.
|
|
125
|
+
|
|
126
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/get-connector-api.html>`_
|
|
127
|
+
|
|
128
|
+
:param connector_id: The unique identifier of the connector
|
|
129
|
+
"""
|
|
130
|
+
if connector_id in SKIP_IN_PATH:
|
|
131
|
+
raise ValueError("Empty value passed for parameter 'connector_id'")
|
|
132
|
+
__path_parts: t.Dict[str, str] = {"connector_id": _quote(connector_id)}
|
|
133
|
+
__path = f'/_connector/{__path_parts["connector_id"]}'
|
|
134
|
+
__query: t.Dict[str, t.Any] = {}
|
|
135
|
+
if error_trace is not None:
|
|
136
|
+
__query["error_trace"] = error_trace
|
|
137
|
+
if filter_path is not None:
|
|
138
|
+
__query["filter_path"] = filter_path
|
|
139
|
+
if human is not None:
|
|
140
|
+
__query["human"] = human
|
|
141
|
+
if pretty is not None:
|
|
142
|
+
__query["pretty"] = pretty
|
|
143
|
+
__headers = {"accept": "application/json"}
|
|
144
|
+
return await self.perform_request( # type: ignore[return-value]
|
|
145
|
+
"GET",
|
|
146
|
+
__path,
|
|
147
|
+
params=__query,
|
|
148
|
+
headers=__headers,
|
|
149
|
+
endpoint_id="connector.get",
|
|
150
|
+
path_parts=__path_parts,
|
|
151
|
+
)
|
|
152
|
+
|
|
153
|
+
@_rewrite_parameters(
|
|
154
|
+
body_fields=(
|
|
155
|
+
"last_access_control_sync_error",
|
|
156
|
+
"last_access_control_sync_scheduled_at",
|
|
157
|
+
"last_access_control_sync_status",
|
|
158
|
+
"last_deleted_document_count",
|
|
159
|
+
"last_incremental_sync_scheduled_at",
|
|
160
|
+
"last_indexed_document_count",
|
|
161
|
+
"last_seen",
|
|
162
|
+
"last_sync_error",
|
|
163
|
+
"last_sync_scheduled_at",
|
|
164
|
+
"last_sync_status",
|
|
165
|
+
"last_synced",
|
|
166
|
+
"sync_cursor",
|
|
167
|
+
),
|
|
168
|
+
)
|
|
169
|
+
async def last_sync(
|
|
170
|
+
self,
|
|
171
|
+
*,
|
|
172
|
+
connector_id: str,
|
|
173
|
+
error_trace: t.Optional[bool] = None,
|
|
174
|
+
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
175
|
+
human: t.Optional[bool] = None,
|
|
176
|
+
last_access_control_sync_error: t.Optional[str] = None,
|
|
177
|
+
last_access_control_sync_scheduled_at: t.Optional[t.Union[str, t.Any]] = None,
|
|
178
|
+
last_access_control_sync_status: t.Optional[
|
|
179
|
+
t.Union[
|
|
180
|
+
str,
|
|
181
|
+
t.Literal[
|
|
182
|
+
"canceled",
|
|
183
|
+
"canceling",
|
|
184
|
+
"completed",
|
|
185
|
+
"error",
|
|
186
|
+
"in_progress",
|
|
187
|
+
"pending",
|
|
188
|
+
"suspended",
|
|
189
|
+
],
|
|
190
|
+
]
|
|
191
|
+
] = None,
|
|
192
|
+
last_deleted_document_count: t.Optional[int] = None,
|
|
193
|
+
last_incremental_sync_scheduled_at: t.Optional[t.Union[str, t.Any]] = None,
|
|
194
|
+
last_indexed_document_count: t.Optional[int] = None,
|
|
195
|
+
last_seen: t.Optional[t.Union[str, t.Any]] = None,
|
|
196
|
+
last_sync_error: t.Optional[str] = None,
|
|
197
|
+
last_sync_scheduled_at: t.Optional[t.Union[str, t.Any]] = None,
|
|
198
|
+
last_sync_status: t.Optional[
|
|
199
|
+
t.Union[
|
|
200
|
+
str,
|
|
201
|
+
t.Literal[
|
|
202
|
+
"canceled",
|
|
203
|
+
"canceling",
|
|
204
|
+
"completed",
|
|
205
|
+
"error",
|
|
206
|
+
"in_progress",
|
|
207
|
+
"pending",
|
|
208
|
+
"suspended",
|
|
209
|
+
],
|
|
210
|
+
]
|
|
211
|
+
] = None,
|
|
212
|
+
last_synced: t.Optional[t.Union[str, t.Any]] = None,
|
|
213
|
+
pretty: t.Optional[bool] = None,
|
|
214
|
+
sync_cursor: t.Optional[t.Any] = None,
|
|
215
|
+
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
216
|
+
) -> ObjectApiResponse[t.Any]:
|
|
217
|
+
"""
|
|
218
|
+
Updates last sync stats in the connector document
|
|
219
|
+
|
|
220
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/update-connector-last-sync-api.html>`_
|
|
221
|
+
|
|
222
|
+
:param connector_id: The unique identifier of the connector to be updated
|
|
223
|
+
:param last_access_control_sync_error:
|
|
224
|
+
:param last_access_control_sync_scheduled_at:
|
|
225
|
+
:param last_access_control_sync_status:
|
|
226
|
+
:param last_deleted_document_count:
|
|
227
|
+
:param last_incremental_sync_scheduled_at:
|
|
228
|
+
:param last_indexed_document_count:
|
|
229
|
+
:param last_seen:
|
|
230
|
+
:param last_sync_error:
|
|
231
|
+
:param last_sync_scheduled_at:
|
|
232
|
+
:param last_sync_status:
|
|
233
|
+
:param last_synced:
|
|
234
|
+
:param sync_cursor:
|
|
235
|
+
"""
|
|
236
|
+
if connector_id in SKIP_IN_PATH:
|
|
237
|
+
raise ValueError("Empty value passed for parameter 'connector_id'")
|
|
238
|
+
__path_parts: t.Dict[str, str] = {"connector_id": _quote(connector_id)}
|
|
239
|
+
__path = f'/_connector/{__path_parts["connector_id"]}/_last_sync'
|
|
240
|
+
__query: t.Dict[str, t.Any] = {}
|
|
241
|
+
__body: t.Dict[str, t.Any] = body if body is not None else {}
|
|
242
|
+
if error_trace is not None:
|
|
243
|
+
__query["error_trace"] = error_trace
|
|
244
|
+
if filter_path is not None:
|
|
245
|
+
__query["filter_path"] = filter_path
|
|
246
|
+
if human is not None:
|
|
247
|
+
__query["human"] = human
|
|
248
|
+
if pretty is not None:
|
|
249
|
+
__query["pretty"] = pretty
|
|
250
|
+
if not __body:
|
|
251
|
+
if last_access_control_sync_error is not None:
|
|
252
|
+
__body["last_access_control_sync_error"] = (
|
|
253
|
+
last_access_control_sync_error
|
|
254
|
+
)
|
|
255
|
+
if last_access_control_sync_scheduled_at is not None:
|
|
256
|
+
__body["last_access_control_sync_scheduled_at"] = (
|
|
257
|
+
last_access_control_sync_scheduled_at
|
|
258
|
+
)
|
|
259
|
+
if last_access_control_sync_status is not None:
|
|
260
|
+
__body["last_access_control_sync_status"] = (
|
|
261
|
+
last_access_control_sync_status
|
|
262
|
+
)
|
|
263
|
+
if last_deleted_document_count is not None:
|
|
264
|
+
__body["last_deleted_document_count"] = last_deleted_document_count
|
|
265
|
+
if last_incremental_sync_scheduled_at is not None:
|
|
266
|
+
__body["last_incremental_sync_scheduled_at"] = (
|
|
267
|
+
last_incremental_sync_scheduled_at
|
|
268
|
+
)
|
|
269
|
+
if last_indexed_document_count is not None:
|
|
270
|
+
__body["last_indexed_document_count"] = last_indexed_document_count
|
|
271
|
+
if last_seen is not None:
|
|
272
|
+
__body["last_seen"] = last_seen
|
|
273
|
+
if last_sync_error is not None:
|
|
274
|
+
__body["last_sync_error"] = last_sync_error
|
|
275
|
+
if last_sync_scheduled_at is not None:
|
|
276
|
+
__body["last_sync_scheduled_at"] = last_sync_scheduled_at
|
|
277
|
+
if last_sync_status is not None:
|
|
278
|
+
__body["last_sync_status"] = last_sync_status
|
|
279
|
+
if last_synced is not None:
|
|
280
|
+
__body["last_synced"] = last_synced
|
|
281
|
+
if sync_cursor is not None:
|
|
282
|
+
__body["sync_cursor"] = sync_cursor
|
|
283
|
+
__headers = {"accept": "application/json", "content-type": "application/json"}
|
|
284
|
+
return await self.perform_request( # type: ignore[return-value]
|
|
285
|
+
"PUT",
|
|
286
|
+
__path,
|
|
287
|
+
params=__query,
|
|
288
|
+
headers=__headers,
|
|
289
|
+
body=__body,
|
|
290
|
+
endpoint_id="connector.last_sync",
|
|
291
|
+
path_parts=__path_parts,
|
|
292
|
+
)
|
|
293
|
+
|
|
294
|
+
@_rewrite_parameters(
|
|
295
|
+
parameter_aliases={"from": "from_"},
|
|
296
|
+
)
|
|
297
|
+
async def list(
|
|
298
|
+
self,
|
|
299
|
+
*,
|
|
300
|
+
connector_name: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
301
|
+
error_trace: t.Optional[bool] = None,
|
|
302
|
+
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
303
|
+
from_: t.Optional[int] = None,
|
|
304
|
+
human: t.Optional[bool] = None,
|
|
305
|
+
index_name: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
306
|
+
pretty: t.Optional[bool] = None,
|
|
307
|
+
query: t.Optional[str] = None,
|
|
308
|
+
service_type: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
309
|
+
size: t.Optional[int] = None,
|
|
310
|
+
) -> ObjectApiResponse[t.Any]:
|
|
311
|
+
"""
|
|
312
|
+
Returns existing connectors.
|
|
313
|
+
|
|
314
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/list-connector-api.html>`_
|
|
315
|
+
|
|
316
|
+
:param connector_name: A comma-separated list of connector names to fetch connector
|
|
317
|
+
documents for
|
|
318
|
+
:param from_: Starting offset (default: 0)
|
|
319
|
+
:param index_name: A comma-separated list of connector index names to fetch connector
|
|
320
|
+
documents for
|
|
321
|
+
:param query: A wildcard query string that filters connectors with matching name,
|
|
322
|
+
description or index name
|
|
323
|
+
:param service_type: A comma-separated list of connector service types to fetch
|
|
324
|
+
connector documents for
|
|
325
|
+
:param size: Specifies a max number of results to get
|
|
326
|
+
"""
|
|
327
|
+
__path_parts: t.Dict[str, str] = {}
|
|
328
|
+
__path = "/_connector"
|
|
329
|
+
__query: t.Dict[str, t.Any] = {}
|
|
330
|
+
if connector_name is not None:
|
|
331
|
+
__query["connector_name"] = connector_name
|
|
332
|
+
if error_trace is not None:
|
|
333
|
+
__query["error_trace"] = error_trace
|
|
334
|
+
if filter_path is not None:
|
|
335
|
+
__query["filter_path"] = filter_path
|
|
336
|
+
if from_ is not None:
|
|
337
|
+
__query["from"] = from_
|
|
338
|
+
if human is not None:
|
|
339
|
+
__query["human"] = human
|
|
340
|
+
if index_name is not None:
|
|
341
|
+
__query["index_name"] = index_name
|
|
342
|
+
if pretty is not None:
|
|
343
|
+
__query["pretty"] = pretty
|
|
344
|
+
if query is not None:
|
|
345
|
+
__query["query"] = query
|
|
346
|
+
if service_type is not None:
|
|
347
|
+
__query["service_type"] = service_type
|
|
348
|
+
if size is not None:
|
|
349
|
+
__query["size"] = size
|
|
350
|
+
__headers = {"accept": "application/json"}
|
|
351
|
+
return await self.perform_request( # type: ignore[return-value]
|
|
352
|
+
"GET",
|
|
353
|
+
__path,
|
|
354
|
+
params=__query,
|
|
355
|
+
headers=__headers,
|
|
356
|
+
endpoint_id="connector.list",
|
|
357
|
+
path_parts=__path_parts,
|
|
358
|
+
)
|
|
359
|
+
|
|
360
|
+
@_rewrite_parameters(
|
|
361
|
+
body_fields=(
|
|
362
|
+
"description",
|
|
363
|
+
"index_name",
|
|
364
|
+
"is_native",
|
|
365
|
+
"language",
|
|
366
|
+
"name",
|
|
367
|
+
"service_type",
|
|
368
|
+
),
|
|
369
|
+
)
|
|
370
|
+
async def post(
|
|
371
|
+
self,
|
|
372
|
+
*,
|
|
373
|
+
description: t.Optional[str] = None,
|
|
374
|
+
error_trace: t.Optional[bool] = None,
|
|
375
|
+
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
376
|
+
human: t.Optional[bool] = None,
|
|
377
|
+
index_name: t.Optional[str] = None,
|
|
378
|
+
is_native: t.Optional[bool] = None,
|
|
379
|
+
language: t.Optional[str] = None,
|
|
380
|
+
name: t.Optional[str] = None,
|
|
381
|
+
pretty: t.Optional[bool] = None,
|
|
382
|
+
service_type: t.Optional[str] = None,
|
|
383
|
+
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
384
|
+
) -> ObjectApiResponse[t.Any]:
|
|
385
|
+
"""
|
|
386
|
+
Creates a connector.
|
|
387
|
+
|
|
388
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/create-connector-api.html>`_
|
|
389
|
+
|
|
390
|
+
:param description:
|
|
391
|
+
:param index_name:
|
|
392
|
+
:param is_native:
|
|
393
|
+
:param language:
|
|
394
|
+
:param name:
|
|
395
|
+
:param service_type:
|
|
396
|
+
"""
|
|
397
|
+
__path_parts: t.Dict[str, str] = {}
|
|
398
|
+
__path = "/_connector"
|
|
399
|
+
__query: t.Dict[str, t.Any] = {}
|
|
400
|
+
__body: t.Dict[str, t.Any] = body if body is not None else {}
|
|
401
|
+
if error_trace is not None:
|
|
402
|
+
__query["error_trace"] = error_trace
|
|
403
|
+
if filter_path is not None:
|
|
404
|
+
__query["filter_path"] = filter_path
|
|
405
|
+
if human is not None:
|
|
406
|
+
__query["human"] = human
|
|
407
|
+
if pretty is not None:
|
|
408
|
+
__query["pretty"] = pretty
|
|
409
|
+
if not __body:
|
|
410
|
+
if description is not None:
|
|
411
|
+
__body["description"] = description
|
|
412
|
+
if index_name is not None:
|
|
413
|
+
__body["index_name"] = index_name
|
|
414
|
+
if is_native is not None:
|
|
415
|
+
__body["is_native"] = is_native
|
|
416
|
+
if language is not None:
|
|
417
|
+
__body["language"] = language
|
|
418
|
+
if name is not None:
|
|
419
|
+
__body["name"] = name
|
|
420
|
+
if service_type is not None:
|
|
421
|
+
__body["service_type"] = service_type
|
|
422
|
+
if not __body:
|
|
423
|
+
__body = None # type: ignore[assignment]
|
|
424
|
+
__headers = {"accept": "application/json"}
|
|
425
|
+
if __body is not None:
|
|
426
|
+
__headers["content-type"] = "application/json"
|
|
427
|
+
return await self.perform_request( # type: ignore[return-value]
|
|
428
|
+
"POST",
|
|
429
|
+
__path,
|
|
430
|
+
params=__query,
|
|
431
|
+
headers=__headers,
|
|
432
|
+
body=__body,
|
|
433
|
+
endpoint_id="connector.post",
|
|
434
|
+
path_parts=__path_parts,
|
|
435
|
+
)
|
|
436
|
+
|
|
437
|
+
@_rewrite_parameters(
|
|
438
|
+
body_fields=(
|
|
439
|
+
"description",
|
|
440
|
+
"index_name",
|
|
441
|
+
"is_native",
|
|
442
|
+
"language",
|
|
443
|
+
"name",
|
|
444
|
+
"service_type",
|
|
445
|
+
),
|
|
446
|
+
)
|
|
447
|
+
async def put(
|
|
448
|
+
self,
|
|
449
|
+
*,
|
|
450
|
+
connector_id: t.Optional[str] = None,
|
|
451
|
+
description: t.Optional[str] = None,
|
|
452
|
+
error_trace: t.Optional[bool] = None,
|
|
453
|
+
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
454
|
+
human: t.Optional[bool] = None,
|
|
455
|
+
index_name: t.Optional[str] = None,
|
|
456
|
+
is_native: t.Optional[bool] = None,
|
|
457
|
+
language: t.Optional[str] = None,
|
|
458
|
+
name: t.Optional[str] = None,
|
|
459
|
+
pretty: t.Optional[bool] = None,
|
|
460
|
+
service_type: t.Optional[str] = None,
|
|
461
|
+
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
462
|
+
) -> ObjectApiResponse[t.Any]:
|
|
463
|
+
"""
|
|
464
|
+
Creates or updates a connector.
|
|
465
|
+
|
|
466
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/create-connector-api.html>`_
|
|
467
|
+
|
|
468
|
+
:param connector_id: The unique identifier of the connector to be created or
|
|
469
|
+
updated. ID is auto-generated if not provided.
|
|
470
|
+
:param description:
|
|
471
|
+
:param index_name:
|
|
472
|
+
:param is_native:
|
|
473
|
+
:param language:
|
|
474
|
+
:param name:
|
|
475
|
+
:param service_type:
|
|
476
|
+
"""
|
|
477
|
+
__path_parts: t.Dict[str, str]
|
|
478
|
+
if connector_id not in SKIP_IN_PATH:
|
|
479
|
+
__path_parts = {"connector_id": _quote(connector_id)}
|
|
480
|
+
__path = f'/_connector/{__path_parts["connector_id"]}'
|
|
481
|
+
else:
|
|
482
|
+
__path_parts = {}
|
|
483
|
+
__path = "/_connector"
|
|
484
|
+
__query: t.Dict[str, t.Any] = {}
|
|
485
|
+
__body: t.Dict[str, t.Any] = body if body is not None else {}
|
|
486
|
+
if error_trace is not None:
|
|
487
|
+
__query["error_trace"] = error_trace
|
|
488
|
+
if filter_path is not None:
|
|
489
|
+
__query["filter_path"] = filter_path
|
|
490
|
+
if human is not None:
|
|
491
|
+
__query["human"] = human
|
|
492
|
+
if pretty is not None:
|
|
493
|
+
__query["pretty"] = pretty
|
|
494
|
+
if not __body:
|
|
495
|
+
if description is not None:
|
|
496
|
+
__body["description"] = description
|
|
497
|
+
if index_name is not None:
|
|
498
|
+
__body["index_name"] = index_name
|
|
499
|
+
if is_native is not None:
|
|
500
|
+
__body["is_native"] = is_native
|
|
501
|
+
if language is not None:
|
|
502
|
+
__body["language"] = language
|
|
503
|
+
if name is not None:
|
|
504
|
+
__body["name"] = name
|
|
505
|
+
if service_type is not None:
|
|
506
|
+
__body["service_type"] = service_type
|
|
507
|
+
if not __body:
|
|
508
|
+
__body = None # type: ignore[assignment]
|
|
509
|
+
__headers = {"accept": "application/json"}
|
|
510
|
+
if __body is not None:
|
|
511
|
+
__headers["content-type"] = "application/json"
|
|
512
|
+
return await self.perform_request( # type: ignore[return-value]
|
|
513
|
+
"PUT",
|
|
514
|
+
__path,
|
|
515
|
+
params=__query,
|
|
516
|
+
headers=__headers,
|
|
517
|
+
body=__body,
|
|
518
|
+
endpoint_id="connector.put",
|
|
519
|
+
path_parts=__path_parts,
|
|
520
|
+
)
|
|
521
|
+
|
|
522
|
+
@_rewrite_parameters()
|
|
523
|
+
async def sync_job_cancel(
|
|
524
|
+
self,
|
|
525
|
+
*,
|
|
526
|
+
connector_sync_job_id: str,
|
|
527
|
+
error_trace: t.Optional[bool] = None,
|
|
528
|
+
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
529
|
+
human: t.Optional[bool] = None,
|
|
530
|
+
pretty: t.Optional[bool] = None,
|
|
531
|
+
) -> ObjectApiResponse[t.Any]:
|
|
532
|
+
"""
|
|
533
|
+
Cancels a connector sync job.
|
|
534
|
+
|
|
535
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/cancel-connector-sync-job-api.html>`_
|
|
536
|
+
|
|
537
|
+
:param connector_sync_job_id: The unique identifier of the connector sync job
|
|
538
|
+
"""
|
|
539
|
+
if connector_sync_job_id in SKIP_IN_PATH:
|
|
540
|
+
raise ValueError("Empty value passed for parameter 'connector_sync_job_id'")
|
|
541
|
+
__path_parts: t.Dict[str, str] = {
|
|
542
|
+
"connector_sync_job_id": _quote(connector_sync_job_id)
|
|
543
|
+
}
|
|
544
|
+
__path = (
|
|
545
|
+
f'/_connector/_sync_job/{__path_parts["connector_sync_job_id"]}/_cancel'
|
|
546
|
+
)
|
|
547
|
+
__query: t.Dict[str, t.Any] = {}
|
|
548
|
+
if error_trace is not None:
|
|
549
|
+
__query["error_trace"] = error_trace
|
|
550
|
+
if filter_path is not None:
|
|
551
|
+
__query["filter_path"] = filter_path
|
|
552
|
+
if human is not None:
|
|
553
|
+
__query["human"] = human
|
|
554
|
+
if pretty is not None:
|
|
555
|
+
__query["pretty"] = pretty
|
|
556
|
+
__headers = {"accept": "application/json"}
|
|
557
|
+
return await self.perform_request( # type: ignore[return-value]
|
|
558
|
+
"PUT",
|
|
559
|
+
__path,
|
|
560
|
+
params=__query,
|
|
561
|
+
headers=__headers,
|
|
562
|
+
endpoint_id="connector.sync_job_cancel",
|
|
563
|
+
path_parts=__path_parts,
|
|
564
|
+
)
|
|
565
|
+
|
|
566
|
+
@_rewrite_parameters()
|
|
567
|
+
async def sync_job_delete(
|
|
568
|
+
self,
|
|
569
|
+
*,
|
|
570
|
+
connector_sync_job_id: str,
|
|
571
|
+
error_trace: t.Optional[bool] = None,
|
|
572
|
+
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
573
|
+
human: t.Optional[bool] = None,
|
|
574
|
+
pretty: t.Optional[bool] = None,
|
|
575
|
+
) -> ObjectApiResponse[t.Any]:
|
|
576
|
+
"""
|
|
577
|
+
Deletes a connector sync job.
|
|
578
|
+
|
|
579
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/delete-connector-sync-job-api.html>`_
|
|
580
|
+
|
|
581
|
+
:param connector_sync_job_id: The unique identifier of the connector sync job
|
|
582
|
+
to be deleted
|
|
583
|
+
"""
|
|
584
|
+
if connector_sync_job_id in SKIP_IN_PATH:
|
|
585
|
+
raise ValueError("Empty value passed for parameter 'connector_sync_job_id'")
|
|
586
|
+
__path_parts: t.Dict[str, str] = {
|
|
587
|
+
"connector_sync_job_id": _quote(connector_sync_job_id)
|
|
588
|
+
}
|
|
589
|
+
__path = f'/_connector/_sync_job/{__path_parts["connector_sync_job_id"]}'
|
|
590
|
+
__query: t.Dict[str, t.Any] = {}
|
|
591
|
+
if error_trace is not None:
|
|
592
|
+
__query["error_trace"] = error_trace
|
|
593
|
+
if filter_path is not None:
|
|
594
|
+
__query["filter_path"] = filter_path
|
|
595
|
+
if human is not None:
|
|
596
|
+
__query["human"] = human
|
|
597
|
+
if pretty is not None:
|
|
598
|
+
__query["pretty"] = pretty
|
|
599
|
+
__headers = {"accept": "application/json"}
|
|
600
|
+
return await self.perform_request( # type: ignore[return-value]
|
|
601
|
+
"DELETE",
|
|
602
|
+
__path,
|
|
603
|
+
params=__query,
|
|
604
|
+
headers=__headers,
|
|
605
|
+
endpoint_id="connector.sync_job_delete",
|
|
606
|
+
path_parts=__path_parts,
|
|
607
|
+
)
|
|
608
|
+
|
|
609
|
+
@_rewrite_parameters()
|
|
610
|
+
async def sync_job_get(
|
|
611
|
+
self,
|
|
612
|
+
*,
|
|
613
|
+
connector_sync_job_id: str,
|
|
614
|
+
error_trace: t.Optional[bool] = None,
|
|
615
|
+
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
616
|
+
human: t.Optional[bool] = None,
|
|
617
|
+
pretty: t.Optional[bool] = None,
|
|
618
|
+
) -> ObjectApiResponse[t.Any]:
|
|
619
|
+
"""
|
|
620
|
+
Retrieves a connector sync job.
|
|
621
|
+
|
|
622
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/get-connector-sync-job-api.html>`_
|
|
623
|
+
|
|
624
|
+
:param connector_sync_job_id: The unique identifier of the connector sync job
|
|
625
|
+
"""
|
|
626
|
+
if connector_sync_job_id in SKIP_IN_PATH:
|
|
627
|
+
raise ValueError("Empty value passed for parameter 'connector_sync_job_id'")
|
|
628
|
+
__path_parts: t.Dict[str, str] = {
|
|
629
|
+
"connector_sync_job_id": _quote(connector_sync_job_id)
|
|
630
|
+
}
|
|
631
|
+
__path = f'/_connector/_sync_job/{__path_parts["connector_sync_job_id"]}'
|
|
632
|
+
__query: t.Dict[str, t.Any] = {}
|
|
633
|
+
if error_trace is not None:
|
|
634
|
+
__query["error_trace"] = error_trace
|
|
635
|
+
if filter_path is not None:
|
|
636
|
+
__query["filter_path"] = filter_path
|
|
637
|
+
if human is not None:
|
|
638
|
+
__query["human"] = human
|
|
639
|
+
if pretty is not None:
|
|
640
|
+
__query["pretty"] = pretty
|
|
641
|
+
__headers = {"accept": "application/json"}
|
|
642
|
+
return await self.perform_request( # type: ignore[return-value]
|
|
643
|
+
"GET",
|
|
644
|
+
__path,
|
|
645
|
+
params=__query,
|
|
646
|
+
headers=__headers,
|
|
647
|
+
endpoint_id="connector.sync_job_get",
|
|
648
|
+
path_parts=__path_parts,
|
|
649
|
+
)
|
|
650
|
+
|
|
651
|
+
@_rewrite_parameters(
|
|
652
|
+
parameter_aliases={"from": "from_"},
|
|
653
|
+
)
|
|
654
|
+
async def sync_job_list(
|
|
655
|
+
self,
|
|
656
|
+
*,
|
|
657
|
+
connector_id: t.Optional[str] = None,
|
|
658
|
+
error_trace: t.Optional[bool] = None,
|
|
659
|
+
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
660
|
+
from_: t.Optional[int] = None,
|
|
661
|
+
human: t.Optional[bool] = None,
|
|
662
|
+
job_type: t.Optional[
|
|
663
|
+
t.Union[
|
|
664
|
+
t.Sequence[
|
|
665
|
+
t.Union[str, t.Literal["access_control", "full", "incremental"]]
|
|
666
|
+
],
|
|
667
|
+
t.Union[str, t.Literal["access_control", "full", "incremental"]],
|
|
668
|
+
]
|
|
669
|
+
] = None,
|
|
670
|
+
pretty: t.Optional[bool] = None,
|
|
671
|
+
size: t.Optional[int] = None,
|
|
672
|
+
status: t.Optional[
|
|
673
|
+
t.Union[
|
|
674
|
+
str,
|
|
675
|
+
t.Literal[
|
|
676
|
+
"canceled",
|
|
677
|
+
"canceling",
|
|
678
|
+
"completed",
|
|
679
|
+
"error",
|
|
680
|
+
"in_progress",
|
|
681
|
+
"pending",
|
|
682
|
+
"suspended",
|
|
683
|
+
],
|
|
684
|
+
]
|
|
685
|
+
] = None,
|
|
686
|
+
) -> ObjectApiResponse[t.Any]:
|
|
687
|
+
"""
|
|
688
|
+
Lists connector sync jobs.
|
|
689
|
+
|
|
690
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/list-connector-sync-jobs-api.html>`_
|
|
691
|
+
|
|
692
|
+
:param connector_id: A connector id to fetch connector sync jobs for
|
|
693
|
+
:param from_: Starting offset (default: 0)
|
|
694
|
+
:param job_type: A comma-separated list of job types to fetch the sync jobs for
|
|
695
|
+
:param size: Specifies a max number of results to get
|
|
696
|
+
:param status: A sync job status to fetch connector sync jobs for
|
|
697
|
+
"""
|
|
698
|
+
__path_parts: t.Dict[str, str] = {}
|
|
699
|
+
__path = "/_connector/_sync_job"
|
|
700
|
+
__query: t.Dict[str, t.Any] = {}
|
|
701
|
+
if connector_id is not None:
|
|
702
|
+
__query["connector_id"] = connector_id
|
|
703
|
+
if error_trace is not None:
|
|
704
|
+
__query["error_trace"] = error_trace
|
|
705
|
+
if filter_path is not None:
|
|
706
|
+
__query["filter_path"] = filter_path
|
|
707
|
+
if from_ is not None:
|
|
708
|
+
__query["from"] = from_
|
|
709
|
+
if human is not None:
|
|
710
|
+
__query["human"] = human
|
|
711
|
+
if job_type is not None:
|
|
712
|
+
__query["job_type"] = job_type
|
|
713
|
+
if pretty is not None:
|
|
714
|
+
__query["pretty"] = pretty
|
|
715
|
+
if size is not None:
|
|
716
|
+
__query["size"] = size
|
|
717
|
+
if status is not None:
|
|
718
|
+
__query["status"] = status
|
|
719
|
+
__headers = {"accept": "application/json"}
|
|
720
|
+
return await self.perform_request( # type: ignore[return-value]
|
|
721
|
+
"GET",
|
|
722
|
+
__path,
|
|
723
|
+
params=__query,
|
|
724
|
+
headers=__headers,
|
|
725
|
+
endpoint_id="connector.sync_job_list",
|
|
726
|
+
path_parts=__path_parts,
|
|
727
|
+
)
|
|
728
|
+
|
|
729
|
+
@_rewrite_parameters(
|
|
730
|
+
body_fields=("id", "job_type", "trigger_method"),
|
|
731
|
+
)
|
|
732
|
+
async def sync_job_post(
|
|
733
|
+
self,
|
|
734
|
+
*,
|
|
735
|
+
id: t.Optional[str] = None,
|
|
736
|
+
error_trace: t.Optional[bool] = None,
|
|
737
|
+
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
738
|
+
human: t.Optional[bool] = None,
|
|
739
|
+
job_type: t.Optional[
|
|
740
|
+
t.Union[str, t.Literal["access_control", "full", "incremental"]]
|
|
741
|
+
] = None,
|
|
742
|
+
pretty: t.Optional[bool] = None,
|
|
743
|
+
trigger_method: t.Optional[
|
|
744
|
+
t.Union[str, t.Literal["on_demand", "scheduled"]]
|
|
745
|
+
] = None,
|
|
746
|
+
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
747
|
+
) -> ObjectApiResponse[t.Any]:
|
|
748
|
+
"""
|
|
749
|
+
Creates a connector sync job.
|
|
750
|
+
|
|
751
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/create-connector-sync-job-api.html>`_
|
|
752
|
+
|
|
753
|
+
:param id: The id of the associated connector
|
|
754
|
+
:param job_type:
|
|
755
|
+
:param trigger_method:
|
|
756
|
+
"""
|
|
757
|
+
if id is None and body is None:
|
|
758
|
+
raise ValueError("Empty value passed for parameter 'id'")
|
|
759
|
+
__path_parts: t.Dict[str, str] = {}
|
|
760
|
+
__path = "/_connector/_sync_job"
|
|
761
|
+
__query: t.Dict[str, t.Any] = {}
|
|
762
|
+
__body: t.Dict[str, t.Any] = body if body is not None else {}
|
|
763
|
+
if error_trace is not None:
|
|
764
|
+
__query["error_trace"] = error_trace
|
|
765
|
+
if filter_path is not None:
|
|
766
|
+
__query["filter_path"] = filter_path
|
|
767
|
+
if human is not None:
|
|
768
|
+
__query["human"] = human
|
|
769
|
+
if pretty is not None:
|
|
770
|
+
__query["pretty"] = pretty
|
|
771
|
+
if not __body:
|
|
772
|
+
if id is not None:
|
|
773
|
+
__body["id"] = id
|
|
774
|
+
if job_type is not None:
|
|
775
|
+
__body["job_type"] = job_type
|
|
776
|
+
if trigger_method is not None:
|
|
777
|
+
__body["trigger_method"] = trigger_method
|
|
778
|
+
__headers = {"accept": "application/json", "content-type": "application/json"}
|
|
779
|
+
return await self.perform_request( # type: ignore[return-value]
|
|
780
|
+
"POST",
|
|
781
|
+
__path,
|
|
782
|
+
params=__query,
|
|
783
|
+
headers=__headers,
|
|
784
|
+
body=__body,
|
|
785
|
+
endpoint_id="connector.sync_job_post",
|
|
786
|
+
path_parts=__path_parts,
|
|
787
|
+
)
|
|
788
|
+
|
|
789
|
+
@_rewrite_parameters()
|
|
790
|
+
async def update_active_filtering(
|
|
791
|
+
self,
|
|
792
|
+
*,
|
|
793
|
+
connector_id: str,
|
|
794
|
+
error_trace: t.Optional[bool] = None,
|
|
795
|
+
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
796
|
+
human: t.Optional[bool] = None,
|
|
797
|
+
pretty: t.Optional[bool] = None,
|
|
798
|
+
) -> ObjectApiResponse[t.Any]:
|
|
799
|
+
"""
|
|
800
|
+
Activates the valid draft filtering for a connector.
|
|
801
|
+
|
|
802
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/update-connector-filtering-api.html>`_
|
|
803
|
+
|
|
804
|
+
:param connector_id: The unique identifier of the connector to be updated
|
|
805
|
+
"""
|
|
806
|
+
if connector_id in SKIP_IN_PATH:
|
|
807
|
+
raise ValueError("Empty value passed for parameter 'connector_id'")
|
|
808
|
+
__path_parts: t.Dict[str, str] = {"connector_id": _quote(connector_id)}
|
|
809
|
+
__path = f'/_connector/{__path_parts["connector_id"]}/_filtering/_activate'
|
|
810
|
+
__query: t.Dict[str, t.Any] = {}
|
|
811
|
+
if error_trace is not None:
|
|
812
|
+
__query["error_trace"] = error_trace
|
|
813
|
+
if filter_path is not None:
|
|
814
|
+
__query["filter_path"] = filter_path
|
|
815
|
+
if human is not None:
|
|
816
|
+
__query["human"] = human
|
|
817
|
+
if pretty is not None:
|
|
818
|
+
__query["pretty"] = pretty
|
|
819
|
+
__headers = {"accept": "application/json"}
|
|
820
|
+
return await self.perform_request( # type: ignore[return-value]
|
|
821
|
+
"PUT",
|
|
822
|
+
__path,
|
|
823
|
+
params=__query,
|
|
824
|
+
headers=__headers,
|
|
825
|
+
endpoint_id="connector.update_active_filtering",
|
|
826
|
+
path_parts=__path_parts,
|
|
827
|
+
)
|
|
828
|
+
|
|
829
|
+
@_rewrite_parameters(
|
|
830
|
+
body_fields=("api_key_id", "api_key_secret_id"),
|
|
831
|
+
)
|
|
832
|
+
async def update_api_key_id(
|
|
833
|
+
self,
|
|
834
|
+
*,
|
|
835
|
+
connector_id: str,
|
|
836
|
+
api_key_id: t.Optional[str] = None,
|
|
837
|
+
api_key_secret_id: t.Optional[str] = None,
|
|
838
|
+
error_trace: t.Optional[bool] = None,
|
|
839
|
+
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
840
|
+
human: t.Optional[bool] = None,
|
|
841
|
+
pretty: t.Optional[bool] = None,
|
|
842
|
+
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
843
|
+
) -> ObjectApiResponse[t.Any]:
|
|
844
|
+
"""
|
|
845
|
+
Updates the API key id in the connector document
|
|
846
|
+
|
|
847
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/update-connector-api-key-id-api.html>`_
|
|
848
|
+
|
|
849
|
+
:param connector_id: The unique identifier of the connector to be updated
|
|
850
|
+
:param api_key_id:
|
|
851
|
+
:param api_key_secret_id:
|
|
852
|
+
"""
|
|
853
|
+
if connector_id in SKIP_IN_PATH:
|
|
854
|
+
raise ValueError("Empty value passed for parameter 'connector_id'")
|
|
855
|
+
__path_parts: t.Dict[str, str] = {"connector_id": _quote(connector_id)}
|
|
856
|
+
__path = f'/_connector/{__path_parts["connector_id"]}/_api_key_id'
|
|
857
|
+
__query: t.Dict[str, t.Any] = {}
|
|
858
|
+
__body: t.Dict[str, t.Any] = body if body is not None else {}
|
|
859
|
+
if error_trace is not None:
|
|
860
|
+
__query["error_trace"] = error_trace
|
|
861
|
+
if filter_path is not None:
|
|
862
|
+
__query["filter_path"] = filter_path
|
|
863
|
+
if human is not None:
|
|
864
|
+
__query["human"] = human
|
|
865
|
+
if pretty is not None:
|
|
866
|
+
__query["pretty"] = pretty
|
|
867
|
+
if not __body:
|
|
868
|
+
if api_key_id is not None:
|
|
869
|
+
__body["api_key_id"] = api_key_id
|
|
870
|
+
if api_key_secret_id is not None:
|
|
871
|
+
__body["api_key_secret_id"] = api_key_secret_id
|
|
872
|
+
__headers = {"accept": "application/json", "content-type": "application/json"}
|
|
873
|
+
return await self.perform_request( # type: ignore[return-value]
|
|
874
|
+
"PUT",
|
|
875
|
+
__path,
|
|
876
|
+
params=__query,
|
|
877
|
+
headers=__headers,
|
|
878
|
+
body=__body,
|
|
879
|
+
endpoint_id="connector.update_api_key_id",
|
|
880
|
+
path_parts=__path_parts,
|
|
881
|
+
)
|
|
882
|
+
|
|
883
|
+
@_rewrite_parameters(
|
|
884
|
+
body_fields=("configuration", "values"),
|
|
885
|
+
)
|
|
886
|
+
async def update_configuration(
|
|
887
|
+
self,
|
|
888
|
+
*,
|
|
889
|
+
connector_id: str,
|
|
890
|
+
configuration: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
|
|
891
|
+
error_trace: t.Optional[bool] = None,
|
|
892
|
+
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
893
|
+
human: t.Optional[bool] = None,
|
|
894
|
+
pretty: t.Optional[bool] = None,
|
|
895
|
+
values: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
896
|
+
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
897
|
+
) -> ObjectApiResponse[t.Any]:
|
|
898
|
+
"""
|
|
899
|
+
Updates the configuration field in the connector document
|
|
900
|
+
|
|
901
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/update-connector-configuration-api.html>`_
|
|
902
|
+
|
|
903
|
+
:param connector_id: The unique identifier of the connector to be updated
|
|
904
|
+
:param configuration:
|
|
905
|
+
:param values:
|
|
906
|
+
"""
|
|
907
|
+
if connector_id in SKIP_IN_PATH:
|
|
908
|
+
raise ValueError("Empty value passed for parameter 'connector_id'")
|
|
909
|
+
__path_parts: t.Dict[str, str] = {"connector_id": _quote(connector_id)}
|
|
910
|
+
__path = f'/_connector/{__path_parts["connector_id"]}/_configuration'
|
|
911
|
+
__query: t.Dict[str, t.Any] = {}
|
|
912
|
+
__body: t.Dict[str, t.Any] = body if body is not None else {}
|
|
913
|
+
if error_trace is not None:
|
|
914
|
+
__query["error_trace"] = error_trace
|
|
915
|
+
if filter_path is not None:
|
|
916
|
+
__query["filter_path"] = filter_path
|
|
917
|
+
if human is not None:
|
|
918
|
+
__query["human"] = human
|
|
919
|
+
if pretty is not None:
|
|
920
|
+
__query["pretty"] = pretty
|
|
921
|
+
if not __body:
|
|
922
|
+
if configuration is not None:
|
|
923
|
+
__body["configuration"] = configuration
|
|
924
|
+
if values is not None:
|
|
925
|
+
__body["values"] = values
|
|
926
|
+
__headers = {"accept": "application/json", "content-type": "application/json"}
|
|
927
|
+
return await self.perform_request( # type: ignore[return-value]
|
|
928
|
+
"PUT",
|
|
929
|
+
__path,
|
|
930
|
+
params=__query,
|
|
931
|
+
headers=__headers,
|
|
932
|
+
body=__body,
|
|
933
|
+
endpoint_id="connector.update_configuration",
|
|
934
|
+
path_parts=__path_parts,
|
|
935
|
+
)
|
|
936
|
+
|
|
937
|
+
@_rewrite_parameters(
|
|
938
|
+
body_fields=("error",),
|
|
939
|
+
)
|
|
940
|
+
async def update_error(
|
|
941
|
+
self,
|
|
942
|
+
*,
|
|
943
|
+
connector_id: str,
|
|
944
|
+
error: t.Optional[t.Union[None, t.Any]] = None,
|
|
945
|
+
error_trace: t.Optional[bool] = None,
|
|
946
|
+
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
947
|
+
human: t.Optional[bool] = None,
|
|
948
|
+
pretty: t.Optional[bool] = None,
|
|
949
|
+
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
950
|
+
) -> ObjectApiResponse[t.Any]:
|
|
951
|
+
"""
|
|
952
|
+
Updates the filtering field in the connector document
|
|
953
|
+
|
|
954
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/update-connector-error-api.html>`_
|
|
955
|
+
|
|
956
|
+
:param connector_id: The unique identifier of the connector to be updated
|
|
957
|
+
:param error:
|
|
958
|
+
"""
|
|
959
|
+
if connector_id in SKIP_IN_PATH:
|
|
960
|
+
raise ValueError("Empty value passed for parameter 'connector_id'")
|
|
961
|
+
if error is None and body is None:
|
|
962
|
+
raise ValueError("Empty value passed for parameter 'error'")
|
|
963
|
+
__path_parts: t.Dict[str, str] = {"connector_id": _quote(connector_id)}
|
|
964
|
+
__path = f'/_connector/{__path_parts["connector_id"]}/_error'
|
|
965
|
+
__query: t.Dict[str, t.Any] = {}
|
|
966
|
+
__body: t.Dict[str, t.Any] = body if body is not None else {}
|
|
967
|
+
if error_trace is not None:
|
|
968
|
+
__query["error_trace"] = error_trace
|
|
969
|
+
if filter_path is not None:
|
|
970
|
+
__query["filter_path"] = filter_path
|
|
971
|
+
if human is not None:
|
|
972
|
+
__query["human"] = human
|
|
973
|
+
if pretty is not None:
|
|
974
|
+
__query["pretty"] = pretty
|
|
975
|
+
if not __body:
|
|
976
|
+
if error is not None:
|
|
977
|
+
__body["error"] = error
|
|
978
|
+
__headers = {"accept": "application/json", "content-type": "application/json"}
|
|
979
|
+
return await self.perform_request( # type: ignore[return-value]
|
|
980
|
+
"PUT",
|
|
981
|
+
__path,
|
|
982
|
+
params=__query,
|
|
983
|
+
headers=__headers,
|
|
984
|
+
body=__body,
|
|
985
|
+
endpoint_id="connector.update_error",
|
|
986
|
+
path_parts=__path_parts,
|
|
987
|
+
)
|
|
988
|
+
|
|
989
|
+
@_rewrite_parameters(
|
|
990
|
+
body_fields=("advanced_snippet", "filtering", "rules"),
|
|
991
|
+
)
|
|
992
|
+
async def update_filtering(
|
|
993
|
+
self,
|
|
994
|
+
*,
|
|
995
|
+
connector_id: str,
|
|
996
|
+
advanced_snippet: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
997
|
+
error_trace: t.Optional[bool] = None,
|
|
998
|
+
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
999
|
+
filtering: t.Optional[t.Sequence[t.Mapping[str, t.Any]]] = None,
|
|
1000
|
+
human: t.Optional[bool] = None,
|
|
1001
|
+
pretty: t.Optional[bool] = None,
|
|
1002
|
+
rules: t.Optional[t.Sequence[t.Mapping[str, t.Any]]] = None,
|
|
1003
|
+
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
1004
|
+
) -> ObjectApiResponse[t.Any]:
|
|
1005
|
+
"""
|
|
1006
|
+
Updates the filtering field in the connector document
|
|
1007
|
+
|
|
1008
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/update-connector-filtering-api.html>`_
|
|
1009
|
+
|
|
1010
|
+
:param connector_id: The unique identifier of the connector to be updated
|
|
1011
|
+
:param advanced_snippet:
|
|
1012
|
+
:param filtering:
|
|
1013
|
+
:param rules:
|
|
1014
|
+
"""
|
|
1015
|
+
if connector_id in SKIP_IN_PATH:
|
|
1016
|
+
raise ValueError("Empty value passed for parameter 'connector_id'")
|
|
1017
|
+
__path_parts: t.Dict[str, str] = {"connector_id": _quote(connector_id)}
|
|
1018
|
+
__path = f'/_connector/{__path_parts["connector_id"]}/_filtering'
|
|
1019
|
+
__query: t.Dict[str, t.Any] = {}
|
|
1020
|
+
__body: t.Dict[str, t.Any] = body if body is not None else {}
|
|
1021
|
+
if error_trace is not None:
|
|
1022
|
+
__query["error_trace"] = error_trace
|
|
1023
|
+
if filter_path is not None:
|
|
1024
|
+
__query["filter_path"] = filter_path
|
|
1025
|
+
if human is not None:
|
|
1026
|
+
__query["human"] = human
|
|
1027
|
+
if pretty is not None:
|
|
1028
|
+
__query["pretty"] = pretty
|
|
1029
|
+
if not __body:
|
|
1030
|
+
if advanced_snippet is not None:
|
|
1031
|
+
__body["advanced_snippet"] = advanced_snippet
|
|
1032
|
+
if filtering is not None:
|
|
1033
|
+
__body["filtering"] = filtering
|
|
1034
|
+
if rules is not None:
|
|
1035
|
+
__body["rules"] = rules
|
|
1036
|
+
__headers = {"accept": "application/json", "content-type": "application/json"}
|
|
1037
|
+
return await self.perform_request( # type: ignore[return-value]
|
|
1038
|
+
"PUT",
|
|
1039
|
+
__path,
|
|
1040
|
+
params=__query,
|
|
1041
|
+
headers=__headers,
|
|
1042
|
+
body=__body,
|
|
1043
|
+
endpoint_id="connector.update_filtering",
|
|
1044
|
+
path_parts=__path_parts,
|
|
1045
|
+
)
|
|
1046
|
+
|
|
1047
|
+
@_rewrite_parameters(
|
|
1048
|
+
body_fields=("validation",),
|
|
1049
|
+
)
|
|
1050
|
+
async def update_filtering_validation(
|
|
1051
|
+
self,
|
|
1052
|
+
*,
|
|
1053
|
+
connector_id: str,
|
|
1054
|
+
validation: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
1055
|
+
error_trace: t.Optional[bool] = None,
|
|
1056
|
+
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
1057
|
+
human: t.Optional[bool] = None,
|
|
1058
|
+
pretty: t.Optional[bool] = None,
|
|
1059
|
+
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
1060
|
+
) -> ObjectApiResponse[t.Any]:
|
|
1061
|
+
"""
|
|
1062
|
+
Updates the draft filtering validation info for a connector.
|
|
1063
|
+
|
|
1064
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/update-connector-filtering-validation-api.html>`_
|
|
1065
|
+
|
|
1066
|
+
:param connector_id: The unique identifier of the connector to be updated
|
|
1067
|
+
:param validation:
|
|
1068
|
+
"""
|
|
1069
|
+
if connector_id in SKIP_IN_PATH:
|
|
1070
|
+
raise ValueError("Empty value passed for parameter 'connector_id'")
|
|
1071
|
+
if validation is None and body is None:
|
|
1072
|
+
raise ValueError("Empty value passed for parameter 'validation'")
|
|
1073
|
+
__path_parts: t.Dict[str, str] = {"connector_id": _quote(connector_id)}
|
|
1074
|
+
__path = f'/_connector/{__path_parts["connector_id"]}/_filtering/_validation'
|
|
1075
|
+
__query: t.Dict[str, t.Any] = {}
|
|
1076
|
+
__body: t.Dict[str, t.Any] = body if body is not None else {}
|
|
1077
|
+
if error_trace is not None:
|
|
1078
|
+
__query["error_trace"] = error_trace
|
|
1079
|
+
if filter_path is not None:
|
|
1080
|
+
__query["filter_path"] = filter_path
|
|
1081
|
+
if human is not None:
|
|
1082
|
+
__query["human"] = human
|
|
1083
|
+
if pretty is not None:
|
|
1084
|
+
__query["pretty"] = pretty
|
|
1085
|
+
if not __body:
|
|
1086
|
+
if validation is not None:
|
|
1087
|
+
__body["validation"] = validation
|
|
1088
|
+
__headers = {"accept": "application/json", "content-type": "application/json"}
|
|
1089
|
+
return await self.perform_request( # type: ignore[return-value]
|
|
1090
|
+
"PUT",
|
|
1091
|
+
__path,
|
|
1092
|
+
params=__query,
|
|
1093
|
+
headers=__headers,
|
|
1094
|
+
body=__body,
|
|
1095
|
+
endpoint_id="connector.update_filtering_validation",
|
|
1096
|
+
path_parts=__path_parts,
|
|
1097
|
+
)
|
|
1098
|
+
|
|
1099
|
+
@_rewrite_parameters(
|
|
1100
|
+
body_fields=("index_name",),
|
|
1101
|
+
)
|
|
1102
|
+
async def update_index_name(
|
|
1103
|
+
self,
|
|
1104
|
+
*,
|
|
1105
|
+
connector_id: str,
|
|
1106
|
+
index_name: t.Optional[t.Union[None, t.Any]] = None,
|
|
1107
|
+
error_trace: t.Optional[bool] = None,
|
|
1108
|
+
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
1109
|
+
human: t.Optional[bool] = None,
|
|
1110
|
+
pretty: t.Optional[bool] = None,
|
|
1111
|
+
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
1112
|
+
) -> ObjectApiResponse[t.Any]:
|
|
1113
|
+
"""
|
|
1114
|
+
Updates the index_name in the connector document
|
|
1115
|
+
|
|
1116
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/update-connector-index-name-api.html>`_
|
|
1117
|
+
|
|
1118
|
+
:param connector_id: The unique identifier of the connector to be updated
|
|
1119
|
+
:param index_name:
|
|
1120
|
+
"""
|
|
1121
|
+
if connector_id in SKIP_IN_PATH:
|
|
1122
|
+
raise ValueError("Empty value passed for parameter 'connector_id'")
|
|
1123
|
+
if index_name is None and body is None:
|
|
1124
|
+
raise ValueError("Empty value passed for parameter 'index_name'")
|
|
1125
|
+
__path_parts: t.Dict[str, str] = {"connector_id": _quote(connector_id)}
|
|
1126
|
+
__path = f'/_connector/{__path_parts["connector_id"]}/_index_name'
|
|
1127
|
+
__query: t.Dict[str, t.Any] = {}
|
|
1128
|
+
__body: t.Dict[str, t.Any] = body if body is not None else {}
|
|
1129
|
+
if error_trace is not None:
|
|
1130
|
+
__query["error_trace"] = error_trace
|
|
1131
|
+
if filter_path is not None:
|
|
1132
|
+
__query["filter_path"] = filter_path
|
|
1133
|
+
if human is not None:
|
|
1134
|
+
__query["human"] = human
|
|
1135
|
+
if pretty is not None:
|
|
1136
|
+
__query["pretty"] = pretty
|
|
1137
|
+
if not __body:
|
|
1138
|
+
if index_name is not None:
|
|
1139
|
+
__body["index_name"] = index_name
|
|
1140
|
+
__headers = {"accept": "application/json", "content-type": "application/json"}
|
|
1141
|
+
return await self.perform_request( # type: ignore[return-value]
|
|
1142
|
+
"PUT",
|
|
1143
|
+
__path,
|
|
1144
|
+
params=__query,
|
|
1145
|
+
headers=__headers,
|
|
1146
|
+
body=__body,
|
|
1147
|
+
endpoint_id="connector.update_index_name",
|
|
1148
|
+
path_parts=__path_parts,
|
|
1149
|
+
)
|
|
1150
|
+
|
|
1151
|
+
@_rewrite_parameters(
|
|
1152
|
+
body_fields=("description", "name"),
|
|
1153
|
+
)
|
|
1154
|
+
async def update_name(
|
|
1155
|
+
self,
|
|
1156
|
+
*,
|
|
1157
|
+
connector_id: str,
|
|
1158
|
+
description: t.Optional[str] = None,
|
|
1159
|
+
error_trace: t.Optional[bool] = None,
|
|
1160
|
+
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
1161
|
+
human: t.Optional[bool] = None,
|
|
1162
|
+
name: t.Optional[str] = None,
|
|
1163
|
+
pretty: t.Optional[bool] = None,
|
|
1164
|
+
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
1165
|
+
) -> ObjectApiResponse[t.Any]:
|
|
1166
|
+
"""
|
|
1167
|
+
Updates the name and description fields in the connector document
|
|
1168
|
+
|
|
1169
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/update-connector-name-description-api.html>`_
|
|
1170
|
+
|
|
1171
|
+
:param connector_id: The unique identifier of the connector to be updated
|
|
1172
|
+
:param description:
|
|
1173
|
+
:param name:
|
|
1174
|
+
"""
|
|
1175
|
+
if connector_id in SKIP_IN_PATH:
|
|
1176
|
+
raise ValueError("Empty value passed for parameter 'connector_id'")
|
|
1177
|
+
__path_parts: t.Dict[str, str] = {"connector_id": _quote(connector_id)}
|
|
1178
|
+
__path = f'/_connector/{__path_parts["connector_id"]}/_name'
|
|
1179
|
+
__query: t.Dict[str, t.Any] = {}
|
|
1180
|
+
__body: t.Dict[str, t.Any] = body if body is not None else {}
|
|
1181
|
+
if error_trace is not None:
|
|
1182
|
+
__query["error_trace"] = error_trace
|
|
1183
|
+
if filter_path is not None:
|
|
1184
|
+
__query["filter_path"] = filter_path
|
|
1185
|
+
if human is not None:
|
|
1186
|
+
__query["human"] = human
|
|
1187
|
+
if pretty is not None:
|
|
1188
|
+
__query["pretty"] = pretty
|
|
1189
|
+
if not __body:
|
|
1190
|
+
if description is not None:
|
|
1191
|
+
__body["description"] = description
|
|
1192
|
+
if name is not None:
|
|
1193
|
+
__body["name"] = name
|
|
1194
|
+
__headers = {"accept": "application/json", "content-type": "application/json"}
|
|
1195
|
+
return await self.perform_request( # type: ignore[return-value]
|
|
1196
|
+
"PUT",
|
|
1197
|
+
__path,
|
|
1198
|
+
params=__query,
|
|
1199
|
+
headers=__headers,
|
|
1200
|
+
body=__body,
|
|
1201
|
+
endpoint_id="connector.update_name",
|
|
1202
|
+
path_parts=__path_parts,
|
|
1203
|
+
)
|
|
1204
|
+
|
|
1205
|
+
@_rewrite_parameters(
|
|
1206
|
+
body_fields=("is_native",),
|
|
1207
|
+
)
|
|
1208
|
+
async def update_native(
|
|
1209
|
+
self,
|
|
1210
|
+
*,
|
|
1211
|
+
connector_id: str,
|
|
1212
|
+
is_native: t.Optional[bool] = None,
|
|
1213
|
+
error_trace: t.Optional[bool] = None,
|
|
1214
|
+
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
1215
|
+
human: t.Optional[bool] = None,
|
|
1216
|
+
pretty: t.Optional[bool] = None,
|
|
1217
|
+
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
1218
|
+
) -> ObjectApiResponse[t.Any]:
|
|
1219
|
+
"""
|
|
1220
|
+
Updates the is_native flag in the connector document
|
|
1221
|
+
|
|
1222
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/update-connector-native-api.html>`_
|
|
1223
|
+
|
|
1224
|
+
:param connector_id: The unique identifier of the connector to be updated
|
|
1225
|
+
:param is_native:
|
|
1226
|
+
"""
|
|
1227
|
+
if connector_id in SKIP_IN_PATH:
|
|
1228
|
+
raise ValueError("Empty value passed for parameter 'connector_id'")
|
|
1229
|
+
if is_native is None and body is None:
|
|
1230
|
+
raise ValueError("Empty value passed for parameter 'is_native'")
|
|
1231
|
+
__path_parts: t.Dict[str, str] = {"connector_id": _quote(connector_id)}
|
|
1232
|
+
__path = f'/_connector/{__path_parts["connector_id"]}/_native'
|
|
1233
|
+
__query: t.Dict[str, t.Any] = {}
|
|
1234
|
+
__body: t.Dict[str, t.Any] = body if body is not None else {}
|
|
1235
|
+
if error_trace is not None:
|
|
1236
|
+
__query["error_trace"] = error_trace
|
|
1237
|
+
if filter_path is not None:
|
|
1238
|
+
__query["filter_path"] = filter_path
|
|
1239
|
+
if human is not None:
|
|
1240
|
+
__query["human"] = human
|
|
1241
|
+
if pretty is not None:
|
|
1242
|
+
__query["pretty"] = pretty
|
|
1243
|
+
if not __body:
|
|
1244
|
+
if is_native is not None:
|
|
1245
|
+
__body["is_native"] = is_native
|
|
1246
|
+
__headers = {"accept": "application/json", "content-type": "application/json"}
|
|
1247
|
+
return await self.perform_request( # type: ignore[return-value]
|
|
1248
|
+
"PUT",
|
|
1249
|
+
__path,
|
|
1250
|
+
params=__query,
|
|
1251
|
+
headers=__headers,
|
|
1252
|
+
body=__body,
|
|
1253
|
+
endpoint_id="connector.update_native",
|
|
1254
|
+
path_parts=__path_parts,
|
|
1255
|
+
)
|
|
1256
|
+
|
|
1257
|
+
@_rewrite_parameters(
|
|
1258
|
+
body_fields=("pipeline",),
|
|
1259
|
+
)
|
|
1260
|
+
async def update_pipeline(
|
|
1261
|
+
self,
|
|
1262
|
+
*,
|
|
1263
|
+
connector_id: str,
|
|
1264
|
+
pipeline: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
1265
|
+
error_trace: t.Optional[bool] = None,
|
|
1266
|
+
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
1267
|
+
human: t.Optional[bool] = None,
|
|
1268
|
+
pretty: t.Optional[bool] = None,
|
|
1269
|
+
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
1270
|
+
) -> ObjectApiResponse[t.Any]:
|
|
1271
|
+
"""
|
|
1272
|
+
Updates the pipeline field in the connector document
|
|
1273
|
+
|
|
1274
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/update-connector-pipeline-api.html>`_
|
|
1275
|
+
|
|
1276
|
+
:param connector_id: The unique identifier of the connector to be updated
|
|
1277
|
+
:param pipeline:
|
|
1278
|
+
"""
|
|
1279
|
+
if connector_id in SKIP_IN_PATH:
|
|
1280
|
+
raise ValueError("Empty value passed for parameter 'connector_id'")
|
|
1281
|
+
if pipeline is None and body is None:
|
|
1282
|
+
raise ValueError("Empty value passed for parameter 'pipeline'")
|
|
1283
|
+
__path_parts: t.Dict[str, str] = {"connector_id": _quote(connector_id)}
|
|
1284
|
+
__path = f'/_connector/{__path_parts["connector_id"]}/_pipeline'
|
|
1285
|
+
__query: t.Dict[str, t.Any] = {}
|
|
1286
|
+
__body: t.Dict[str, t.Any] = body if body is not None else {}
|
|
1287
|
+
if error_trace is not None:
|
|
1288
|
+
__query["error_trace"] = error_trace
|
|
1289
|
+
if filter_path is not None:
|
|
1290
|
+
__query["filter_path"] = filter_path
|
|
1291
|
+
if human is not None:
|
|
1292
|
+
__query["human"] = human
|
|
1293
|
+
if pretty is not None:
|
|
1294
|
+
__query["pretty"] = pretty
|
|
1295
|
+
if not __body:
|
|
1296
|
+
if pipeline is not None:
|
|
1297
|
+
__body["pipeline"] = pipeline
|
|
1298
|
+
__headers = {"accept": "application/json", "content-type": "application/json"}
|
|
1299
|
+
return await self.perform_request( # type: ignore[return-value]
|
|
1300
|
+
"PUT",
|
|
1301
|
+
__path,
|
|
1302
|
+
params=__query,
|
|
1303
|
+
headers=__headers,
|
|
1304
|
+
body=__body,
|
|
1305
|
+
endpoint_id="connector.update_pipeline",
|
|
1306
|
+
path_parts=__path_parts,
|
|
1307
|
+
)
|
|
1308
|
+
|
|
1309
|
+
@_rewrite_parameters(
|
|
1310
|
+
body_fields=("scheduling",),
|
|
1311
|
+
)
|
|
1312
|
+
async def update_scheduling(
|
|
1313
|
+
self,
|
|
1314
|
+
*,
|
|
1315
|
+
connector_id: str,
|
|
1316
|
+
scheduling: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
1317
|
+
error_trace: t.Optional[bool] = None,
|
|
1318
|
+
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
1319
|
+
human: t.Optional[bool] = None,
|
|
1320
|
+
pretty: t.Optional[bool] = None,
|
|
1321
|
+
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
1322
|
+
) -> ObjectApiResponse[t.Any]:
|
|
1323
|
+
"""
|
|
1324
|
+
Updates the scheduling field in the connector document
|
|
1325
|
+
|
|
1326
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/update-connector-scheduling-api.html>`_
|
|
1327
|
+
|
|
1328
|
+
:param connector_id: The unique identifier of the connector to be updated
|
|
1329
|
+
:param scheduling:
|
|
1330
|
+
"""
|
|
1331
|
+
if connector_id in SKIP_IN_PATH:
|
|
1332
|
+
raise ValueError("Empty value passed for parameter 'connector_id'")
|
|
1333
|
+
if scheduling is None and body is None:
|
|
1334
|
+
raise ValueError("Empty value passed for parameter 'scheduling'")
|
|
1335
|
+
__path_parts: t.Dict[str, str] = {"connector_id": _quote(connector_id)}
|
|
1336
|
+
__path = f'/_connector/{__path_parts["connector_id"]}/_scheduling'
|
|
1337
|
+
__query: t.Dict[str, t.Any] = {}
|
|
1338
|
+
__body: t.Dict[str, t.Any] = body if body is not None else {}
|
|
1339
|
+
if error_trace is not None:
|
|
1340
|
+
__query["error_trace"] = error_trace
|
|
1341
|
+
if filter_path is not None:
|
|
1342
|
+
__query["filter_path"] = filter_path
|
|
1343
|
+
if human is not None:
|
|
1344
|
+
__query["human"] = human
|
|
1345
|
+
if pretty is not None:
|
|
1346
|
+
__query["pretty"] = pretty
|
|
1347
|
+
if not __body:
|
|
1348
|
+
if scheduling is not None:
|
|
1349
|
+
__body["scheduling"] = scheduling
|
|
1350
|
+
__headers = {"accept": "application/json", "content-type": "application/json"}
|
|
1351
|
+
return await self.perform_request( # type: ignore[return-value]
|
|
1352
|
+
"PUT",
|
|
1353
|
+
__path,
|
|
1354
|
+
params=__query,
|
|
1355
|
+
headers=__headers,
|
|
1356
|
+
body=__body,
|
|
1357
|
+
endpoint_id="connector.update_scheduling",
|
|
1358
|
+
path_parts=__path_parts,
|
|
1359
|
+
)
|
|
1360
|
+
|
|
1361
|
+
@_rewrite_parameters(
|
|
1362
|
+
body_fields=("service_type",),
|
|
1363
|
+
)
|
|
1364
|
+
async def update_service_type(
|
|
1365
|
+
self,
|
|
1366
|
+
*,
|
|
1367
|
+
connector_id: str,
|
|
1368
|
+
service_type: t.Optional[str] = None,
|
|
1369
|
+
error_trace: t.Optional[bool] = None,
|
|
1370
|
+
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
1371
|
+
human: t.Optional[bool] = None,
|
|
1372
|
+
pretty: t.Optional[bool] = None,
|
|
1373
|
+
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
1374
|
+
) -> ObjectApiResponse[t.Any]:
|
|
1375
|
+
"""
|
|
1376
|
+
Updates the service type of the connector
|
|
1377
|
+
|
|
1378
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/update-connector-service-type-api.html>`_
|
|
1379
|
+
|
|
1380
|
+
:param connector_id: The unique identifier of the connector to be updated
|
|
1381
|
+
:param service_type:
|
|
1382
|
+
"""
|
|
1383
|
+
if connector_id in SKIP_IN_PATH:
|
|
1384
|
+
raise ValueError("Empty value passed for parameter 'connector_id'")
|
|
1385
|
+
if service_type is None and body is None:
|
|
1386
|
+
raise ValueError("Empty value passed for parameter 'service_type'")
|
|
1387
|
+
__path_parts: t.Dict[str, str] = {"connector_id": _quote(connector_id)}
|
|
1388
|
+
__path = f'/_connector/{__path_parts["connector_id"]}/_service_type'
|
|
1389
|
+
__query: t.Dict[str, t.Any] = {}
|
|
1390
|
+
__body: t.Dict[str, t.Any] = body if body is not None else {}
|
|
1391
|
+
if error_trace is not None:
|
|
1392
|
+
__query["error_trace"] = error_trace
|
|
1393
|
+
if filter_path is not None:
|
|
1394
|
+
__query["filter_path"] = filter_path
|
|
1395
|
+
if human is not None:
|
|
1396
|
+
__query["human"] = human
|
|
1397
|
+
if pretty is not None:
|
|
1398
|
+
__query["pretty"] = pretty
|
|
1399
|
+
if not __body:
|
|
1400
|
+
if service_type is not None:
|
|
1401
|
+
__body["service_type"] = service_type
|
|
1402
|
+
__headers = {"accept": "application/json", "content-type": "application/json"}
|
|
1403
|
+
return await self.perform_request( # type: ignore[return-value]
|
|
1404
|
+
"PUT",
|
|
1405
|
+
__path,
|
|
1406
|
+
params=__query,
|
|
1407
|
+
headers=__headers,
|
|
1408
|
+
body=__body,
|
|
1409
|
+
endpoint_id="connector.update_service_type",
|
|
1410
|
+
path_parts=__path_parts,
|
|
1411
|
+
)
|
|
1412
|
+
|
|
1413
|
+
@_rewrite_parameters(
|
|
1414
|
+
body_fields=("status",),
|
|
1415
|
+
)
|
|
1416
|
+
async def update_status(
|
|
1417
|
+
self,
|
|
1418
|
+
*,
|
|
1419
|
+
connector_id: str,
|
|
1420
|
+
status: t.Optional[
|
|
1421
|
+
t.Union[
|
|
1422
|
+
str,
|
|
1423
|
+
t.Literal[
|
|
1424
|
+
"configured", "connected", "created", "error", "needs_configuration"
|
|
1425
|
+
],
|
|
1426
|
+
]
|
|
1427
|
+
] = None,
|
|
1428
|
+
error_trace: t.Optional[bool] = None,
|
|
1429
|
+
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
1430
|
+
human: t.Optional[bool] = None,
|
|
1431
|
+
pretty: t.Optional[bool] = None,
|
|
1432
|
+
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
1433
|
+
) -> ObjectApiResponse[t.Any]:
|
|
1434
|
+
"""
|
|
1435
|
+
Updates the status of the connector
|
|
1436
|
+
|
|
1437
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/update-connector-status-api.html>`_
|
|
1438
|
+
|
|
1439
|
+
:param connector_id: The unique identifier of the connector to be updated
|
|
1440
|
+
:param status:
|
|
1441
|
+
"""
|
|
1442
|
+
if connector_id in SKIP_IN_PATH:
|
|
1443
|
+
raise ValueError("Empty value passed for parameter 'connector_id'")
|
|
1444
|
+
if status is None and body is None:
|
|
1445
|
+
raise ValueError("Empty value passed for parameter 'status'")
|
|
1446
|
+
__path_parts: t.Dict[str, str] = {"connector_id": _quote(connector_id)}
|
|
1447
|
+
__path = f'/_connector/{__path_parts["connector_id"]}/_status'
|
|
1448
|
+
__query: t.Dict[str, t.Any] = {}
|
|
1449
|
+
__body: t.Dict[str, t.Any] = body if body is not None else {}
|
|
1450
|
+
if error_trace is not None:
|
|
1451
|
+
__query["error_trace"] = error_trace
|
|
1452
|
+
if filter_path is not None:
|
|
1453
|
+
__query["filter_path"] = filter_path
|
|
1454
|
+
if human is not None:
|
|
1455
|
+
__query["human"] = human
|
|
1456
|
+
if pretty is not None:
|
|
1457
|
+
__query["pretty"] = pretty
|
|
1458
|
+
if not __body:
|
|
1459
|
+
if status is not None:
|
|
1460
|
+
__body["status"] = status
|
|
1461
|
+
__headers = {"accept": "application/json", "content-type": "application/json"}
|
|
1462
|
+
return await self.perform_request( # type: ignore[return-value]
|
|
1463
|
+
"PUT",
|
|
1464
|
+
__path,
|
|
1465
|
+
params=__query,
|
|
1466
|
+
headers=__headers,
|
|
1467
|
+
body=__body,
|
|
1468
|
+
endpoint_id="connector.update_status",
|
|
1469
|
+
path_parts=__path_parts,
|
|
1470
|
+
)
|