elasticsearch 8.17.1__py3-none-any.whl → 9.0.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/__init__.py +2 -2
- elasticsearch/_async/client/__init__.py +2125 -1053
- elasticsearch/_async/client/_base.py +1 -2
- elasticsearch/_async/client/async_search.py +46 -35
- elasticsearch/_async/client/autoscaling.py +32 -26
- elasticsearch/_async/client/cat.py +244 -176
- elasticsearch/_async/client/ccr.py +268 -128
- elasticsearch/_async/client/cluster.py +191 -164
- elasticsearch/_async/client/connector.py +226 -116
- elasticsearch/_async/client/dangling_indices.py +22 -16
- elasticsearch/_async/client/enrich.py +51 -11
- elasticsearch/_async/client/eql.py +54 -13
- elasticsearch/_async/client/esql.py +351 -7
- elasticsearch/_async/client/features.py +37 -27
- elasticsearch/_async/client/fleet.py +32 -22
- elasticsearch/_async/client/graph.py +10 -9
- elasticsearch/_async/client/ilm.py +115 -77
- elasticsearch/_async/client/indices.py +1119 -772
- elasticsearch/_async/client/inference.py +1933 -84
- elasticsearch/_async/client/ingest.py +83 -50
- elasticsearch/_async/client/license.py +90 -38
- elasticsearch/_async/client/logstash.py +20 -9
- elasticsearch/_async/client/migration.py +26 -17
- elasticsearch/_async/client/ml.py +646 -374
- elasticsearch/_async/client/monitoring.py +6 -3
- elasticsearch/_async/client/nodes.py +52 -54
- elasticsearch/_async/client/query_rules.py +59 -33
- elasticsearch/_async/client/rollup.py +124 -86
- elasticsearch/_async/client/search_application.py +60 -32
- elasticsearch/_async/client/searchable_snapshots.py +25 -12
- elasticsearch/_async/client/security.py +903 -562
- elasticsearch/_async/client/shutdown.py +34 -36
- elasticsearch/_async/client/simulate.py +22 -28
- elasticsearch/_async/client/slm.py +65 -40
- elasticsearch/_async/client/snapshot.py +454 -327
- elasticsearch/_async/client/sql.py +43 -22
- elasticsearch/_async/client/ssl.py +17 -18
- elasticsearch/_async/client/synonyms.py +58 -37
- elasticsearch/_async/client/tasks.py +77 -48
- elasticsearch/_async/client/text_structure.py +65 -56
- elasticsearch/_async/client/transform.py +124 -93
- elasticsearch/_async/client/watcher.py +117 -73
- elasticsearch/_async/client/xpack.py +18 -9
- elasticsearch/_async/helpers.py +1 -2
- elasticsearch/_sync/client/__init__.py +2125 -1053
- elasticsearch/_sync/client/_base.py +1 -2
- elasticsearch/_sync/client/async_search.py +46 -35
- elasticsearch/_sync/client/autoscaling.py +32 -26
- elasticsearch/_sync/client/cat.py +244 -176
- elasticsearch/_sync/client/ccr.py +268 -128
- elasticsearch/_sync/client/cluster.py +191 -164
- elasticsearch/_sync/client/connector.py +226 -116
- elasticsearch/_sync/client/dangling_indices.py +22 -16
- elasticsearch/_sync/client/enrich.py +51 -11
- elasticsearch/_sync/client/eql.py +54 -13
- elasticsearch/_sync/client/esql.py +351 -7
- elasticsearch/_sync/client/features.py +37 -27
- elasticsearch/_sync/client/fleet.py +32 -22
- elasticsearch/_sync/client/graph.py +10 -9
- elasticsearch/_sync/client/ilm.py +115 -77
- elasticsearch/_sync/client/indices.py +1119 -772
- elasticsearch/_sync/client/inference.py +1933 -84
- elasticsearch/_sync/client/ingest.py +83 -50
- elasticsearch/_sync/client/license.py +90 -38
- elasticsearch/_sync/client/logstash.py +20 -9
- elasticsearch/_sync/client/migration.py +26 -17
- elasticsearch/_sync/client/ml.py +646 -374
- elasticsearch/_sync/client/monitoring.py +6 -3
- elasticsearch/_sync/client/nodes.py +52 -54
- elasticsearch/_sync/client/query_rules.py +59 -33
- elasticsearch/_sync/client/rollup.py +124 -86
- elasticsearch/_sync/client/search_application.py +60 -32
- elasticsearch/_sync/client/searchable_snapshots.py +25 -12
- elasticsearch/_sync/client/security.py +903 -562
- elasticsearch/_sync/client/shutdown.py +34 -36
- elasticsearch/_sync/client/simulate.py +22 -28
- elasticsearch/_sync/client/slm.py +65 -40
- elasticsearch/_sync/client/snapshot.py +454 -327
- elasticsearch/_sync/client/sql.py +43 -22
- elasticsearch/_sync/client/ssl.py +17 -18
- elasticsearch/_sync/client/synonyms.py +58 -37
- elasticsearch/_sync/client/tasks.py +77 -48
- elasticsearch/_sync/client/text_structure.py +65 -56
- elasticsearch/_sync/client/transform.py +124 -93
- elasticsearch/_sync/client/utils.py +1 -41
- elasticsearch/_sync/client/watcher.py +117 -73
- elasticsearch/_sync/client/xpack.py +18 -9
- elasticsearch/_version.py +1 -1
- elasticsearch/client.py +2 -0
- elasticsearch/dsl/__init__.py +203 -0
- elasticsearch/dsl/_async/__init__.py +16 -0
- elasticsearch/dsl/_async/document.py +522 -0
- elasticsearch/dsl/_async/faceted_search.py +50 -0
- elasticsearch/dsl/_async/index.py +639 -0
- elasticsearch/dsl/_async/mapping.py +49 -0
- elasticsearch/dsl/_async/search.py +237 -0
- elasticsearch/dsl/_async/update_by_query.py +47 -0
- elasticsearch/dsl/_sync/__init__.py +16 -0
- elasticsearch/dsl/_sync/document.py +514 -0
- elasticsearch/dsl/_sync/faceted_search.py +50 -0
- elasticsearch/dsl/_sync/index.py +597 -0
- elasticsearch/dsl/_sync/mapping.py +49 -0
- elasticsearch/dsl/_sync/search.py +230 -0
- elasticsearch/dsl/_sync/update_by_query.py +45 -0
- elasticsearch/dsl/aggs.py +3734 -0
- elasticsearch/dsl/analysis.py +341 -0
- elasticsearch/dsl/async_connections.py +37 -0
- elasticsearch/dsl/connections.py +142 -0
- elasticsearch/dsl/document.py +20 -0
- elasticsearch/dsl/document_base.py +444 -0
- elasticsearch/dsl/exceptions.py +32 -0
- elasticsearch/dsl/faceted_search.py +28 -0
- elasticsearch/dsl/faceted_search_base.py +489 -0
- elasticsearch/dsl/field.py +4392 -0
- elasticsearch/dsl/function.py +180 -0
- elasticsearch/dsl/index.py +23 -0
- elasticsearch/dsl/index_base.py +178 -0
- elasticsearch/dsl/mapping.py +19 -0
- elasticsearch/dsl/mapping_base.py +219 -0
- elasticsearch/dsl/query.py +2822 -0
- elasticsearch/dsl/response/__init__.py +388 -0
- elasticsearch/dsl/response/aggs.py +100 -0
- elasticsearch/dsl/response/hit.py +53 -0
- elasticsearch/dsl/search.py +20 -0
- elasticsearch/dsl/search_base.py +1053 -0
- elasticsearch/dsl/serializer.py +34 -0
- elasticsearch/dsl/types.py +6453 -0
- elasticsearch/dsl/update_by_query.py +19 -0
- elasticsearch/dsl/update_by_query_base.py +149 -0
- elasticsearch/dsl/utils.py +687 -0
- elasticsearch/dsl/wrappers.py +144 -0
- elasticsearch/helpers/actions.py +1 -1
- elasticsearch/helpers/vectorstore/_async/strategies.py +12 -12
- elasticsearch/helpers/vectorstore/_sync/strategies.py +12 -12
- elasticsearch/helpers/vectorstore/_sync/vectorstore.py +4 -1
- {elasticsearch-8.17.1.dist-info → elasticsearch-9.0.0.dist-info}/METADATA +12 -15
- elasticsearch-9.0.0.dist-info/RECORD +160 -0
- elasticsearch/transport.py +0 -57
- elasticsearch-8.17.1.dist-info/RECORD +0 -119
- {elasticsearch-8.17.1.dist-info → elasticsearch-9.0.0.dist-info}/WHEEL +0 -0
- {elasticsearch-8.17.1.dist-info → elasticsearch-9.0.0.dist-info}/licenses/LICENSE +0 -0
- {elasticsearch-8.17.1.dist-info → elasticsearch-9.0.0.dist-info}/licenses/NOTICE +0 -0
|
@@ -42,15 +42,18 @@ class ShutdownClient(NamespacedClient):
|
|
|
42
42
|
] = None,
|
|
43
43
|
) -> ObjectApiResponse[t.Any]:
|
|
44
44
|
"""
|
|
45
|
-
|
|
46
|
-
can resume normal operations. You must explicitly clear the shutdown request
|
|
47
|
-
when a node rejoins the cluster or when a node has permanently left the cluster.
|
|
48
|
-
Shutdown requests are never removed automatically by Elasticsearch. NOTE: This
|
|
49
|
-
feature is designed for indirect use by Elastic Cloud, Elastic Cloud Enterprise,
|
|
50
|
-
and Elastic Cloud on Kubernetes. Direct use is not supported. If the operator
|
|
51
|
-
privileges feature is enabled, you must be an operator to use this API.
|
|
45
|
+
.. raw:: html
|
|
52
46
|
|
|
53
|
-
|
|
47
|
+
<p>Cancel node shutdown preparations.
|
|
48
|
+
Remove a node from the shutdown list so it can resume normal operations.
|
|
49
|
+
You must explicitly clear the shutdown request when a node rejoins the cluster or when a node has permanently left the cluster.
|
|
50
|
+
Shutdown requests are never removed automatically by Elasticsearch.</p>
|
|
51
|
+
<p>NOTE: This feature is designed for indirect use by Elastic Cloud, Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes.
|
|
52
|
+
Direct use is not supported.</p>
|
|
53
|
+
<p>If the operator privileges feature is enabled, you must be an operator to use this API.</p>
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
`<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-shutdown-delete-node>`_
|
|
54
57
|
|
|
55
58
|
:param node_id: The node id of node to be removed from the shutdown state
|
|
56
59
|
:param master_timeout: Period to wait for a connection to the master node. If
|
|
@@ -98,27 +101,23 @@ class ShutdownClient(NamespacedClient):
|
|
|
98
101
|
t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]]
|
|
99
102
|
] = None,
|
|
100
103
|
pretty: t.Optional[bool] = None,
|
|
101
|
-
timeout: t.Optional[
|
|
102
|
-
t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]]
|
|
103
|
-
] = None,
|
|
104
104
|
) -> ObjectApiResponse[t.Any]:
|
|
105
105
|
"""
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
106
|
+
.. raw:: html
|
|
107
|
+
|
|
108
|
+
<p>Get the shutdown status.</p>
|
|
109
|
+
<p>Get information about nodes that are ready to be shut down, have shut down preparations still in progress, or have stalled.
|
|
110
|
+
The API returns status information for each part of the shut down process.</p>
|
|
111
|
+
<p>NOTE: This feature is designed for indirect use by Elasticsearch Service, Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not supported.</p>
|
|
112
|
+
<p>If the operator privileges feature is enabled, you must be an operator to use this API.</p>
|
|
113
|
+
|
|
113
114
|
|
|
114
|
-
`<https://www.elastic.co/
|
|
115
|
+
`<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-shutdown-get-node>`_
|
|
115
116
|
|
|
116
117
|
:param node_id: Which node for which to retrieve the shutdown status
|
|
117
118
|
:param master_timeout: Period to wait for a connection to the master node. If
|
|
118
119
|
no response is received before the timeout expires, the request fails and
|
|
119
120
|
returns an error.
|
|
120
|
-
:param timeout: Period to wait for a response. If no response is received before
|
|
121
|
-
the timeout expires, the request fails and returns an error.
|
|
122
121
|
"""
|
|
123
122
|
__path_parts: t.Dict[str, str]
|
|
124
123
|
if node_id not in SKIP_IN_PATH:
|
|
@@ -138,8 +137,6 @@ class ShutdownClient(NamespacedClient):
|
|
|
138
137
|
__query["master_timeout"] = master_timeout
|
|
139
138
|
if pretty is not None:
|
|
140
139
|
__query["pretty"] = pretty
|
|
141
|
-
if timeout is not None:
|
|
142
|
-
__query["timeout"] = timeout
|
|
143
140
|
__headers = {"accept": "application/json"}
|
|
144
141
|
return self.perform_request( # type: ignore[return-value]
|
|
145
142
|
"GET",
|
|
@@ -176,20 +173,21 @@ class ShutdownClient(NamespacedClient):
|
|
|
176
173
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
177
174
|
) -> ObjectApiResponse[t.Any]:
|
|
178
175
|
"""
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
176
|
+
.. raw:: html
|
|
177
|
+
|
|
178
|
+
<p>Prepare a node to be shut down.</p>
|
|
179
|
+
<p>NOTE: This feature is designed for indirect use by Elastic Cloud, Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not supported.</p>
|
|
180
|
+
<p>If you specify a node that is offline, it will be prepared for shut down when it rejoins the cluster.</p>
|
|
181
|
+
<p>If the operator privileges feature is enabled, you must be an operator to use this API.</p>
|
|
182
|
+
<p>The API migrates ongoing tasks and index shards to other nodes as needed to prepare a node to be restarted or shut down and removed from the cluster.
|
|
183
|
+
This ensures that Elasticsearch can be stopped safely with minimal disruption to the cluster.</p>
|
|
184
|
+
<p>You must specify the type of shutdown: <code>restart</code>, <code>remove</code>, or <code>replace</code>.
|
|
185
|
+
If a node is already being prepared for shutdown, you can use this API to change the shutdown type.</p>
|
|
186
|
+
<p>IMPORTANT: This API does NOT terminate the Elasticsearch process.
|
|
187
|
+
Monitor the node shutdown status to determine when it is safe to stop Elasticsearch.</p>
|
|
188
|
+
|
|
191
189
|
|
|
192
|
-
`<https://www.elastic.co/
|
|
190
|
+
`<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-shutdown-put-node>`_
|
|
193
191
|
|
|
194
192
|
:param node_id: The node identifier. This parameter is not validated against
|
|
195
193
|
the cluster's active nodes. This enables you to register a node for shut
|
|
@@ -35,7 +35,7 @@ class SimulateClient(NamespacedClient):
|
|
|
35
35
|
body_fields=(
|
|
36
36
|
"docs",
|
|
37
37
|
"component_template_substitutions",
|
|
38
|
-
"
|
|
38
|
+
"index_template_substitutions",
|
|
39
39
|
"mapping_addition",
|
|
40
40
|
"pipeline_substitutions",
|
|
41
41
|
),
|
|
@@ -52,7 +52,7 @@ class SimulateClient(NamespacedClient):
|
|
|
52
52
|
error_trace: t.Optional[bool] = None,
|
|
53
53
|
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
54
54
|
human: t.Optional[bool] = None,
|
|
55
|
-
|
|
55
|
+
index_template_substitutions: t.Optional[
|
|
56
56
|
t.Mapping[str, t.Mapping[str, t.Any]]
|
|
57
57
|
] = None,
|
|
58
58
|
mapping_addition: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
@@ -64,30 +64,24 @@ class SimulateClient(NamespacedClient):
|
|
|
64
64
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
65
65
|
) -> ObjectApiResponse[t.Any]:
|
|
66
66
|
"""
|
|
67
|
-
|
|
68
|
-
optionally with substitute pipeline definitions, to simulate ingesting data into
|
|
69
|
-
an index. This API is meant to be used for troubleshooting or pipeline development,
|
|
70
|
-
as it does not actually index any data into Elasticsearch. The API runs the default
|
|
71
|
-
and final pipeline for that index against a set of documents provided in the
|
|
72
|
-
body of the request. If a pipeline contains a reroute processor, it follows that
|
|
73
|
-
reroute processor to the new index, running that index's pipelines as well the
|
|
74
|
-
same way that a non-simulated ingest would. No data is indexed into Elasticsearch.
|
|
75
|
-
Instead, the transformed document is returned, along with the list of pipelines
|
|
76
|
-
that have been run and the name of the index where the document would have been
|
|
77
|
-
indexed if this were not a simulation. The transformed document is validated
|
|
78
|
-
against the mappings that would apply to this index, and any validation error
|
|
79
|
-
is reported in the result. This API differs from the simulate pipeline API in
|
|
80
|
-
that you specify a single pipeline for that API, and it runs only that one pipeline.
|
|
81
|
-
The simulate pipeline API is more useful for developing a single pipeline, while
|
|
82
|
-
the simulate ingest API is more useful for troubleshooting the interaction of
|
|
83
|
-
the various pipelines that get applied when ingesting into an index. By default,
|
|
84
|
-
the pipeline definitions that are currently in the system are used. However,
|
|
85
|
-
you can supply substitute pipeline definitions in the body of the request. These
|
|
86
|
-
will be used in place of the pipeline definitions that are already in the system.
|
|
87
|
-
This can be used to replace existing pipeline definitions or to create new ones.
|
|
88
|
-
The pipeline substitutions are used only within this request.
|
|
67
|
+
.. raw:: html
|
|
89
68
|
|
|
90
|
-
|
|
69
|
+
<p>Simulate data ingestion.
|
|
70
|
+
Run ingest pipelines against a set of provided documents, optionally with substitute pipeline definitions, to simulate ingesting data into an index.</p>
|
|
71
|
+
<p>This API is meant to be used for troubleshooting or pipeline development, as it does not actually index any data into Elasticsearch.</p>
|
|
72
|
+
<p>The API runs the default and final pipeline for that index against a set of documents provided in the body of the request.
|
|
73
|
+
If a pipeline contains a reroute processor, it follows that reroute processor to the new index, running that index's pipelines as well the same way that a non-simulated ingest would.
|
|
74
|
+
No data is indexed into Elasticsearch.
|
|
75
|
+
Instead, the transformed document is returned, along with the list of pipelines that have been run and the name of the index where the document would have been indexed if this were not a simulation.
|
|
76
|
+
The transformed document is validated against the mappings that would apply to this index, and any validation error is reported in the result.</p>
|
|
77
|
+
<p>This API differs from the simulate pipeline API in that you specify a single pipeline for that API, and it runs only that one pipeline.
|
|
78
|
+
The simulate pipeline API is more useful for developing a single pipeline, while the simulate ingest API is more useful for troubleshooting the interaction of the various pipelines that get applied when ingesting into an index.</p>
|
|
79
|
+
<p>By default, the pipeline definitions that are currently in the system are used.
|
|
80
|
+
However, you can supply substitute pipeline definitions in the body of the request.
|
|
81
|
+
These will be used in place of the pipeline definitions that are already in the system. This can be used to replace existing pipeline definitions or to create new ones. The pipeline substitutions are used only within this request.</p>
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
`<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-simulate-ingest>`_
|
|
91
85
|
|
|
92
86
|
:param docs: Sample documents to test in the pipeline.
|
|
93
87
|
:param index: The index to simulate ingesting into. This value can be overridden
|
|
@@ -96,7 +90,7 @@ class SimulateClient(NamespacedClient):
|
|
|
96
90
|
an index argument.
|
|
97
91
|
:param component_template_substitutions: A map of component template names to
|
|
98
92
|
substitute component template definition objects.
|
|
99
|
-
:param
|
|
93
|
+
:param index_template_substitutions: A map of index template names to substitute
|
|
100
94
|
index template definition objects.
|
|
101
95
|
:param mapping_addition:
|
|
102
96
|
:param pipeline: The pipeline to use as the default pipeline. This value can
|
|
@@ -133,8 +127,8 @@ class SimulateClient(NamespacedClient):
|
|
|
133
127
|
__body["component_template_substitutions"] = (
|
|
134
128
|
component_template_substitutions
|
|
135
129
|
)
|
|
136
|
-
if
|
|
137
|
-
__body["
|
|
130
|
+
if index_template_substitutions is not None:
|
|
131
|
+
__body["index_template_substitutions"] = index_template_substitutions
|
|
138
132
|
if mapping_addition is not None:
|
|
139
133
|
__body["mapping_addition"] = mapping_addition
|
|
140
134
|
if pipeline_substitutions is not None:
|
|
@@ -38,11 +38,14 @@ class SlmClient(NamespacedClient):
|
|
|
38
38
|
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
39
39
|
) -> ObjectApiResponse[t.Any]:
|
|
40
40
|
"""
|
|
41
|
-
|
|
42
|
-
prevents any future snapshots from being taken but does not cancel in-progress
|
|
43
|
-
snapshots or remove previously-taken snapshots.
|
|
41
|
+
.. raw:: html
|
|
44
42
|
|
|
45
|
-
|
|
43
|
+
<p>Delete a policy.
|
|
44
|
+
Delete a snapshot lifecycle policy definition.
|
|
45
|
+
This operation prevents any future snapshots from being taken but does not cancel in-progress snapshots or remove previously-taken snapshots.</p>
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
`<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-slm-delete-lifecycle>`_
|
|
46
49
|
|
|
47
50
|
:param policy_id: The id of the snapshot lifecycle policy to remove
|
|
48
51
|
:param master_timeout: The period to wait for a connection to the master node.
|
|
@@ -91,12 +94,14 @@ class SlmClient(NamespacedClient):
|
|
|
91
94
|
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
92
95
|
) -> ObjectApiResponse[t.Any]:
|
|
93
96
|
"""
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
97
|
+
.. raw:: html
|
|
98
|
+
|
|
99
|
+
<p>Run a policy.
|
|
100
|
+
Immediately create a snapshot according to the snapshot lifecycle policy without waiting for the scheduled time.
|
|
101
|
+
The snapshot policy is normally applied according to its schedule, but you might want to manually run a policy before performing an upgrade or other maintenance.</p>
|
|
98
102
|
|
|
99
|
-
|
|
103
|
+
|
|
104
|
+
`<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-slm-execute-lifecycle>`_
|
|
100
105
|
|
|
101
106
|
:param policy_id: The id of the snapshot lifecycle policy to be executed
|
|
102
107
|
:param master_timeout: The period to wait for a connection to the master node.
|
|
@@ -144,11 +149,14 @@ class SlmClient(NamespacedClient):
|
|
|
144
149
|
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
145
150
|
) -> ObjectApiResponse[t.Any]:
|
|
146
151
|
"""
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
152
|
+
.. raw:: html
|
|
153
|
+
|
|
154
|
+
<p>Run a retention policy.
|
|
155
|
+
Manually apply the retention policy to force immediate removal of snapshots that are expired according to the snapshot lifecycle policy retention rules.
|
|
156
|
+
The retention policy is normally applied according to its schedule.</p>
|
|
150
157
|
|
|
151
|
-
|
|
158
|
+
|
|
159
|
+
`<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-slm-execute-retention>`_
|
|
152
160
|
|
|
153
161
|
:param master_timeout: The period to wait for a connection to the master node.
|
|
154
162
|
If no response is received before the timeout expires, the request fails
|
|
@@ -194,10 +202,13 @@ class SlmClient(NamespacedClient):
|
|
|
194
202
|
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
195
203
|
) -> ObjectApiResponse[t.Any]:
|
|
196
204
|
"""
|
|
197
|
-
|
|
198
|
-
|
|
205
|
+
.. raw:: html
|
|
206
|
+
|
|
207
|
+
<p>Get policy information.
|
|
208
|
+
Get snapshot lifecycle policy definitions and information about the latest snapshot attempts.</p>
|
|
209
|
+
|
|
199
210
|
|
|
200
|
-
`<https://www.elastic.co/
|
|
211
|
+
`<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-slm-get-lifecycle>`_
|
|
201
212
|
|
|
202
213
|
:param policy_id: Comma-separated list of snapshot lifecycle policies to retrieve
|
|
203
214
|
:param master_timeout: The period to wait for a connection to the master node.
|
|
@@ -248,10 +259,13 @@ class SlmClient(NamespacedClient):
|
|
|
248
259
|
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
249
260
|
) -> ObjectApiResponse[t.Any]:
|
|
250
261
|
"""
|
|
251
|
-
|
|
252
|
-
|
|
262
|
+
.. raw:: html
|
|
263
|
+
|
|
264
|
+
<p>Get snapshot lifecycle management statistics.
|
|
265
|
+
Get global and policy-level statistics about actions taken by snapshot lifecycle management.</p>
|
|
266
|
+
|
|
253
267
|
|
|
254
|
-
`<https://www.elastic.co/
|
|
268
|
+
`<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-slm-get-stats>`_
|
|
255
269
|
|
|
256
270
|
:param master_timeout: Period to wait for a connection to the master node. If
|
|
257
271
|
no response is received before the timeout expires, the request fails and
|
|
@@ -296,9 +310,12 @@ class SlmClient(NamespacedClient):
|
|
|
296
310
|
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
297
311
|
) -> ObjectApiResponse[t.Any]:
|
|
298
312
|
"""
|
|
299
|
-
|
|
313
|
+
.. raw:: html
|
|
300
314
|
|
|
301
|
-
|
|
315
|
+
<p>Get the snapshot lifecycle management status.</p>
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
`<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-slm-get-status>`_
|
|
302
319
|
|
|
303
320
|
:param master_timeout: The period to wait for a connection to the master node.
|
|
304
321
|
If no response is received before the timeout expires, the request fails
|
|
@@ -354,11 +371,15 @@ class SlmClient(NamespacedClient):
|
|
|
354
371
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
355
372
|
) -> ObjectApiResponse[t.Any]:
|
|
356
373
|
"""
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
374
|
+
.. raw:: html
|
|
375
|
+
|
|
376
|
+
<p>Create or update a policy.
|
|
377
|
+
Create or update a snapshot lifecycle policy.
|
|
378
|
+
If the policy already exists, this request increments the policy version.
|
|
379
|
+
Only the latest version of a policy is stored.</p>
|
|
360
380
|
|
|
361
|
-
|
|
381
|
+
|
|
382
|
+
`<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-slm-put-lifecycle>`_
|
|
362
383
|
|
|
363
384
|
:param policy_id: The identifier for the snapshot lifecycle policy you want to
|
|
364
385
|
create or update.
|
|
@@ -437,11 +458,14 @@ class SlmClient(NamespacedClient):
|
|
|
437
458
|
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
438
459
|
) -> ObjectApiResponse[t.Any]:
|
|
439
460
|
"""
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
461
|
+
.. raw:: html
|
|
462
|
+
|
|
463
|
+
<p>Start snapshot lifecycle management.
|
|
464
|
+
Snapshot lifecycle management (SLM) starts automatically when a cluster is formed.
|
|
465
|
+
Manually starting SLM is necessary only if it has been stopped using the stop SLM API.</p>
|
|
443
466
|
|
|
444
|
-
|
|
467
|
+
|
|
468
|
+
`<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-slm-start>`_
|
|
445
469
|
|
|
446
470
|
:param master_timeout: The period to wait for a connection to the master node.
|
|
447
471
|
If no response is received before the timeout expires, the request fails
|
|
@@ -488,17 +512,18 @@ class SlmClient(NamespacedClient):
|
|
|
488
512
|
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
489
513
|
) -> ObjectApiResponse[t.Any]:
|
|
490
514
|
"""
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
515
|
+
.. raw:: html
|
|
516
|
+
|
|
517
|
+
<p>Stop snapshot lifecycle management.
|
|
518
|
+
Stop all snapshot lifecycle management (SLM) operations and the SLM plugin.
|
|
519
|
+
This API is useful when you are performing maintenance on a cluster and need to prevent SLM from performing any actions on your data streams or indices.
|
|
520
|
+
Stopping SLM does not stop any snapshots that are in progress.
|
|
521
|
+
You can manually trigger snapshots with the run snapshot lifecycle policy API even if SLM is stopped.</p>
|
|
522
|
+
<p>The API returns a response as soon as the request is acknowledged, but the plugin might continue to run until in-progress operations complete and it can be safely stopped.
|
|
523
|
+
Use the get snapshot lifecycle management status API to see if SLM is running.</p>
|
|
524
|
+
|
|
525
|
+
|
|
526
|
+
`<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-slm-stop>`_
|
|
502
527
|
|
|
503
528
|
:param master_timeout: The period to wait for a connection to the master node.
|
|
504
529
|
If no response is received before the timeout expires, the request fails
|