elasticsearch-serverless 0.0.8.20231031.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/elasticsearch-serverless/api/async_search/delete.rb +53 -0
- data/lib/elasticsearch-serverless/api/async_search/get.rb +56 -0
- data/lib/elasticsearch-serverless/api/async_search/status.rb +53 -0
- data/lib/elasticsearch-serverless/api/async_search/submit.rb +102 -0
- data/lib/elasticsearch-serverless/api/bulk.rb +72 -0
- data/lib/elasticsearch-serverless/api/cat/aliases.rb +64 -0
- data/lib/elasticsearch-serverless/api/cat/component_templates.rb +62 -0
- data/lib/elasticsearch-serverless/api/cat/count.rb +63 -0
- data/lib/elasticsearch-serverless/api/cat/help.rb +55 -0
- data/lib/elasticsearch-serverless/api/cat/indices.rb +69 -0
- data/lib/elasticsearch-serverless/api/cat/ml_data_frame_analytics.rb +67 -0
- data/lib/elasticsearch-serverless/api/cat/ml_datafeeds.rb +66 -0
- data/lib/elasticsearch-serverless/api/cat/ml_jobs.rb +67 -0
- data/lib/elasticsearch-serverless/api/cat/ml_trained_models.rb +68 -0
- data/lib/elasticsearch-serverless/api/cat/transforms.rb +68 -0
- data/lib/elasticsearch-serverless/api/clear_scroll.rb +67 -0
- data/lib/elasticsearch-serverless/api/close_point_in_time.rb +47 -0
- data/lib/elasticsearch-serverless/api/cluster/delete_component_template.rb +55 -0
- data/lib/elasticsearch-serverless/api/cluster/exists_component_template.rb +57 -0
- data/lib/elasticsearch-serverless/api/cluster/get_component_template.rb +59 -0
- data/lib/elasticsearch-serverless/api/cluster/info.rb +53 -0
- data/lib/elasticsearch-serverless/api/cluster/put_component_template.rb +57 -0
- data/lib/elasticsearch-serverless/api/count.rb +73 -0
- data/lib/elasticsearch-serverless/api/create.rb +51 -0
- data/lib/elasticsearch-serverless/api/delete.rb +71 -0
- data/lib/elasticsearch-serverless/api/delete_by_query.rb +82 -0
- data/lib/elasticsearch-serverless/api/delete_script.rb +53 -0
- data/lib/elasticsearch-serverless/api/enrich/delete_policy.rb +53 -0
- data/lib/elasticsearch-serverless/api/enrich/execute_policy.rb +54 -0
- data/lib/elasticsearch-serverless/api/enrich/get_policy.rb +55 -0
- data/lib/elasticsearch-serverless/api/enrich/put_policy.rb +55 -0
- data/lib/elasticsearch-serverless/api/enrich/stats.rb +48 -0
- data/lib/elasticsearch-serverless/api/eql/delete.rb +53 -0
- data/lib/elasticsearch-serverless/api/eql/get.rb +55 -0
- data/lib/elasticsearch-serverless/api/eql/get_status.rb +53 -0
- data/lib/elasticsearch-serverless/api/eql/search.rb +61 -0
- data/lib/elasticsearch-serverless/api/exists.rb +67 -0
- data/lib/elasticsearch-serverless/api/exists_source.rb +66 -0
- data/lib/elasticsearch-serverless/api/explain.rb +73 -0
- data/lib/elasticsearch-serverless/api/field_caps.rb +66 -0
- data/lib/elasticsearch-serverless/api/get.rb +73 -0
- data/lib/elasticsearch-serverless/api/get_script.rb +52 -0
- data/lib/elasticsearch-serverless/api/get_source.rb +65 -0
- data/lib/elasticsearch-serverless/api/graph/explore.rb +61 -0
- data/lib/elasticsearch-serverless/api/index.rb +71 -0
- data/lib/elasticsearch-serverless/api/indices/add_block.rb +62 -0
- data/lib/elasticsearch-serverless/api/indices/analyze.rb +61 -0
- data/lib/elasticsearch-serverless/api/indices/create.rb +57 -0
- data/lib/elasticsearch-serverless/api/indices/create_data_stream.rb +53 -0
- data/lib/elasticsearch-serverless/api/indices/data_streams_stats.rb +56 -0
- data/lib/elasticsearch-serverless/api/indices/delete.rb +66 -0
- data/lib/elasticsearch-serverless/api/indices/delete_alias.rb +61 -0
- data/lib/elasticsearch-serverless/api/indices/delete_data_lifecycle.rb +56 -0
- data/lib/elasticsearch-serverless/api/indices/delete_data_stream.rb +54 -0
- data/lib/elasticsearch-serverless/api/indices/delete_index_template.rb +55 -0
- data/lib/elasticsearch-serverless/api/indices/exists.rb +61 -0
- data/lib/elasticsearch-serverless/api/indices/exists_alias.rb +66 -0
- data/lib/elasticsearch-serverless/api/indices/exists_index_template.rb +56 -0
- data/lib/elasticsearch-serverless/api/indices/explain_data_lifecycle.rb +55 -0
- data/lib/elasticsearch-serverless/api/indices/get.rb +61 -0
- data/lib/elasticsearch-serverless/api/indices/get_alias.rb +66 -0
- data/lib/elasticsearch-serverless/api/indices/get_data_lifecycle.rb +55 -0
- data/lib/elasticsearch-serverless/api/indices/get_data_stream.rb +57 -0
- data/lib/elasticsearch-serverless/api/indices/get_index_template.rb +59 -0
- data/lib/elasticsearch-serverless/api/indices/get_mapping.rb +60 -0
- data/lib/elasticsearch-serverless/api/indices/get_settings.rb +69 -0
- data/lib/elasticsearch-serverless/api/indices/migrate_to_data_stream.rb +53 -0
- data/lib/elasticsearch-serverless/api/indices/modify_data_stream.rb +51 -0
- data/lib/elasticsearch-serverless/api/indices/put_alias.rb +62 -0
- data/lib/elasticsearch-serverless/api/indices/put_data_lifecycle.rb +57 -0
- data/lib/elasticsearch-serverless/api/indices/put_index_template.rb +56 -0
- data/lib/elasticsearch-serverless/api/indices/put_mapping.rb +61 -0
- data/lib/elasticsearch-serverless/api/indices/put_settings.rb +65 -0
- data/lib/elasticsearch-serverless/api/indices/put_template.rb +60 -0
- data/lib/elasticsearch-serverless/api/indices/refresh.rb +58 -0
- data/lib/elasticsearch-serverless/api/indices/resolve_index.rb +54 -0
- data/lib/elasticsearch-serverless/api/indices/rollover.rb +66 -0
- data/lib/elasticsearch-serverless/api/indices/simulate_index_template.rb +57 -0
- data/lib/elasticsearch-serverless/api/indices/simulate_template.rb +59 -0
- data/lib/elasticsearch-serverless/api/indices/update_aliases.rb +53 -0
- data/lib/elasticsearch-serverless/api/indices/validate_query.rb +73 -0
- data/lib/elasticsearch-serverless/api/info.rb +46 -0
- data/lib/elasticsearch-serverless/api/ingest/delete_pipeline.rb +55 -0
- data/lib/elasticsearch-serverless/api/ingest/get_pipeline.rb +57 -0
- data/lib/elasticsearch-serverless/api/ingest/processor_grok.rb +48 -0
- data/lib/elasticsearch-serverless/api/ingest/put_pipeline.rb +58 -0
- data/lib/elasticsearch-serverless/api/ingest/simulate.rb +59 -0
- data/lib/elasticsearch-serverless/api/license/get.rb +50 -0
- data/lib/elasticsearch-serverless/api/logstash/delete_pipeline.rb +53 -0
- data/lib/elasticsearch-serverless/api/logstash/get_pipeline.rb +55 -0
- data/lib/elasticsearch-serverless/api/logstash/put_pipeline.rb +55 -0
- data/lib/elasticsearch-serverless/api/machine_learning/close_job.rb +57 -0
- data/lib/elasticsearch-serverless/api/machine_learning/delete_calendar.rb +53 -0
- data/lib/elasticsearch-serverless/api/machine_learning/delete_calendar_event.rb +57 -0
- data/lib/elasticsearch-serverless/api/machine_learning/delete_calendar_job.rb +57 -0
- data/lib/elasticsearch-serverless/api/machine_learning/delete_data_frame_analytics.rb +55 -0
- data/lib/elasticsearch-serverless/api/machine_learning/delete_datafeed.rb +54 -0
- data/lib/elasticsearch-serverless/api/machine_learning/delete_filter.rb +53 -0
- data/lib/elasticsearch-serverless/api/machine_learning/delete_job.rb +56 -0
- data/lib/elasticsearch-serverless/api/machine_learning/delete_trained_model.rb +54 -0
- data/lib/elasticsearch-serverless/api/machine_learning/delete_trained_model_alias.rb +57 -0
- data/lib/elasticsearch-serverless/api/machine_learning/estimate_model_memory.rb +51 -0
- data/lib/elasticsearch-serverless/api/machine_learning/evaluate_data_frame.rb +51 -0
- data/lib/elasticsearch-serverless/api/machine_learning/flush_job.rb +59 -0
- data/lib/elasticsearch-serverless/api/machine_learning/get_calendar_events.rb +58 -0
- data/lib/elasticsearch-serverless/api/machine_learning/get_calendars.rb +63 -0
- data/lib/elasticsearch-serverless/api/machine_learning/get_data_frame_analytics.rb +59 -0
- data/lib/elasticsearch-serverless/api/machine_learning/get_data_frame_analytics_stats.rb +59 -0
- data/lib/elasticsearch-serverless/api/machine_learning/get_datafeed_stats.rb +56 -0
- data/lib/elasticsearch-serverless/api/machine_learning/get_datafeeds.rb +57 -0
- data/lib/elasticsearch-serverless/api/machine_learning/get_filters.rb +57 -0
- data/lib/elasticsearch-serverless/api/machine_learning/get_job_stats.rb +56 -0
- data/lib/elasticsearch-serverless/api/machine_learning/get_jobs.rb +57 -0
- data/lib/elasticsearch-serverless/api/machine_learning/get_overall_buckets.rb +66 -0
- data/lib/elasticsearch-serverless/api/machine_learning/get_trained_models.rb +62 -0
- data/lib/elasticsearch-serverless/api/machine_learning/get_trained_models_stats.rb +58 -0
- data/lib/elasticsearch-serverless/api/machine_learning/infer_trained_model.rb +63 -0
- data/lib/elasticsearch-serverless/api/machine_learning/open_job.rb +55 -0
- data/lib/elasticsearch-serverless/api/machine_learning/post_calendar_events.rb +55 -0
- data/lib/elasticsearch-serverless/api/machine_learning/preview_data_frame_analytics.rb +61 -0
- data/lib/elasticsearch-serverless/api/machine_learning/preview_datafeed.rb +63 -0
- data/lib/elasticsearch-serverless/api/machine_learning/put_calendar.rb +54 -0
- data/lib/elasticsearch-serverless/api/machine_learning/put_calendar_job.rb +57 -0
- data/lib/elasticsearch-serverless/api/machine_learning/put_data_frame_analytics.rb +55 -0
- data/lib/elasticsearch-serverless/api/machine_learning/put_datafeed.rb +59 -0
- data/lib/elasticsearch-serverless/api/machine_learning/put_filter.rb +55 -0
- data/lib/elasticsearch-serverless/api/machine_learning/put_job.rb +55 -0
- data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model.rb +56 -0
- data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model_alias.rb +58 -0
- data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model_definition_part.rb +59 -0
- data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model_vocabulary.rb +55 -0
- data/lib/elasticsearch-serverless/api/machine_learning/reset_job.rb +55 -0
- data/lib/elasticsearch-serverless/api/machine_learning/start_data_frame_analytics.rb +54 -0
- data/lib/elasticsearch-serverless/api/machine_learning/start_datafeed.rb +57 -0
- data/lib/elasticsearch-serverless/api/machine_learning/start_trained_model_deployment.rb +60 -0
- data/lib/elasticsearch-serverless/api/machine_learning/stop_data_frame_analytics.rb +56 -0
- data/lib/elasticsearch-serverless/api/machine_learning/stop_datafeed.rb +57 -0
- data/lib/elasticsearch-serverless/api/machine_learning/stop_trained_model_deployment.rb +55 -0
- data/lib/elasticsearch-serverless/api/machine_learning/update_data_frame_analytics.rb +55 -0
- data/lib/elasticsearch-serverless/api/machine_learning/update_datafeed.rb +59 -0
- data/lib/elasticsearch-serverless/api/machine_learning/update_filter.rb +55 -0
- data/lib/elasticsearch-serverless/api/machine_learning/update_job.rb +55 -0
- data/lib/elasticsearch-serverless/api/mget.rb +64 -0
- data/lib/elasticsearch-serverless/api/msearch.rb +91 -0
- data/lib/elasticsearch-serverless/api/msearch_template.rb +72 -0
- data/lib/elasticsearch-serverless/api/mtermvectors.rb +75 -0
- data/lib/elasticsearch-serverless/api/open_point_in_time.rb +56 -0
- data/lib/elasticsearch-serverless/api/ping.rb +52 -0
- data/lib/elasticsearch-serverless/api/put_script.rb +62 -0
- data/lib/elasticsearch-serverless/api/query_ruleset/delete.rb +57 -0
- data/lib/elasticsearch-serverless/api/query_ruleset/get.rb +57 -0
- data/lib/elasticsearch-serverless/api/query_ruleset/list.rb +54 -0
- data/lib/elasticsearch-serverless/api/query_ruleset/put.rb +59 -0
- data/lib/elasticsearch-serverless/api/rank_eval.rb +60 -0
- data/lib/elasticsearch-serverless/api/reindex.rb +59 -0
- data/lib/elasticsearch-serverless/api/render_search_template.rb +59 -0
- data/lib/elasticsearch-serverless/api/response.rb +48 -0
- data/lib/elasticsearch-serverless/api/scripts_painless_execute.rb +56 -0
- data/lib/elasticsearch-serverless/api/scroll.rb +66 -0
- data/lib/elasticsearch-serverless/api/search.rb +102 -0
- data/lib/elasticsearch-serverless/api/search_application/delete.rb +57 -0
- data/lib/elasticsearch-serverless/api/search_application/delete_behavioral_analytics.rb +57 -0
- data/lib/elasticsearch-serverless/api/search_application/get.rb +57 -0
- data/lib/elasticsearch-serverless/api/search_application/get_behavioral_analytics.rb +59 -0
- data/lib/elasticsearch-serverless/api/search_application/list.rb +55 -0
- data/lib/elasticsearch-serverless/api/search_application/put.rb +60 -0
- data/lib/elasticsearch-serverless/api/search_application/put_behavioral_analytics.rb +57 -0
- data/lib/elasticsearch-serverless/api/search_application/search.rb +63 -0
- data/lib/elasticsearch-serverless/api/search_mvt.rb +75 -0
- data/lib/elasticsearch-serverless/api/search_template.rb +69 -0
- data/lib/elasticsearch-serverless/api/security/authenticate.rb +48 -0
- data/lib/elasticsearch-serverless/api/security/create_api_key.rb +52 -0
- data/lib/elasticsearch-serverless/api/security/get_api_key.rb +54 -0
- data/lib/elasticsearch-serverless/api/security/has_privileges.rb +58 -0
- data/lib/elasticsearch-serverless/api/security/invalidate_api_key.rb +51 -0
- data/lib/elasticsearch-serverless/api/security/query_api_keys.rb +55 -0
- data/lib/elasticsearch-serverless/api/security/update_api_key.rb +54 -0
- data/lib/elasticsearch-serverless/api/sql/clear_cursor.rb +51 -0
- data/lib/elasticsearch-serverless/api/sql/delete_async.rb +53 -0
- data/lib/elasticsearch-serverless/api/sql/get_async.rb +57 -0
- data/lib/elasticsearch-serverless/api/sql/get_async_status.rb +53 -0
- data/lib/elasticsearch-serverless/api/sql/query.rb +52 -0
- data/lib/elasticsearch-serverless/api/sql/translate.rb +51 -0
- data/lib/elasticsearch-serverless/api/synonyms/delete_synonym.rb +57 -0
- data/lib/elasticsearch-serverless/api/synonyms/delete_synonym_rule.rb +61 -0
- data/lib/elasticsearch-serverless/api/synonyms/get_synonym.rb +59 -0
- data/lib/elasticsearch-serverless/api/synonyms/get_synonym_rule.rb +61 -0
- data/lib/elasticsearch-serverless/api/synonyms/get_synonyms_sets.rb +54 -0
- data/lib/elasticsearch-serverless/api/synonyms/put_synonym.rb +59 -0
- data/lib/elasticsearch-serverless/api/synonyms/put_synonym_rule.rb +63 -0
- data/lib/elasticsearch-serverless/api/tasks/get.rb +57 -0
- data/lib/elasticsearch-serverless/api/terms_enum.rb +57 -0
- data/lib/elasticsearch-serverless/api/termvectors.rb +82 -0
- data/lib/elasticsearch-serverless/api/transform/delete_transform.rb +55 -0
- data/lib/elasticsearch-serverless/api/transform/get_transform.rb +59 -0
- data/lib/elasticsearch-serverless/api/transform/get_transform_stats.rb +57 -0
- data/lib/elasticsearch-serverless/api/transform/preview_transform.rb +62 -0
- data/lib/elasticsearch-serverless/api/transform/put_transform.rb +57 -0
- data/lib/elasticsearch-serverless/api/transform/reset_transform.rb +54 -0
- data/lib/elasticsearch-serverless/api/transform/schedule_now_transform.rb +54 -0
- data/lib/elasticsearch-serverless/api/transform/start_transform.rb +55 -0
- data/lib/elasticsearch-serverless/api/transform/stop_transform.rb +58 -0
- data/lib/elasticsearch-serverless/api/transform/update_transform.rb +57 -0
- data/lib/elasticsearch-serverless/api/update.rb +77 -0
- data/lib/elasticsearch-serverless/api/update_by_query.rb +83 -0
- data/lib/elasticsearch-serverless/api/utils.rb +138 -0
- data/lib/elasticsearch-serverless/api.rb +98 -0
- data/lib/elasticsearch-serverless/version.rb +22 -0
- data/lib/elasticsearch-serverless.rb +105 -0
- metadata +321 -0
@@ -0,0 +1,73 @@
|
|
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
|
+
# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80
|
19
|
+
# @see https://github.com/elastic/elasticsearch-specification
|
20
|
+
#
|
21
|
+
module ElasticsearchServerless
|
22
|
+
module API
|
23
|
+
module Actions
|
24
|
+
# Returns a document.
|
25
|
+
#
|
26
|
+
# @option arguments [String] :id Unique identifier of the document. (*Required*)
|
27
|
+
# @option arguments [String] :index Name of the index that contains the document. (*Required*)
|
28
|
+
# @option arguments [String] :preference Specifies the node or shard the operation should be performed on. Random by default.
|
29
|
+
# @option arguments [Boolean] :realtime If +true+, the request is real-time as opposed to near-real-time. Server default: true.
|
30
|
+
# @option arguments [Boolean] :refresh If true, Elasticsearch refreshes the affected shards to make this operation visible to search. If false, do nothing with refreshes.
|
31
|
+
# @option arguments [String] :routing Target the specified primary shard.
|
32
|
+
# @option arguments [Boolean, String, Array<String>] :_source True or false to return the _source field or not, or a list of fields to return.
|
33
|
+
# @option arguments [String, Array<String>] :_source_excludes A comma-separated list of source fields to exclude in the response.
|
34
|
+
# @option arguments [String, Array<String>] :_source_includes A comma-separated list of source fields to include in the response.
|
35
|
+
# @option arguments [String, Array<String>] :stored_fields List of stored fields to return as part of a hit. If no fields are specified, no stored fields are included in the response. If this field is specified, the +_source+ parameter defaults to false.
|
36
|
+
# @option arguments [Integer] :version Explicit version number for concurrency control. The specified version must match the current version of the document for the request to succeed.
|
37
|
+
# @option arguments [String] :version_type Specific version type: internal, external, external_gte.
|
38
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
39
|
+
#
|
40
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html
|
41
|
+
#
|
42
|
+
def get(arguments = {})
|
43
|
+
raise ArgumentError, "Required argument 'index' missing" unless arguments[:index]
|
44
|
+
raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
|
45
|
+
|
46
|
+
arguments = arguments.clone
|
47
|
+
headers = arguments.delete(:headers) || {}
|
48
|
+
|
49
|
+
body = nil
|
50
|
+
|
51
|
+
_id = arguments.delete(:id)
|
52
|
+
|
53
|
+
_index = arguments.delete(:index)
|
54
|
+
|
55
|
+
method = ElasticsearchServerless::API::HTTP_GET
|
56
|
+
path = "#{Utils.listify(_index)}/_doc/#{Utils.listify(_id)}"
|
57
|
+
params = Utils.process_params(arguments)
|
58
|
+
|
59
|
+
if Array(arguments[:ignore]).include?(404)
|
60
|
+
Utils.rescue_from_not_found {
|
61
|
+
ElasticsearchServerless::API::Response.new(
|
62
|
+
perform_request(method, path, params, body, headers)
|
63
|
+
)
|
64
|
+
}
|
65
|
+
else
|
66
|
+
ElasticsearchServerless::API::Response.new(
|
67
|
+
perform_request(method, path, params, body, headers)
|
68
|
+
)
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
@@ -0,0 +1,52 @@
|
|
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
|
+
# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80
|
19
|
+
# @see https://github.com/elastic/elasticsearch-specification
|
20
|
+
#
|
21
|
+
module ElasticsearchServerless
|
22
|
+
module API
|
23
|
+
module Actions
|
24
|
+
# Returns a script.
|
25
|
+
#
|
26
|
+
# @option arguments [String] :id Identifier for the stored script or search template. (*Required*)
|
27
|
+
# @option arguments [Time] :master_timeout Specify timeout for connection to master
|
28
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
29
|
+
#
|
30
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html
|
31
|
+
#
|
32
|
+
def get_script(arguments = {})
|
33
|
+
raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
|
34
|
+
|
35
|
+
arguments = arguments.clone
|
36
|
+
headers = arguments.delete(:headers) || {}
|
37
|
+
|
38
|
+
body = nil
|
39
|
+
|
40
|
+
_id = arguments.delete(:id)
|
41
|
+
|
42
|
+
method = ElasticsearchServerless::API::HTTP_GET
|
43
|
+
path = "_scripts/#{Utils.listify(_id)}"
|
44
|
+
params = Utils.process_params(arguments)
|
45
|
+
|
46
|
+
ElasticsearchServerless::API::Response.new(
|
47
|
+
perform_request(method, path, params, body, headers)
|
48
|
+
)
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,65 @@
|
|
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
|
+
# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80
|
19
|
+
# @see https://github.com/elastic/elasticsearch-specification
|
20
|
+
#
|
21
|
+
module ElasticsearchServerless
|
22
|
+
module API
|
23
|
+
module Actions
|
24
|
+
# Returns the source of a document.
|
25
|
+
#
|
26
|
+
# @option arguments [String] :id Unique identifier of the document. (*Required*)
|
27
|
+
# @option arguments [String] :index Name of the index that contains the document. (*Required*)
|
28
|
+
# @option arguments [String] :preference Specifies the node or shard the operation should be performed on. Random by default.
|
29
|
+
# @option arguments [Boolean] :realtime Boolean) If true, the request is real-time as opposed to near-real-time. Server default: true.
|
30
|
+
# @option arguments [Boolean] :refresh If true, Elasticsearch refreshes the affected shards to make this operation visible to search. If false, do nothing with refreshes.
|
31
|
+
# @option arguments [String] :routing Target the specified primary shard.
|
32
|
+
# @option arguments [Boolean, String, Array<String>] :_source True or false to return the _source field or not, or a list of fields to return.
|
33
|
+
# @option arguments [String, Array<String>] :_source_excludes A comma-separated list of source fields to exclude in the response.
|
34
|
+
# @option arguments [String, Array<String>] :_source_includes A comma-separated list of source fields to include in the response.
|
35
|
+
# @option arguments [String, Array<String>] :stored_fields [TODO]
|
36
|
+
# @option arguments [Integer] :version Explicit version number for concurrency control. The specified version must match the current version of the document for the request to succeed.
|
37
|
+
# @option arguments [String] :version_type Specific version type: internal, external, external_gte.
|
38
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
39
|
+
#
|
40
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html
|
41
|
+
#
|
42
|
+
def get_source(arguments = {})
|
43
|
+
raise ArgumentError, "Required argument 'index' missing" unless arguments[:index]
|
44
|
+
raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
|
45
|
+
|
46
|
+
arguments = arguments.clone
|
47
|
+
headers = arguments.delete(:headers) || {}
|
48
|
+
|
49
|
+
body = nil
|
50
|
+
|
51
|
+
_id = arguments.delete(:id)
|
52
|
+
|
53
|
+
_index = arguments.delete(:index)
|
54
|
+
|
55
|
+
method = ElasticsearchServerless::API::HTTP_GET
|
56
|
+
path = "#{Utils.listify(_index)}/_source/#{Utils.listify(_id)}"
|
57
|
+
params = Utils.process_params(arguments)
|
58
|
+
|
59
|
+
ElasticsearchServerless::API::Response.new(
|
60
|
+
perform_request(method, path, params, body, headers)
|
61
|
+
)
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
@@ -0,0 +1,61 @@
|
|
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
|
+
# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80
|
19
|
+
# @see https://github.com/elastic/elasticsearch-specification
|
20
|
+
#
|
21
|
+
module ElasticsearchServerless
|
22
|
+
module API
|
23
|
+
module Graph
|
24
|
+
module Actions
|
25
|
+
# Explore extracted and summarized information about the documents and terms in an index.
|
26
|
+
#
|
27
|
+
# @option arguments [String, Array] :index Name of the index. (*Required*)
|
28
|
+
# @option arguments [String] :routing Custom value used to route operations to a specific shard.
|
29
|
+
# @option arguments [Time] :timeout Specifies the period of time to wait for a response from each shard. If no response is received before the timeout expires, the request fails and returns an error. Defaults to no timeout.
|
30
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
31
|
+
# @option arguments [Hash] :body request body
|
32
|
+
#
|
33
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/graph-explore-api.html
|
34
|
+
#
|
35
|
+
def explore(arguments = {})
|
36
|
+
raise ArgumentError, "Required argument 'index' missing" unless arguments[:index]
|
37
|
+
|
38
|
+
arguments = arguments.clone
|
39
|
+
headers = arguments.delete(:headers) || {}
|
40
|
+
|
41
|
+
body = arguments.delete(:body)
|
42
|
+
|
43
|
+
_index = arguments.delete(:index)
|
44
|
+
|
45
|
+
method = if body
|
46
|
+
ElasticsearchServerless::API::HTTP_POST
|
47
|
+
else
|
48
|
+
ElasticsearchServerless::API::HTTP_GET
|
49
|
+
end
|
50
|
+
|
51
|
+
path = "#{Utils.listify(_index)}/_graph/explore"
|
52
|
+
params = Utils.process_params(arguments)
|
53
|
+
|
54
|
+
ElasticsearchServerless::API::Response.new(
|
55
|
+
perform_request(method, path, params, body, headers)
|
56
|
+
)
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
@@ -0,0 +1,71 @@
|
|
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
|
+
# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80
|
19
|
+
# @see https://github.com/elastic/elasticsearch-specification
|
20
|
+
#
|
21
|
+
module ElasticsearchServerless
|
22
|
+
module API
|
23
|
+
module Actions
|
24
|
+
# Creates or updates a document in an index.
|
25
|
+
#
|
26
|
+
# @option arguments [String] :id Unique identifier for the document.
|
27
|
+
# @option arguments [String] :index Name of the data stream or index to target. (*Required*)
|
28
|
+
# @option arguments [Integer] :if_primary_term Only perform the operation if the document has this primary term.
|
29
|
+
# @option arguments [Integer] :if_seq_no Only perform the operation if the document has this sequence number.
|
30
|
+
# @option arguments [String] :op_type Set to create to only index the document if it does not already exist (put if absent). If a document with the specified +_id+ already exists, the indexing operation will fail. Same as using the +<index>/_create+ endpoint. Valid values: +index+, +create+. If document id is specified, it defaults to +index+. Otherwise, it defaults to +create+.
|
31
|
+
# @option arguments [String] :pipeline ID of the pipeline to use to preprocess incoming documents. If the index has a default ingest pipeline specified, then setting the value to +_none+ disables the default ingest pipeline for this request. If a final pipeline is configured it will always run, regardless of the value of this parameter.
|
32
|
+
# @option arguments [String] :refresh If +true+, Elasticsearch refreshes the affected shards to make this operation visible to search, if +wait_for+ then wait for a refresh to make this operation visible to search, if +false+ do nothing with refreshes. Valid values: +true+, +false+, +wait_for+.
|
33
|
+
# @option arguments [String] :routing Custom value used to route operations to a specific shard.
|
34
|
+
# @option arguments [Time] :timeout Period the request waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards. Server default: 1m.
|
35
|
+
# @option arguments [Integer] :version Explicit version number for concurrency control. The specified version must match the current version of the document for the request to succeed.
|
36
|
+
# @option arguments [String] :version_type Specific version type: +external+, +external_gte+.
|
37
|
+
# @option arguments [Integer, String] :wait_for_active_shards The number of shard copies that must be active before proceeding with the operation. Set to all or any positive integer up to the total number of shards in the index (+number_of_replicas+1+). Server default: 1.
|
38
|
+
# @option arguments [Boolean] :require_alias If +true+, the destination must be an index alias.
|
39
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
40
|
+
# @option arguments [Hash] :body document
|
41
|
+
#
|
42
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html
|
43
|
+
#
|
44
|
+
def index(arguments = {})
|
45
|
+
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
46
|
+
raise ArgumentError, "Required argument 'index' missing" unless arguments[:index]
|
47
|
+
|
48
|
+
arguments = arguments.clone
|
49
|
+
headers = arguments.delete(:headers) || {}
|
50
|
+
|
51
|
+
body = arguments.delete(:body)
|
52
|
+
|
53
|
+
_id = arguments.delete(:id)
|
54
|
+
|
55
|
+
_index = arguments.delete(:index)
|
56
|
+
|
57
|
+
method = _id ? ElasticsearchServerless::API::HTTP_PUT : ElasticsearchServerless::API::HTTP_POST
|
58
|
+
path = if _index && _id
|
59
|
+
"#{Utils.listify(_index)}/_doc/#{Utils.listify(_id)}"
|
60
|
+
else
|
61
|
+
"#{Utils.listify(_index)}/_doc"
|
62
|
+
end
|
63
|
+
params = Utils.process_params(arguments)
|
64
|
+
|
65
|
+
ElasticsearchServerless::API::Response.new(
|
66
|
+
perform_request(method, path, params, body, headers)
|
67
|
+
)
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
@@ -0,0 +1,62 @@
|
|
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
|
+
# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80
|
19
|
+
# @see https://github.com/elastic/elasticsearch-specification
|
20
|
+
#
|
21
|
+
module ElasticsearchServerless
|
22
|
+
module API
|
23
|
+
module Indices
|
24
|
+
module Actions
|
25
|
+
# Adds a block to an index.
|
26
|
+
#
|
27
|
+
# @option arguments [String] :index A comma separated list of indices to add a block to (*Required*)
|
28
|
+
# @option arguments [String] :block The block to add (one of read, write, read_only or metadata) (*Required*)
|
29
|
+
# @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes +_all+ string or when no indices have been specified)
|
30
|
+
# @option arguments [String, Array<String>] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both.
|
31
|
+
# @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed)
|
32
|
+
# @option arguments [Time] :master_timeout Specify timeout for connection to master
|
33
|
+
# @option arguments [Time] :timeout Explicit operation timeout
|
34
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
35
|
+
#
|
36
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/index-modules-blocks.html
|
37
|
+
#
|
38
|
+
def add_block(arguments = {})
|
39
|
+
raise ArgumentError, "Required argument 'index' missing" unless arguments[:index]
|
40
|
+
raise ArgumentError, "Required argument 'block' missing" unless arguments[:block]
|
41
|
+
|
42
|
+
arguments = arguments.clone
|
43
|
+
headers = arguments.delete(:headers) || {}
|
44
|
+
|
45
|
+
body = nil
|
46
|
+
|
47
|
+
_index = arguments.delete(:index)
|
48
|
+
|
49
|
+
_block = arguments.delete(:block)
|
50
|
+
|
51
|
+
method = ElasticsearchServerless::API::HTTP_PUT
|
52
|
+
path = "#{Utils.listify(_index)}/_block/#{Utils.listify(_block)}"
|
53
|
+
params = Utils.process_params(arguments)
|
54
|
+
|
55
|
+
ElasticsearchServerless::API::Response.new(
|
56
|
+
perform_request(method, path, params, body, headers)
|
57
|
+
)
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
@@ -0,0 +1,61 @@
|
|
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
|
+
# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80
|
19
|
+
# @see https://github.com/elastic/elasticsearch-specification
|
20
|
+
#
|
21
|
+
module ElasticsearchServerless
|
22
|
+
module API
|
23
|
+
module Indices
|
24
|
+
module Actions
|
25
|
+
# Performs the analysis process on a text and return the tokens breakdown of the text.
|
26
|
+
#
|
27
|
+
# @option arguments [String] :index Index used to derive the analyzer. If specified, the +analyzer+ or field parameter overrides this value. If no index is specified or the index does not have a default analyzer, the analyze API uses the standard analyzer.
|
28
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
29
|
+
# @option arguments [Hash] :body request body
|
30
|
+
#
|
31
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-analyze.html
|
32
|
+
#
|
33
|
+
def analyze(arguments = {})
|
34
|
+
arguments = arguments.clone
|
35
|
+
headers = arguments.delete(:headers) || {}
|
36
|
+
|
37
|
+
body = arguments.delete(:body)
|
38
|
+
|
39
|
+
_index = arguments.delete(:index)
|
40
|
+
|
41
|
+
method = if body
|
42
|
+
ElasticsearchServerless::API::HTTP_POST
|
43
|
+
else
|
44
|
+
ElasticsearchServerless::API::HTTP_GET
|
45
|
+
end
|
46
|
+
|
47
|
+
path = if _index
|
48
|
+
"#{Utils.listify(_index)}/_analyze"
|
49
|
+
else
|
50
|
+
"_analyze"
|
51
|
+
end
|
52
|
+
params = {}
|
53
|
+
|
54
|
+
ElasticsearchServerless::API::Response.new(
|
55
|
+
perform_request(method, path, params, body, headers)
|
56
|
+
)
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
@@ -0,0 +1,57 @@
|
|
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
|
+
# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80
|
19
|
+
# @see https://github.com/elastic/elasticsearch-specification
|
20
|
+
#
|
21
|
+
module ElasticsearchServerless
|
22
|
+
module API
|
23
|
+
module Indices
|
24
|
+
module Actions
|
25
|
+
# Creates an index with optional settings and mappings.
|
26
|
+
#
|
27
|
+
# @option arguments [String] :index Name of the index you wish to create. (*Required*)
|
28
|
+
# @option arguments [Time] :master_timeout Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
|
29
|
+
# @option arguments [Time] :timeout Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
|
30
|
+
# @option arguments [Integer, String] :wait_for_active_shards The number of shard copies that must be active before proceeding with the operation. Set to +all+ or any positive integer up to the total number of shards in the index (+number_of_replicas+1+). Server default: 1.
|
31
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
32
|
+
# @option arguments [Hash] :body request body
|
33
|
+
#
|
34
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-index.html
|
35
|
+
#
|
36
|
+
def create(arguments = {})
|
37
|
+
raise ArgumentError, "Required argument 'index' missing" unless arguments[:index]
|
38
|
+
|
39
|
+
arguments = arguments.clone
|
40
|
+
headers = arguments.delete(:headers) || {}
|
41
|
+
|
42
|
+
body = arguments.delete(:body)
|
43
|
+
|
44
|
+
_index = arguments.delete(:index)
|
45
|
+
|
46
|
+
method = ElasticsearchServerless::API::HTTP_PUT
|
47
|
+
path = "#{Utils.listify(_index)}"
|
48
|
+
params = Utils.process_params(arguments)
|
49
|
+
|
50
|
+
ElasticsearchServerless::API::Response.new(
|
51
|
+
perform_request(method, path, params, body, headers)
|
52
|
+
)
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
@@ -0,0 +1,53 @@
|
|
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
|
+
# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80
|
19
|
+
# @see https://github.com/elastic/elasticsearch-specification
|
20
|
+
#
|
21
|
+
module ElasticsearchServerless
|
22
|
+
module API
|
23
|
+
module Indices
|
24
|
+
module Actions
|
25
|
+
# Creates a data stream
|
26
|
+
#
|
27
|
+
# @option arguments [String] :name Name of the data stream, which must meet the following criteria: Lowercase only; Cannot include +\+, +/+, +*+, +?+, +"+, +<+, +>+, +|+, +,+, +#+, +:+, or a space character; Cannot start with +-+, +_+, +++, or +.ds-+; Cannot be +.+ or +..+; Cannot be longer than 255 bytes. Multi-byte characters count towards this limit faster. (*Required*)
|
28
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
29
|
+
#
|
30
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html
|
31
|
+
#
|
32
|
+
def create_data_stream(arguments = {})
|
33
|
+
raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]
|
34
|
+
|
35
|
+
arguments = arguments.clone
|
36
|
+
headers = arguments.delete(:headers) || {}
|
37
|
+
|
38
|
+
body = nil
|
39
|
+
|
40
|
+
_name = arguments.delete(:name)
|
41
|
+
|
42
|
+
method = ElasticsearchServerless::API::HTTP_PUT
|
43
|
+
path = "_data_stream/#{Utils.listify(_name)}"
|
44
|
+
params = {}
|
45
|
+
|
46
|
+
ElasticsearchServerless::API::Response.new(
|
47
|
+
perform_request(method, path, params, body, headers)
|
48
|
+
)
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
@@ -0,0 +1,56 @@
|
|
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
|
+
# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80
|
19
|
+
# @see https://github.com/elastic/elasticsearch-specification
|
20
|
+
#
|
21
|
+
module ElasticsearchServerless
|
22
|
+
module API
|
23
|
+
module Indices
|
24
|
+
module Actions
|
25
|
+
# Provides statistics on operations happening in a data stream.
|
26
|
+
#
|
27
|
+
# @option arguments [String] :name Comma-separated list of data streams used to limit the request. Wildcard expressions (+*+) are supported. To target all data streams in a cluster, omit this parameter or use +*+.
|
28
|
+
# @option arguments [String, Array<String>] :expand_wildcards Type of data stream that wildcard patterns can match. Supports comma-separated values, such as +open,hidden+. Server default: open.
|
29
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
30
|
+
#
|
31
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html
|
32
|
+
#
|
33
|
+
def data_streams_stats(arguments = {})
|
34
|
+
arguments = arguments.clone
|
35
|
+
headers = arguments.delete(:headers) || {}
|
36
|
+
|
37
|
+
body = nil
|
38
|
+
|
39
|
+
_name = arguments.delete(:name)
|
40
|
+
|
41
|
+
method = ElasticsearchServerless::API::HTTP_GET
|
42
|
+
path = if _name
|
43
|
+
"_data_stream/#{Utils.listify(_name)}/_stats"
|
44
|
+
else
|
45
|
+
"_data_stream/_stats"
|
46
|
+
end
|
47
|
+
params = Utils.process_params(arguments)
|
48
|
+
|
49
|
+
ElasticsearchServerless::API::Response.new(
|
50
|
+
perform_request(method, path, params, body, headers)
|
51
|
+
)
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|