elasticsearch-serverless 0.0.8.20231031.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (211) hide show
  1. checksums.yaml +7 -0
  2. data/lib/elasticsearch-serverless/api/async_search/delete.rb +53 -0
  3. data/lib/elasticsearch-serverless/api/async_search/get.rb +56 -0
  4. data/lib/elasticsearch-serverless/api/async_search/status.rb +53 -0
  5. data/lib/elasticsearch-serverless/api/async_search/submit.rb +102 -0
  6. data/lib/elasticsearch-serverless/api/bulk.rb +72 -0
  7. data/lib/elasticsearch-serverless/api/cat/aliases.rb +64 -0
  8. data/lib/elasticsearch-serverless/api/cat/component_templates.rb +62 -0
  9. data/lib/elasticsearch-serverless/api/cat/count.rb +63 -0
  10. data/lib/elasticsearch-serverless/api/cat/help.rb +55 -0
  11. data/lib/elasticsearch-serverless/api/cat/indices.rb +69 -0
  12. data/lib/elasticsearch-serverless/api/cat/ml_data_frame_analytics.rb +67 -0
  13. data/lib/elasticsearch-serverless/api/cat/ml_datafeeds.rb +66 -0
  14. data/lib/elasticsearch-serverless/api/cat/ml_jobs.rb +67 -0
  15. data/lib/elasticsearch-serverless/api/cat/ml_trained_models.rb +68 -0
  16. data/lib/elasticsearch-serverless/api/cat/transforms.rb +68 -0
  17. data/lib/elasticsearch-serverless/api/clear_scroll.rb +67 -0
  18. data/lib/elasticsearch-serverless/api/close_point_in_time.rb +47 -0
  19. data/lib/elasticsearch-serverless/api/cluster/delete_component_template.rb +55 -0
  20. data/lib/elasticsearch-serverless/api/cluster/exists_component_template.rb +57 -0
  21. data/lib/elasticsearch-serverless/api/cluster/get_component_template.rb +59 -0
  22. data/lib/elasticsearch-serverless/api/cluster/info.rb +53 -0
  23. data/lib/elasticsearch-serverless/api/cluster/put_component_template.rb +57 -0
  24. data/lib/elasticsearch-serverless/api/count.rb +73 -0
  25. data/lib/elasticsearch-serverless/api/create.rb +51 -0
  26. data/lib/elasticsearch-serverless/api/delete.rb +71 -0
  27. data/lib/elasticsearch-serverless/api/delete_by_query.rb +82 -0
  28. data/lib/elasticsearch-serverless/api/delete_script.rb +53 -0
  29. data/lib/elasticsearch-serverless/api/enrich/delete_policy.rb +53 -0
  30. data/lib/elasticsearch-serverless/api/enrich/execute_policy.rb +54 -0
  31. data/lib/elasticsearch-serverless/api/enrich/get_policy.rb +55 -0
  32. data/lib/elasticsearch-serverless/api/enrich/put_policy.rb +55 -0
  33. data/lib/elasticsearch-serverless/api/enrich/stats.rb +48 -0
  34. data/lib/elasticsearch-serverless/api/eql/delete.rb +53 -0
  35. data/lib/elasticsearch-serverless/api/eql/get.rb +55 -0
  36. data/lib/elasticsearch-serverless/api/eql/get_status.rb +53 -0
  37. data/lib/elasticsearch-serverless/api/eql/search.rb +61 -0
  38. data/lib/elasticsearch-serverless/api/exists.rb +67 -0
  39. data/lib/elasticsearch-serverless/api/exists_source.rb +66 -0
  40. data/lib/elasticsearch-serverless/api/explain.rb +73 -0
  41. data/lib/elasticsearch-serverless/api/field_caps.rb +66 -0
  42. data/lib/elasticsearch-serverless/api/get.rb +73 -0
  43. data/lib/elasticsearch-serverless/api/get_script.rb +52 -0
  44. data/lib/elasticsearch-serverless/api/get_source.rb +65 -0
  45. data/lib/elasticsearch-serverless/api/graph/explore.rb +61 -0
  46. data/lib/elasticsearch-serverless/api/index.rb +71 -0
  47. data/lib/elasticsearch-serverless/api/indices/add_block.rb +62 -0
  48. data/lib/elasticsearch-serverless/api/indices/analyze.rb +61 -0
  49. data/lib/elasticsearch-serverless/api/indices/create.rb +57 -0
  50. data/lib/elasticsearch-serverless/api/indices/create_data_stream.rb +53 -0
  51. data/lib/elasticsearch-serverless/api/indices/data_streams_stats.rb +56 -0
  52. data/lib/elasticsearch-serverless/api/indices/delete.rb +66 -0
  53. data/lib/elasticsearch-serverless/api/indices/delete_alias.rb +61 -0
  54. data/lib/elasticsearch-serverless/api/indices/delete_data_lifecycle.rb +56 -0
  55. data/lib/elasticsearch-serverless/api/indices/delete_data_stream.rb +54 -0
  56. data/lib/elasticsearch-serverless/api/indices/delete_index_template.rb +55 -0
  57. data/lib/elasticsearch-serverless/api/indices/exists.rb +61 -0
  58. data/lib/elasticsearch-serverless/api/indices/exists_alias.rb +66 -0
  59. data/lib/elasticsearch-serverless/api/indices/exists_index_template.rb +56 -0
  60. data/lib/elasticsearch-serverless/api/indices/explain_data_lifecycle.rb +55 -0
  61. data/lib/elasticsearch-serverless/api/indices/get.rb +61 -0
  62. data/lib/elasticsearch-serverless/api/indices/get_alias.rb +66 -0
  63. data/lib/elasticsearch-serverless/api/indices/get_data_lifecycle.rb +55 -0
  64. data/lib/elasticsearch-serverless/api/indices/get_data_stream.rb +57 -0
  65. data/lib/elasticsearch-serverless/api/indices/get_index_template.rb +59 -0
  66. data/lib/elasticsearch-serverless/api/indices/get_mapping.rb +60 -0
  67. data/lib/elasticsearch-serverless/api/indices/get_settings.rb +69 -0
  68. data/lib/elasticsearch-serverless/api/indices/migrate_to_data_stream.rb +53 -0
  69. data/lib/elasticsearch-serverless/api/indices/modify_data_stream.rb +51 -0
  70. data/lib/elasticsearch-serverless/api/indices/put_alias.rb +62 -0
  71. data/lib/elasticsearch-serverless/api/indices/put_data_lifecycle.rb +57 -0
  72. data/lib/elasticsearch-serverless/api/indices/put_index_template.rb +56 -0
  73. data/lib/elasticsearch-serverless/api/indices/put_mapping.rb +61 -0
  74. data/lib/elasticsearch-serverless/api/indices/put_settings.rb +65 -0
  75. data/lib/elasticsearch-serverless/api/indices/put_template.rb +60 -0
  76. data/lib/elasticsearch-serverless/api/indices/refresh.rb +58 -0
  77. data/lib/elasticsearch-serverless/api/indices/resolve_index.rb +54 -0
  78. data/lib/elasticsearch-serverless/api/indices/rollover.rb +66 -0
  79. data/lib/elasticsearch-serverless/api/indices/simulate_index_template.rb +57 -0
  80. data/lib/elasticsearch-serverless/api/indices/simulate_template.rb +59 -0
  81. data/lib/elasticsearch-serverless/api/indices/update_aliases.rb +53 -0
  82. data/lib/elasticsearch-serverless/api/indices/validate_query.rb +73 -0
  83. data/lib/elasticsearch-serverless/api/info.rb +46 -0
  84. data/lib/elasticsearch-serverless/api/ingest/delete_pipeline.rb +55 -0
  85. data/lib/elasticsearch-serverless/api/ingest/get_pipeline.rb +57 -0
  86. data/lib/elasticsearch-serverless/api/ingest/processor_grok.rb +48 -0
  87. data/lib/elasticsearch-serverless/api/ingest/put_pipeline.rb +58 -0
  88. data/lib/elasticsearch-serverless/api/ingest/simulate.rb +59 -0
  89. data/lib/elasticsearch-serverless/api/license/get.rb +50 -0
  90. data/lib/elasticsearch-serverless/api/logstash/delete_pipeline.rb +53 -0
  91. data/lib/elasticsearch-serverless/api/logstash/get_pipeline.rb +55 -0
  92. data/lib/elasticsearch-serverless/api/logstash/put_pipeline.rb +55 -0
  93. data/lib/elasticsearch-serverless/api/machine_learning/close_job.rb +57 -0
  94. data/lib/elasticsearch-serverless/api/machine_learning/delete_calendar.rb +53 -0
  95. data/lib/elasticsearch-serverless/api/machine_learning/delete_calendar_event.rb +57 -0
  96. data/lib/elasticsearch-serverless/api/machine_learning/delete_calendar_job.rb +57 -0
  97. data/lib/elasticsearch-serverless/api/machine_learning/delete_data_frame_analytics.rb +55 -0
  98. data/lib/elasticsearch-serverless/api/machine_learning/delete_datafeed.rb +54 -0
  99. data/lib/elasticsearch-serverless/api/machine_learning/delete_filter.rb +53 -0
  100. data/lib/elasticsearch-serverless/api/machine_learning/delete_job.rb +56 -0
  101. data/lib/elasticsearch-serverless/api/machine_learning/delete_trained_model.rb +54 -0
  102. data/lib/elasticsearch-serverless/api/machine_learning/delete_trained_model_alias.rb +57 -0
  103. data/lib/elasticsearch-serverless/api/machine_learning/estimate_model_memory.rb +51 -0
  104. data/lib/elasticsearch-serverless/api/machine_learning/evaluate_data_frame.rb +51 -0
  105. data/lib/elasticsearch-serverless/api/machine_learning/flush_job.rb +59 -0
  106. data/lib/elasticsearch-serverless/api/machine_learning/get_calendar_events.rb +58 -0
  107. data/lib/elasticsearch-serverless/api/machine_learning/get_calendars.rb +63 -0
  108. data/lib/elasticsearch-serverless/api/machine_learning/get_data_frame_analytics.rb +59 -0
  109. data/lib/elasticsearch-serverless/api/machine_learning/get_data_frame_analytics_stats.rb +59 -0
  110. data/lib/elasticsearch-serverless/api/machine_learning/get_datafeed_stats.rb +56 -0
  111. data/lib/elasticsearch-serverless/api/machine_learning/get_datafeeds.rb +57 -0
  112. data/lib/elasticsearch-serverless/api/machine_learning/get_filters.rb +57 -0
  113. data/lib/elasticsearch-serverless/api/machine_learning/get_job_stats.rb +56 -0
  114. data/lib/elasticsearch-serverless/api/machine_learning/get_jobs.rb +57 -0
  115. data/lib/elasticsearch-serverless/api/machine_learning/get_overall_buckets.rb +66 -0
  116. data/lib/elasticsearch-serverless/api/machine_learning/get_trained_models.rb +62 -0
  117. data/lib/elasticsearch-serverless/api/machine_learning/get_trained_models_stats.rb +58 -0
  118. data/lib/elasticsearch-serverless/api/machine_learning/infer_trained_model.rb +63 -0
  119. data/lib/elasticsearch-serverless/api/machine_learning/open_job.rb +55 -0
  120. data/lib/elasticsearch-serverless/api/machine_learning/post_calendar_events.rb +55 -0
  121. data/lib/elasticsearch-serverless/api/machine_learning/preview_data_frame_analytics.rb +61 -0
  122. data/lib/elasticsearch-serverless/api/machine_learning/preview_datafeed.rb +63 -0
  123. data/lib/elasticsearch-serverless/api/machine_learning/put_calendar.rb +54 -0
  124. data/lib/elasticsearch-serverless/api/machine_learning/put_calendar_job.rb +57 -0
  125. data/lib/elasticsearch-serverless/api/machine_learning/put_data_frame_analytics.rb +55 -0
  126. data/lib/elasticsearch-serverless/api/machine_learning/put_datafeed.rb +59 -0
  127. data/lib/elasticsearch-serverless/api/machine_learning/put_filter.rb +55 -0
  128. data/lib/elasticsearch-serverless/api/machine_learning/put_job.rb +55 -0
  129. data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model.rb +56 -0
  130. data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model_alias.rb +58 -0
  131. data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model_definition_part.rb +59 -0
  132. data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model_vocabulary.rb +55 -0
  133. data/lib/elasticsearch-serverless/api/machine_learning/reset_job.rb +55 -0
  134. data/lib/elasticsearch-serverless/api/machine_learning/start_data_frame_analytics.rb +54 -0
  135. data/lib/elasticsearch-serverless/api/machine_learning/start_datafeed.rb +57 -0
  136. data/lib/elasticsearch-serverless/api/machine_learning/start_trained_model_deployment.rb +60 -0
  137. data/lib/elasticsearch-serverless/api/machine_learning/stop_data_frame_analytics.rb +56 -0
  138. data/lib/elasticsearch-serverless/api/machine_learning/stop_datafeed.rb +57 -0
  139. data/lib/elasticsearch-serverless/api/machine_learning/stop_trained_model_deployment.rb +55 -0
  140. data/lib/elasticsearch-serverless/api/machine_learning/update_data_frame_analytics.rb +55 -0
  141. data/lib/elasticsearch-serverless/api/machine_learning/update_datafeed.rb +59 -0
  142. data/lib/elasticsearch-serverless/api/machine_learning/update_filter.rb +55 -0
  143. data/lib/elasticsearch-serverless/api/machine_learning/update_job.rb +55 -0
  144. data/lib/elasticsearch-serverless/api/mget.rb +64 -0
  145. data/lib/elasticsearch-serverless/api/msearch.rb +91 -0
  146. data/lib/elasticsearch-serverless/api/msearch_template.rb +72 -0
  147. data/lib/elasticsearch-serverless/api/mtermvectors.rb +75 -0
  148. data/lib/elasticsearch-serverless/api/open_point_in_time.rb +56 -0
  149. data/lib/elasticsearch-serverless/api/ping.rb +52 -0
  150. data/lib/elasticsearch-serverless/api/put_script.rb +62 -0
  151. data/lib/elasticsearch-serverless/api/query_ruleset/delete.rb +57 -0
  152. data/lib/elasticsearch-serverless/api/query_ruleset/get.rb +57 -0
  153. data/lib/elasticsearch-serverless/api/query_ruleset/list.rb +54 -0
  154. data/lib/elasticsearch-serverless/api/query_ruleset/put.rb +59 -0
  155. data/lib/elasticsearch-serverless/api/rank_eval.rb +60 -0
  156. data/lib/elasticsearch-serverless/api/reindex.rb +59 -0
  157. data/lib/elasticsearch-serverless/api/render_search_template.rb +59 -0
  158. data/lib/elasticsearch-serverless/api/response.rb +48 -0
  159. data/lib/elasticsearch-serverless/api/scripts_painless_execute.rb +56 -0
  160. data/lib/elasticsearch-serverless/api/scroll.rb +66 -0
  161. data/lib/elasticsearch-serverless/api/search.rb +102 -0
  162. data/lib/elasticsearch-serverless/api/search_application/delete.rb +57 -0
  163. data/lib/elasticsearch-serverless/api/search_application/delete_behavioral_analytics.rb +57 -0
  164. data/lib/elasticsearch-serverless/api/search_application/get.rb +57 -0
  165. data/lib/elasticsearch-serverless/api/search_application/get_behavioral_analytics.rb +59 -0
  166. data/lib/elasticsearch-serverless/api/search_application/list.rb +55 -0
  167. data/lib/elasticsearch-serverless/api/search_application/put.rb +60 -0
  168. data/lib/elasticsearch-serverless/api/search_application/put_behavioral_analytics.rb +57 -0
  169. data/lib/elasticsearch-serverless/api/search_application/search.rb +63 -0
  170. data/lib/elasticsearch-serverless/api/search_mvt.rb +75 -0
  171. data/lib/elasticsearch-serverless/api/search_template.rb +69 -0
  172. data/lib/elasticsearch-serverless/api/security/authenticate.rb +48 -0
  173. data/lib/elasticsearch-serverless/api/security/create_api_key.rb +52 -0
  174. data/lib/elasticsearch-serverless/api/security/get_api_key.rb +54 -0
  175. data/lib/elasticsearch-serverless/api/security/has_privileges.rb +58 -0
  176. data/lib/elasticsearch-serverless/api/security/invalidate_api_key.rb +51 -0
  177. data/lib/elasticsearch-serverless/api/security/query_api_keys.rb +55 -0
  178. data/lib/elasticsearch-serverless/api/security/update_api_key.rb +54 -0
  179. data/lib/elasticsearch-serverless/api/sql/clear_cursor.rb +51 -0
  180. data/lib/elasticsearch-serverless/api/sql/delete_async.rb +53 -0
  181. data/lib/elasticsearch-serverless/api/sql/get_async.rb +57 -0
  182. data/lib/elasticsearch-serverless/api/sql/get_async_status.rb +53 -0
  183. data/lib/elasticsearch-serverless/api/sql/query.rb +52 -0
  184. data/lib/elasticsearch-serverless/api/sql/translate.rb +51 -0
  185. data/lib/elasticsearch-serverless/api/synonyms/delete_synonym.rb +57 -0
  186. data/lib/elasticsearch-serverless/api/synonyms/delete_synonym_rule.rb +61 -0
  187. data/lib/elasticsearch-serverless/api/synonyms/get_synonym.rb +59 -0
  188. data/lib/elasticsearch-serverless/api/synonyms/get_synonym_rule.rb +61 -0
  189. data/lib/elasticsearch-serverless/api/synonyms/get_synonyms_sets.rb +54 -0
  190. data/lib/elasticsearch-serverless/api/synonyms/put_synonym.rb +59 -0
  191. data/lib/elasticsearch-serverless/api/synonyms/put_synonym_rule.rb +63 -0
  192. data/lib/elasticsearch-serverless/api/tasks/get.rb +57 -0
  193. data/lib/elasticsearch-serverless/api/terms_enum.rb +57 -0
  194. data/lib/elasticsearch-serverless/api/termvectors.rb +82 -0
  195. data/lib/elasticsearch-serverless/api/transform/delete_transform.rb +55 -0
  196. data/lib/elasticsearch-serverless/api/transform/get_transform.rb +59 -0
  197. data/lib/elasticsearch-serverless/api/transform/get_transform_stats.rb +57 -0
  198. data/lib/elasticsearch-serverless/api/transform/preview_transform.rb +62 -0
  199. data/lib/elasticsearch-serverless/api/transform/put_transform.rb +57 -0
  200. data/lib/elasticsearch-serverless/api/transform/reset_transform.rb +54 -0
  201. data/lib/elasticsearch-serverless/api/transform/schedule_now_transform.rb +54 -0
  202. data/lib/elasticsearch-serverless/api/transform/start_transform.rb +55 -0
  203. data/lib/elasticsearch-serverless/api/transform/stop_transform.rb +58 -0
  204. data/lib/elasticsearch-serverless/api/transform/update_transform.rb +57 -0
  205. data/lib/elasticsearch-serverless/api/update.rb +77 -0
  206. data/lib/elasticsearch-serverless/api/update_by_query.rb +83 -0
  207. data/lib/elasticsearch-serverless/api/utils.rb +138 -0
  208. data/lib/elasticsearch-serverless/api.rb +98 -0
  209. data/lib/elasticsearch-serverless/version.rb +22 -0
  210. data/lib/elasticsearch-serverless.rb +105 -0
  211. metadata +321 -0
@@ -0,0 +1,69 @@
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
+ # Allows to use the Mustache language to pre-render a search definition.
25
+ #
26
+ # @option arguments [String, Array] :index Comma-separated list of data streams, indices, and aliases to search. Supports wildcards (*).
27
+ # @option arguments [Boolean] :allow_no_indices If +false+, the request returns an error if any wildcard expression, index alias, or +_all+ value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request targeting +foo*,bar*+ returns an error if an index starts with +foo+ but no index starts with +bar+. Server default: true.
28
+ # @option arguments [Boolean] :ccs_minimize_roundtrips If +true+, network round-trips are minimized for cross-cluster search requests.
29
+ # @option arguments [String, Array<String>] :expand_wildcards Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as +open,hidden+. Valid values are: +all+, +open+, +closed+, +hidden+, +none+.
30
+ # @option arguments [Boolean] :explain If +true+, the response includes additional details about score computation as part of a hit.
31
+ # @option arguments [Boolean] :ignore_throttled If +true+, specified concrete, expanded, or aliased indices are not included in the response when throttled. Server default: true.
32
+ # @option arguments [Boolean] :ignore_unavailable If +false+, the request returns an error if it targets a missing or closed index.
33
+ # @option arguments [String] :preference Specifies the node or shard the operation should be performed on. Random by default.
34
+ # @option arguments [Boolean] :profile If +true+, the query execution is profiled.
35
+ # @option arguments [String] :routing Custom value used to route operations to a specific shard.
36
+ # @option arguments [Time] :scroll Specifies how long a consistent view of the index should be maintained for scrolled search.
37
+ # @option arguments [String] :search_type The type of the search operation.
38
+ # @option arguments [Boolean] :rest_total_hits_as_int If true, hits.total are rendered as an integer in the response.
39
+ # @option arguments [Boolean] :typed_keys If +true+, the response prefixes aggregation and suggester names with their respective types.
40
+ # @option arguments [Hash] :headers Custom HTTP headers
41
+ # @option arguments [Hash] :body request body
42
+ #
43
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html
44
+ #
45
+ def search_template(arguments = {})
46
+ raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
47
+
48
+ arguments = arguments.clone
49
+ headers = arguments.delete(:headers) || {}
50
+
51
+ body = arguments.delete(:body)
52
+
53
+ _index = arguments.delete(:index)
54
+
55
+ method = ElasticsearchServerless::API::HTTP_POST
56
+ path = if _index
57
+ "#{Utils.listify(_index)}/_search/template"
58
+ else
59
+ "_search/template"
60
+ end
61
+ params = Utils.process_params(arguments)
62
+
63
+ ElasticsearchServerless::API::Response.new(
64
+ perform_request(method, path, params, body, headers)
65
+ )
66
+ end
67
+ end
68
+ end
69
+ end
@@ -0,0 +1,48 @@
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 Security
24
+ module Actions
25
+ # Enables authentication as a user and retrieve information about the authenticated user.
26
+ #
27
+ # @option arguments [Hash] :headers Custom HTTP headers
28
+ #
29
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-authenticate.html
30
+ #
31
+ def authenticate(arguments = {})
32
+ arguments = arguments.clone
33
+ headers = arguments.delete(:headers) || {}
34
+
35
+ body = nil
36
+
37
+ method = ElasticsearchServerless::API::HTTP_GET
38
+ path = "_security/_authenticate"
39
+ params = {}
40
+
41
+ ElasticsearchServerless::API::Response.new(
42
+ perform_request(method, path, params, body, headers)
43
+ )
44
+ end
45
+ end
46
+ end
47
+ end
48
+ 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 Security
24
+ module Actions
25
+ # Creates an API key for access without requiring basic authentication.
26
+ #
27
+ # @option arguments [String] :refresh If +true+ (the default) then refresh 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+ then do nothing with refreshes.
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/security-api-create-api-key.html
32
+ #
33
+ def create_api_key(arguments = {})
34
+ raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
35
+
36
+ arguments = arguments.clone
37
+ headers = arguments.delete(:headers) || {}
38
+
39
+ body = arguments.delete(:body)
40
+
41
+ method = ElasticsearchServerless::API::HTTP_PUT
42
+ path = "_security/api_key"
43
+ params = Utils.process_params(arguments)
44
+
45
+ ElasticsearchServerless::API::Response.new(
46
+ perform_request(method, path, params, body, headers)
47
+ )
48
+ end
49
+ end
50
+ end
51
+ end
52
+ end
@@ -0,0 +1,54 @@
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 Security
24
+ module Actions
25
+ # Retrieves information for one or more API keys.
26
+ #
27
+ # @option arguments [String] :id An API key id. This parameter cannot be used with any of +name+, +realm_name+ or +username+.
28
+ # @option arguments [String] :name An API key name. This parameter cannot be used with any of +id+, +realm_name+ or +username+. It supports prefix search with wildcard.
29
+ # @option arguments [Boolean] :owner A boolean flag that can be used to query API keys owned by the currently authenticated user. The +realm_name+ or +username+ parameters cannot be specified when this parameter is set to +true+ as they are assumed to be the currently authenticated ones.
30
+ # @option arguments [String] :realm_name The name of an authentication realm. This parameter cannot be used with either +id+ or +name+ or when +owner+ flag is set to +true+.
31
+ # @option arguments [String] :username The username of a user. This parameter cannot be used with either +id+ or +name+ or when +owner+ flag is set to +true+.
32
+ # @option arguments [Boolean] :with_limited_by Return the snapshot of the owner user's role descriptors associated with the API key. An API key's actual permission is the intersection of its assigned role descriptors and the owner user's role descriptors.
33
+ # @option arguments [Hash] :headers Custom HTTP headers
34
+ #
35
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-api-key.html
36
+ #
37
+ def get_api_key(arguments = {})
38
+ arguments = arguments.clone
39
+ headers = arguments.delete(:headers) || {}
40
+
41
+ body = nil
42
+
43
+ method = ElasticsearchServerless::API::HTTP_GET
44
+ path = "_security/api_key"
45
+ params = Utils.process_params(arguments)
46
+
47
+ ElasticsearchServerless::API::Response.new(
48
+ perform_request(method, path, params, body, headers)
49
+ )
50
+ end
51
+ end
52
+ end
53
+ end
54
+ end
@@ -0,0 +1,58 @@
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 Security
24
+ module Actions
25
+ # Determines whether the specified user has a specified list of privileges.
26
+ #
27
+ # @option arguments [String] :user Username
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/security-api-has-privileges.html
32
+ #
33
+ def has_privileges(arguments = {})
34
+ raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
35
+
36
+ arguments = arguments.clone
37
+ headers = arguments.delete(:headers) || {}
38
+
39
+ body = arguments.delete(:body)
40
+
41
+ _user = arguments.delete(:user)
42
+
43
+ method = ElasticsearchServerless::API::HTTP_POST
44
+ path = if _user
45
+ "_security/user/#{Utils.listify(_user)}/_has_privileges"
46
+ else
47
+ "_security/user/_has_privileges"
48
+ end
49
+ params = {}
50
+
51
+ ElasticsearchServerless::API::Response.new(
52
+ perform_request(method, path, params, body, headers)
53
+ )
54
+ end
55
+ end
56
+ end
57
+ end
58
+ end
@@ -0,0 +1,51 @@
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 Security
24
+ module Actions
25
+ # Invalidates one or more API keys.
26
+ #
27
+ # @option arguments [Hash] :headers Custom HTTP headers
28
+ # @option arguments [Hash] :body request body
29
+ #
30
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-invalidate-api-key.html
31
+ #
32
+ def invalidate_api_key(arguments = {})
33
+ raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
34
+
35
+ arguments = arguments.clone
36
+ headers = arguments.delete(:headers) || {}
37
+
38
+ body = arguments.delete(:body)
39
+
40
+ method = ElasticsearchServerless::API::HTTP_DELETE
41
+ path = "_security/api_key"
42
+ params = {}
43
+
44
+ ElasticsearchServerless::API::Response.new(
45
+ perform_request(method, path, params, body, headers)
46
+ )
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,55 @@
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 Security
24
+ module Actions
25
+ # Retrieves information for API keys using a subset of query DSL
26
+ #
27
+ # @option arguments [Boolean] :with_limited_by Return the snapshot of the owner user's role descriptors associated with the API key. An API key's actual permission is the intersection of its assigned role descriptors and the owner user's role descriptors.
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/security-api-query-api-key.html
32
+ #
33
+ def query_api_keys(arguments = {})
34
+ arguments = arguments.clone
35
+ headers = arguments.delete(:headers) || {}
36
+
37
+ body = arguments.delete(:body)
38
+
39
+ method = if body
40
+ ElasticsearchServerless::API::HTTP_POST
41
+ else
42
+ ElasticsearchServerless::API::HTTP_GET
43
+ end
44
+
45
+ path = "_security/_query/api_key"
46
+ params = Utils.process_params(arguments)
47
+
48
+ ElasticsearchServerless::API::Response.new(
49
+ perform_request(method, path, params, body, headers)
50
+ )
51
+ end
52
+ end
53
+ end
54
+ end
55
+ end
@@ -0,0 +1,54 @@
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 Security
24
+ module Actions
25
+ # Updates attributes of an existing API key.
26
+ #
27
+ # @option arguments [String] :id The ID of the API key to update. (*Required*)
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/security-api-update-api-key.html
32
+ #
33
+ def update_api_key(arguments = {})
34
+ raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
35
+
36
+ arguments = arguments.clone
37
+ headers = arguments.delete(:headers) || {}
38
+
39
+ body = arguments.delete(:body)
40
+
41
+ _id = arguments.delete(:id)
42
+
43
+ method = ElasticsearchServerless::API::HTTP_PUT
44
+ path = "_security/api_key/#{Utils.listify(_id)}"
45
+ params = {}
46
+
47
+ ElasticsearchServerless::API::Response.new(
48
+ perform_request(method, path, params, body, headers)
49
+ )
50
+ end
51
+ end
52
+ end
53
+ end
54
+ end
@@ -0,0 +1,51 @@
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 SQL
24
+ module Actions
25
+ # Clears the SQL cursor
26
+ #
27
+ # @option arguments [Hash] :headers Custom HTTP headers
28
+ # @option arguments [Hash] :body request body
29
+ #
30
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/clear-sql-cursor-api.html
31
+ #
32
+ def clear_cursor(arguments = {})
33
+ raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
34
+
35
+ arguments = arguments.clone
36
+ headers = arguments.delete(:headers) || {}
37
+
38
+ body = arguments.delete(:body)
39
+
40
+ method = ElasticsearchServerless::API::HTTP_POST
41
+ path = "_sql/close"
42
+ params = {}
43
+
44
+ ElasticsearchServerless::API::Response.new(
45
+ perform_request(method, path, params, body, headers)
46
+ )
47
+ end
48
+ end
49
+ end
50
+ end
51
+ 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 SQL
24
+ module Actions
25
+ # Deletes an async SQL search or a stored synchronous SQL search. If the search is still running, the API cancels it.
26
+ #
27
+ # @option arguments [String] :id Identifier for the search. (*Required*)
28
+ # @option arguments [Hash] :headers Custom HTTP headers
29
+ #
30
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-async-sql-search-api.html
31
+ #
32
+ def delete_async(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_DELETE
43
+ path = "_sql/async/delete/#{Utils.listify(_id)}"
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,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 SQL
24
+ module Actions
25
+ # Returns the current status and available results for an async SQL search or stored synchronous SQL search
26
+ #
27
+ # @option arguments [String] :id Identifier for the search. (*Required*)
28
+ # @option arguments [String] :delimiter Separator for CSV results. The API only supports this parameter for CSV responses. Server default: ,.
29
+ # @option arguments [String] :format Format for the response. You must specify a format using this parameter or the Accept HTTP header. If you specify both, the API uses this parameter.
30
+ # @option arguments [Time] :keep_alive Retention period for the search and its results. Defaults to the +keep_alive+ period for the original SQL search.
31
+ # @option arguments [Time] :wait_for_completion_timeout Period to wait for complete results. Defaults to no timeout, meaning the request waits for complete search results.
32
+ # @option arguments [Hash] :headers Custom HTTP headers
33
+ #
34
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/get-async-sql-search-api.html
35
+ #
36
+ def get_async(arguments = {})
37
+ raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
38
+
39
+ arguments = arguments.clone
40
+ headers = arguments.delete(:headers) || {}
41
+
42
+ body = nil
43
+
44
+ _id = arguments.delete(:id)
45
+
46
+ method = ElasticsearchServerless::API::HTTP_GET
47
+ path = "_sql/async/#{Utils.listify(_id)}"
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 SQL
24
+ module Actions
25
+ # Returns the current status of an async SQL search or a stored synchronous SQL search
26
+ #
27
+ # @option arguments [String] :id Identifier for the search. (*Required*)
28
+ # @option arguments [Hash] :headers Custom HTTP headers
29
+ #
30
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/get-async-sql-search-status-api.html
31
+ #
32
+ def get_async_status(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 = "_sql/async/status/#{Utils.listify(_id)}"
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