@opensearch-project/opensearch 2.11.0 → 3.0.0-beta.1

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.
Files changed (768) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/api/_core/bulk.js +58 -0
  3. package/api/_core/clear_scroll.js +48 -0
  4. package/api/_core/count.js +62 -0
  5. package/api/_core/create.js +61 -0
  6. package/api/_core/create_pit.js +53 -0
  7. package/api/_core/delete.js +59 -0
  8. package/api/_core/delete_all_pits.js +44 -0
  9. package/api/_core/delete_by_query.js +82 -0
  10. package/api/_core/delete_by_query_rethrottle.js +49 -0
  11. package/api/_core/delete_pit.js +46 -0
  12. package/api/_core/delete_script.js +51 -0
  13. package/api/_core/exists.js +61 -0
  14. package/api/_core/exists_source.js +60 -0
  15. package/api/_core/explain.js +64 -0
  16. package/api/_core/field_caps.js +53 -0
  17. package/api/_core/get.js +61 -0
  18. package/api/_core/get_all_pits.js +44 -0
  19. package/api/_core/get_script.js +50 -0
  20. package/api/_core/get_script_context.js +44 -0
  21. package/api/_core/get_script_languages.js +44 -0
  22. package/api/_core/get_source.js +60 -0
  23. package/api/_core/index.js +62 -0
  24. package/api/_core/info.js +44 -0
  25. package/api/_core/mget.js +56 -0
  26. package/api/_core/msearch.js +55 -0
  27. package/api/_core/msearch_template.js +53 -0
  28. package/api/_core/mtermvectors.js +60 -0
  29. package/api/_core/ping.js +44 -0
  30. package/api/_core/put_script.js +54 -0
  31. package/api/_core/rank_eval.js +52 -0
  32. package/api/_core/reindex.js +56 -0
  33. package/api/_core/reindex_rethrottle.js +49 -0
  34. package/api/_core/render_search_template.js +48 -0
  35. package/api/_core/scripts_painless_execute.js +46 -0
  36. package/api/_core/scroll.js +50 -0
  37. package/api/_core/search.js +94 -0
  38. package/api/_core/search_shards.js +53 -0
  39. package/api/_core/search_template.js +61 -0
  40. package/api/_core/termvectors.js +62 -0
  41. package/api/_core/update.js +64 -0
  42. package/api/_core/update_by_query.js +84 -0
  43. package/api/_core/update_by_query_rethrottle.js +49 -0
  44. package/api/cat/_api.js +50 -0
  45. package/api/cat/aliases.js +54 -0
  46. package/api/cat/all_pit_segments.js +51 -0
  47. package/api/cat/allocation.js +56 -0
  48. package/api/cat/cluster_manager.js +53 -0
  49. package/api/cat/count.js +52 -0
  50. package/api/cat/fielddata.js +53 -0
  51. package/api/cat/health.js +52 -0
  52. package/api/cat/help.js +44 -0
  53. package/api/cat/indices.js +61 -0
  54. package/api/cat/master.js +53 -0
  55. package/api/cat/nodeattrs.js +53 -0
  56. package/api/cat/nodes.js +56 -0
  57. package/api/cat/pending_tasks.js +54 -0
  58. package/api/cat/pit_segments.js +52 -0
  59. package/api/cat/plugins.js +53 -0
  60. package/api/cat/recovery.js +56 -0
  61. package/api/cat/repositories.js +53 -0
  62. package/api/cat/segment_replication.js +63 -0
  63. package/api/cat/segments.js +55 -0
  64. package/api/cat/shards.js +57 -0
  65. package/api/cat/snapshots.js +56 -0
  66. package/api/cat/tasks.js +55 -0
  67. package/api/cat/templates.js +55 -0
  68. package/api/cat/thread_pool.js +57 -0
  69. package/api/cluster/_api.js +47 -0
  70. package/api/cluster/allocation_explain.js +48 -0
  71. package/api/cluster/delete_component_template.js +51 -0
  72. package/api/cluster/delete_decommission_awareness.js +44 -0
  73. package/api/cluster/delete_voting_config_exclusions.js +46 -0
  74. package/api/cluster/delete_weighted_routing.js +44 -0
  75. package/api/cluster/exists_component_template.js +51 -0
  76. package/api/cluster/get_component_template.js +50 -0
  77. package/api/cluster/get_decommission_awareness.js +48 -0
  78. package/api/cluster/get_settings.js +50 -0
  79. package/api/cluster/get_weighted_routing.js +48 -0
  80. package/api/cluster/health.js +60 -0
  81. package/api/cluster/pending_tasks.js +49 -0
  82. package/api/cluster/post_voting_config_exclusions.js +48 -0
  83. package/api/cluster/put_component_template.js +53 -0
  84. package/api/cluster/put_decommission_awareness.js +51 -0
  85. package/api/cluster/put_settings.js +50 -0
  86. package/api/cluster/put_weighted_routing.js +48 -0
  87. package/api/cluster/remote_info.js +44 -0
  88. package/api/cluster/reroute.js +53 -0
  89. package/api/cluster/state.js +58 -0
  90. package/api/cluster/stats.js +49 -0
  91. package/api/dangling_indices/_api.js +29 -0
  92. package/api/dangling_indices/delete_dangling_index.js +53 -0
  93. package/api/dangling_indices/import_dangling_index.js +53 -0
  94. package/api/dangling_indices/list_dangling_indices.js +44 -0
  95. package/api/http/_api.js +35 -0
  96. package/api/http/connect.js +48 -0
  97. package/api/http/delete.js +48 -0
  98. package/api/http/get.js +48 -0
  99. package/api/http/head.js +48 -0
  100. package/api/http/options.js +48 -0
  101. package/api/http/patch.js +48 -0
  102. package/api/http/post.js +48 -0
  103. package/api/http/put.js +48 -0
  104. package/api/http/trace.js +48 -0
  105. package/api/index.js +83 -393
  106. package/api/indices/_api.js +74 -0
  107. package/api/indices/add_block.js +57 -0
  108. package/api/indices/analyze.js +48 -0
  109. package/api/indices/clear_cache.js +55 -0
  110. package/api/indices/clone.js +58 -0
  111. package/api/indices/close.js +55 -0
  112. package/api/indices/create.js +53 -0
  113. package/api/indices/create_data_stream.js +49 -0
  114. package/api/indices/data_streams_stats.js +47 -0
  115. package/api/indices/delete.js +54 -0
  116. package/api/indices/delete_alias.js +54 -0
  117. package/api/indices/delete_data_stream.js +48 -0
  118. package/api/indices/delete_index_template.js +51 -0
  119. package/api/indices/delete_template.js +51 -0
  120. package/api/indices/exists.js +55 -0
  121. package/api/indices/exists_alias.js +54 -0
  122. package/api/indices/exists_index_template.js +52 -0
  123. package/api/indices/exists_template.js +52 -0
  124. package/api/indices/flush.js +52 -0
  125. package/api/indices/forcemerge.js +55 -0
  126. package/api/indices/get.js +56 -0
  127. package/api/indices/get_alias.js +53 -0
  128. package/api/indices/get_data_stream.js +47 -0
  129. package/api/indices/get_field_mapping.js +55 -0
  130. package/api/indices/get_index_template.js +51 -0
  131. package/api/indices/get_mapping.js +53 -0
  132. package/api/indices/get_settings.js +57 -0
  133. package/api/indices/get_template.js +51 -0
  134. package/api/indices/get_upgrade.js +50 -0
  135. package/api/indices/open.js +57 -0
  136. package/api/indices/put_alias.js +53 -0
  137. package/api/indices/put_index_template.js +53 -0
  138. package/api/indices/put_mapping.js +56 -0
  139. package/api/indices/put_settings.js +56 -0
  140. package/api/indices/put_template.js +53 -0
  141. package/api/indices/recovery.js +49 -0
  142. package/api/indices/refresh.js +50 -0
  143. package/api/indices/resolve_index.js +49 -0
  144. package/api/indices/rollover.js +57 -0
  145. package/api/indices/segments.js +51 -0
  146. package/api/indices/shard_stores.js +51 -0
  147. package/api/indices/shrink.js +59 -0
  148. package/api/indices/simulate_index_template.js +53 -0
  149. package/api/indices/simulate_template.js +52 -0
  150. package/api/indices/split.js +59 -0
  151. package/api/indices/stats.js +58 -0
  152. package/api/indices/update_aliases.js +49 -0
  153. package/api/indices/upgrade.js +52 -0
  154. package/api/indices/validate_query.js +60 -0
  155. package/api/ingest/_api.js +31 -0
  156. package/api/ingest/delete_pipeline.js +51 -0
  157. package/api/ingest/get_pipeline.js +49 -0
  158. package/api/ingest/processor_grok.js +44 -0
  159. package/api/ingest/put_pipeline.js +52 -0
  160. package/api/ingest/simulate.js +49 -0
  161. package/api/knn/_api.js +32 -0
  162. package/api/knn/delete_model.js +48 -0
  163. package/api/knn/get_model.js +48 -0
  164. package/api/knn/search_models.js +88 -0
  165. package/api/knn/stats.js +50 -0
  166. package/api/knn/train_model.js +49 -0
  167. package/api/knn/warmup.js +48 -0
  168. package/api/ml/_api.js +33 -0
  169. package/api/ml/delete_model.js +48 -0
  170. package/api/ml/delete_model_group.js +48 -0
  171. package/api/ml/get_model_group.js +48 -0
  172. package/api/ml/get_task.js +48 -0
  173. package/api/ml/register_model.js +46 -0
  174. package/api/ml/register_model_group.js +46 -0
  175. package/api/ml/search_models.js +46 -0
  176. package/api/nodes/_api.js +31 -0
  177. package/api/nodes/hot_threads.js +53 -0
  178. package/api/nodes/info.js +51 -0
  179. package/api/nodes/reload_secure_settings.js +49 -0
  180. package/api/nodes/stats.js +59 -0
  181. package/api/nodes/usage.js +50 -0
  182. package/api/notifications/_api.js +35 -0
  183. package/api/notifications/create_config.js +46 -0
  184. package/api/notifications/delete_config.js +48 -0
  185. package/api/notifications/delete_configs.js +48 -0
  186. package/api/notifications/get_config.js +48 -0
  187. package/api/notifications/get_configs.js +84 -0
  188. package/api/notifications/list_channels.js +44 -0
  189. package/api/notifications/list_features.js +44 -0
  190. package/api/notifications/send_test.js +48 -0
  191. package/api/notifications/update_config.js +49 -0
  192. package/api/ppl/_api.js +30 -0
  193. package/api/ppl/explain.js +48 -0
  194. package/api/ppl/get_stats.js +47 -0
  195. package/api/ppl/post_stats.js +48 -0
  196. package/api/ppl/query.js +48 -0
  197. package/api/remote_store/_api.js +27 -0
  198. package/api/remote_store/restore.js +48 -0
  199. package/api/rollups/_api.js +32 -0
  200. package/api/rollups/delete.js +48 -0
  201. package/api/rollups/explain.js +48 -0
  202. package/api/rollups/get.js +48 -0
  203. package/api/rollups/put.js +51 -0
  204. package/api/rollups/start.js +48 -0
  205. package/api/rollups/stop.js +48 -0
  206. package/api/search_pipeline/_api.js +29 -0
  207. package/api/search_pipeline/delete.js +50 -0
  208. package/api/search_pipeline/get.js +48 -0
  209. package/api/search_pipeline/put.js +51 -0
  210. package/api/security/_api.js +100 -0
  211. package/api/security/authinfo.js +47 -0
  212. package/api/security/authtoken.js +44 -0
  213. package/api/security/change_password.js +46 -0
  214. package/api/security/config_upgrade_check.js +44 -0
  215. package/api/security/config_upgrade_perform.js +46 -0
  216. package/api/security/create_action_group.js +49 -0
  217. package/api/security/create_allowlist.js +46 -0
  218. package/api/security/create_role.js +49 -0
  219. package/api/security/create_role_mapping.js +49 -0
  220. package/api/security/create_tenant.js +49 -0
  221. package/api/security/create_update_tenancy_config.js +46 -0
  222. package/api/security/create_user.js +49 -0
  223. package/api/security/create_user_legacy.js +49 -0
  224. package/api/security/delete_action_group.js +48 -0
  225. package/api/security/delete_distinguished_name.js +48 -0
  226. package/api/security/delete_role.js +48 -0
  227. package/api/security/delete_role_mapping.js +48 -0
  228. package/api/security/delete_tenant.js +48 -0
  229. package/api/security/delete_user.js +48 -0
  230. package/api/security/delete_user_legacy.js +48 -0
  231. package/api/security/flush_cache.js +44 -0
  232. package/api/security/generate_obo_token.js +46 -0
  233. package/api/security/generate_user_token.js +48 -0
  234. package/api/security/generate_user_token_legacy.js +48 -0
  235. package/api/security/get_account_details.js +44 -0
  236. package/api/security/get_action_group.js +48 -0
  237. package/api/security/get_action_groups.js +44 -0
  238. package/api/security/get_allowlist.js +44 -0
  239. package/api/security/get_audit_configuration.js +44 -0
  240. package/api/security/get_certificates.js +44 -0
  241. package/api/security/get_configuration.js +44 -0
  242. package/api/security/get_dashboards_info.js +44 -0
  243. package/api/security/get_distinguished_name.js +49 -0
  244. package/api/security/get_distinguished_names.js +46 -0
  245. package/api/security/get_permissions_info.js +44 -0
  246. package/api/security/get_role.js +48 -0
  247. package/api/security/get_role_mapping.js +48 -0
  248. package/api/security/get_role_mappings.js +44 -0
  249. package/api/security/get_roles.js +44 -0
  250. package/api/security/get_sslinfo.js +46 -0
  251. package/api/security/get_tenancy_config.js +44 -0
  252. package/api/security/get_tenant.js +48 -0
  253. package/api/security/get_tenants.js +44 -0
  254. package/api/security/get_user.js +48 -0
  255. package/api/security/get_user_legacy.js +48 -0
  256. package/api/security/get_users.js +44 -0
  257. package/api/security/get_users_legacy.js +44 -0
  258. package/api/security/health.js +46 -0
  259. package/api/security/migrate.js +44 -0
  260. package/api/security/patch_action_group.js +49 -0
  261. package/api/security/patch_action_groups.js +46 -0
  262. package/api/security/patch_allowlist.js +46 -0
  263. package/api/security/patch_audit_configuration.js +46 -0
  264. package/api/security/patch_configuration.js +46 -0
  265. package/api/security/patch_distinguished_name.js +49 -0
  266. package/api/security/patch_distinguished_names.js +46 -0
  267. package/api/security/patch_role.js +49 -0
  268. package/api/security/patch_role_mapping.js +49 -0
  269. package/api/security/patch_role_mappings.js +46 -0
  270. package/api/security/patch_roles.js +46 -0
  271. package/api/security/patch_tenant.js +49 -0
  272. package/api/security/patch_tenants.js +46 -0
  273. package/api/security/patch_user.js +49 -0
  274. package/api/security/patch_users.js +46 -0
  275. package/api/security/post_dashboards_info.js +46 -0
  276. package/api/security/reload_http_certificates.js +44 -0
  277. package/api/security/reload_transport_certificates.js +44 -0
  278. package/api/security/tenant_info.js +44 -0
  279. package/api/security/update_audit_configuration.js +46 -0
  280. package/api/security/update_configuration.js +46 -0
  281. package/api/security/update_distinguished_name.js +49 -0
  282. package/api/security/validate.js +46 -0
  283. package/api/security/who_am_i.js +44 -0
  284. package/api/security/who_am_i_protected.js +44 -0
  285. package/api/snapshot/_api.js +37 -0
  286. package/api/snapshot/cleanup_repository.js +51 -0
  287. package/api/snapshot/clone.js +57 -0
  288. package/api/snapshot/create.js +55 -0
  289. package/api/snapshot/create_repository.js +53 -0
  290. package/api/snapshot/delete.js +53 -0
  291. package/api/snapshot/delete_repository.js +51 -0
  292. package/api/snapshot/get.js +55 -0
  293. package/api/snapshot/get_repository.js +50 -0
  294. package/api/snapshot/restore.js +55 -0
  295. package/api/snapshot/status.js +52 -0
  296. package/api/snapshot/verify_repository.js +51 -0
  297. package/api/sql/_api.js +32 -0
  298. package/api/sql/close.js +48 -0
  299. package/api/sql/explain.js +48 -0
  300. package/api/sql/get_stats.js +47 -0
  301. package/api/sql/post_stats.js +48 -0
  302. package/api/sql/query.js +48 -0
  303. package/api/sql/settings.js +47 -0
  304. package/api/tasks/_api.js +29 -0
  305. package/api/tasks/cancel.js +51 -0
  306. package/api/tasks/get.js +50 -0
  307. package/api/tasks/list.js +52 -0
  308. package/api/transforms/_api.js +34 -0
  309. package/api/transforms/delete.js +48 -0
  310. package/api/transforms/explain.js +48 -0
  311. package/api/transforms/get.js +48 -0
  312. package/api/transforms/preview.js +44 -0
  313. package/api/transforms/put.js +51 -0
  314. package/api/transforms/search.js +50 -0
  315. package/api/transforms/start.js +48 -0
  316. package/api/transforms/stop.js +48 -0
  317. package/api/utils.js +31 -24
  318. package/index.d.ts +3 -5785
  319. package/lib/Helpers.d.ts +23 -25
  320. package/lib/Transport.d.ts +5 -7
  321. package/lib/errors.d.ts +13 -31
  322. package/package.json +3 -9
  323. package/types/Client.d.ts +1719 -0
  324. package/types/client_options.d.ts +102 -0
  325. package/types/components/_common.aggregations.d.ts +1456 -0
  326. package/types/components/_common.analysis.d.ts +643 -0
  327. package/types/components/_common.d.ts +871 -0
  328. package/types/components/_common.mapping.d.ts +519 -0
  329. package/types/components/_common.query_dsl.d.ts +727 -0
  330. package/types/components/_core._common.d.ts +39 -0
  331. package/types/components/_core.bulk.d.ts +77 -0
  332. package/types/components/_core.explain.d.ts +28 -0
  333. package/types/components/_core.field_caps.d.ts +33 -0
  334. package/types/components/_core.get.d.ts +30 -0
  335. package/types/components/_core.get_script_context.d.ts +33 -0
  336. package/types/components/_core.get_script_languages.d.ts +22 -0
  337. package/types/components/_core.mget.d.ts +37 -0
  338. package/types/components/_core.msearch.d.ts +82 -0
  339. package/types/components/_core.msearch_template.d.ts +28 -0
  340. package/types/components/_core.mtermvectors.d.ts +44 -0
  341. package/types/components/_core.rank_eval.d.ts +92 -0
  342. package/types/components/_core.reindex.d.ts +47 -0
  343. package/types/components/_core.reindex_rethrottle.d.ts +50 -0
  344. package/types/components/_core.scripts_painless_execute.d.ts +24 -0
  345. package/types/components/_core.search.d.ts +382 -0
  346. package/types/components/_core.search_shards.d.ts +23 -0
  347. package/types/components/_core.termvectors.d.ts +52 -0
  348. package/types/components/_core.update.d.ts +21 -0
  349. package/types/components/_core.update_by_query_rethrottle.d.ts +22 -0
  350. package/types/components/_global.d.ts +24 -0
  351. package/types/components/cat._common.d.ts +61 -0
  352. package/types/components/cat.aliases.d.ts +26 -0
  353. package/types/components/cat.allocation.d.ts +29 -0
  354. package/types/components/cat.cluster_manager.d.ts +23 -0
  355. package/types/components/cat.count.d.ts +23 -0
  356. package/types/components/cat.fielddata.d.ts +25 -0
  357. package/types/components/cat.health.d.ts +36 -0
  358. package/types/components/cat.indices.d.ts +160 -0
  359. package/types/components/cat.master.d.ts +23 -0
  360. package/types/components/cat.nodeattrs.d.ts +27 -0
  361. package/types/components/cat.nodes.d.ts +118 -0
  362. package/types/components/cat.pending_tasks.d.ts +23 -0
  363. package/types/components/cat.plugins.d.ts +26 -0
  364. package/types/components/cat.recovery.d.ts +46 -0
  365. package/types/components/cat.repositories.d.ts +21 -0
  366. package/types/components/cat.segments.d.ts +35 -0
  367. package/types/components/cat.shards.d.ts +95 -0
  368. package/types/components/cat.snapshots.d.ts +33 -0
  369. package/types/components/cat.tasks.d.ts +36 -0
  370. package/types/components/cat.templates.d.ts +25 -0
  371. package/types/components/cat.thread_pool.d.ts +40 -0
  372. package/types/components/cluster._common.d.ts +39 -0
  373. package/types/components/cluster.allocation_explain.d.ts +97 -0
  374. package/types/components/cluster.health.d.ts +60 -0
  375. package/types/components/cluster.pending_tasks.d.ts +26 -0
  376. package/types/components/cluster.remote_info.d.ts +40 -0
  377. package/types/components/cluster.reroute.d.ts +73 -0
  378. package/types/components/cluster.state.d.ts +18 -0
  379. package/types/components/cluster.stats.d.ts +267 -0
  380. package/types/components/dangling_indices.list_dangling_indices.d.ts +25 -0
  381. package/types/components/indices._common.d.ts +499 -0
  382. package/types/components/indices.add_block.d.ts +24 -0
  383. package/types/components/indices.analyze.d.ts +62 -0
  384. package/types/components/indices.close.d.ts +26 -0
  385. package/types/components/indices.data_streams_stats.d.ts +25 -0
  386. package/types/components/indices.get_alias.d.ts +21 -0
  387. package/types/components/indices.get_field_mapping.d.ts +21 -0
  388. package/types/components/indices.get_index_template.d.ts +23 -0
  389. package/types/components/indices.get_mapping.d.ts +22 -0
  390. package/types/components/indices.put_index_template.d.ts +25 -0
  391. package/types/components/indices.recovery.d.ts +116 -0
  392. package/types/components/indices.resolve_index.d.ts +35 -0
  393. package/types/components/indices.rollover.d.ts +35 -0
  394. package/types/components/indices.segments.d.ts +46 -0
  395. package/types/components/indices.shard_stores.d.ts +40 -0
  396. package/types/components/indices.simulate_template.d.ts +30 -0
  397. package/types/components/indices.stats.d.ts +149 -0
  398. package/types/components/indices.update_aliases.d.ts +52 -0
  399. package/types/components/indices.validate_query.d.ts +24 -0
  400. package/types/components/ingest._common.d.ts +338 -0
  401. package/types/components/ingest.simulate.d.ts +46 -0
  402. package/types/components/knn._common.d.ts +22 -0
  403. package/types/components/ml._common.d.ts +67 -0
  404. package/types/components/nodes._common.d.ts +611 -0
  405. package/types/components/nodes.info.d.ts +338 -0
  406. package/types/components/nodes.reload_secure_settings.d.ts +23 -0
  407. package/types/components/nodes.stats.d.ts +27 -0
  408. package/types/components/nodes.usage.d.ts +32 -0
  409. package/types/components/notifications._common.d.ts +156 -0
  410. package/types/components/remote_store._common.d.ts +28 -0
  411. package/types/components/rollups._common.d.ts +124 -0
  412. package/types/components/search_pipeline._common.d.ts +151 -0
  413. package/types/components/security._common.d.ts +334 -0
  414. package/types/components/snapshot._common.d.ts +134 -0
  415. package/types/components/snapshot.cleanup_repository.d.ts +21 -0
  416. package/types/components/snapshot.get.d.ts +24 -0
  417. package/types/components/snapshot.restore.d.ts +23 -0
  418. package/types/components/snapshot.verify_repository.d.ts +21 -0
  419. package/types/components/sql._common.d.ts +117 -0
  420. package/types/components/tasks._common.d.ts +58 -0
  421. package/types/components/transforms._common.d.ts +130 -0
  422. package/types/functions/bulk.d.ts +44 -0
  423. package/types/functions/cat.aliases.d.ts +32 -0
  424. package/types/functions/cat.all_pit_segments.d.ts +30 -0
  425. package/types/functions/cat.allocation.d.ts +34 -0
  426. package/types/functions/cat.cluster_manager.d.ts +32 -0
  427. package/types/functions/cat.count.d.ts +30 -0
  428. package/types/functions/cat.fielddata.d.ts +31 -0
  429. package/types/functions/cat.health.d.ts +31 -0
  430. package/types/functions/cat.help.d.ts +21 -0
  431. package/types/functions/cat.indices.d.ts +39 -0
  432. package/types/functions/cat.master.d.ts +32 -0
  433. package/types/functions/cat.nodeattrs.d.ts +32 -0
  434. package/types/functions/cat.nodes.d.ts +35 -0
  435. package/types/functions/cat.pending_tasks.d.ts +33 -0
  436. package/types/functions/cat.pit_segments.d.ts +35 -0
  437. package/types/functions/cat.plugins.d.ts +32 -0
  438. package/types/functions/cat.recovery.d.ts +34 -0
  439. package/types/functions/cat.repositories.d.ts +32 -0
  440. package/types/functions/cat.segment_replication.d.ts +41 -0
  441. package/types/functions/cat.segments.d.ts +33 -0
  442. package/types/functions/cat.shards.d.ts +35 -0
  443. package/types/functions/cat.snapshots.d.ts +34 -0
  444. package/types/functions/cat.tasks.d.ts +34 -0
  445. package/types/functions/cat.templates.d.ts +33 -0
  446. package/types/functions/cat.thread_pool.d.ts +34 -0
  447. package/types/functions/clear_scroll.d.ts +32 -0
  448. package/types/functions/cluster.allocation_explain.d.ts +60 -0
  449. package/types/functions/cluster.delete_component_template.d.ts +27 -0
  450. package/types/functions/cluster.delete_decommission_awareness.d.ts +21 -0
  451. package/types/functions/cluster.delete_voting_config_exclusions.d.ts +23 -0
  452. package/types/functions/cluster.delete_weighted_routing.d.ts +21 -0
  453. package/types/functions/cluster.exists_component_template.d.ts +27 -0
  454. package/types/functions/cluster.get_component_template.d.ts +30 -0
  455. package/types/functions/cluster.get_decommission_awareness.d.ts +23 -0
  456. package/types/functions/cluster.get_settings.d.ts +32 -0
  457. package/types/functions/cluster.get_weighted_routing.d.ts +23 -0
  458. package/types/functions/cluster.health.d.ts +38 -0
  459. package/types/functions/cluster.pending_tasks.d.ts +29 -0
  460. package/types/functions/cluster.post_voting_config_exclusions.d.ts +26 -0
  461. package/types/functions/cluster.put_component_template.d.ts +37 -0
  462. package/types/functions/cluster.put_decommission_awareness.d.ts +24 -0
  463. package/types/functions/cluster.put_settings.d.ts +41 -0
  464. package/types/functions/cluster.put_weighted_routing.d.ts +23 -0
  465. package/types/functions/cluster.remote_info.d.ts +22 -0
  466. package/types/functions/cluster.reroute.d.ts +40 -0
  467. package/types/functions/cluster.state.d.ts +35 -0
  468. package/types/functions/cluster.stats.d.ts +27 -0
  469. package/types/functions/count.d.ts +47 -0
  470. package/types/functions/create.d.ts +35 -0
  471. package/types/functions/create_pit.d.ts +34 -0
  472. package/types/functions/dangling_indices.delete_dangling_index.d.ts +28 -0
  473. package/types/functions/dangling_indices.import_dangling_index.d.ts +28 -0
  474. package/types/functions/dangling_indices.list_dangling_indices.d.ts +27 -0
  475. package/types/functions/delete.d.ts +33 -0
  476. package/types/functions/delete_all_pits.d.ts +24 -0
  477. package/types/functions/delete_by_query.d.ts +82 -0
  478. package/types/functions/delete_by_query_rethrottle.d.ts +26 -0
  479. package/types/functions/delete_pit.d.ts +30 -0
  480. package/types/functions/delete_script.d.ts +27 -0
  481. package/types/functions/exists.d.ts +36 -0
  482. package/types/functions/exists_source.d.ts +35 -0
  483. package/types/functions/explain.d.ts +51 -0
  484. package/types/functions/field_caps.d.ts +42 -0
  485. package/types/functions/get.d.ts +37 -0
  486. package/types/functions/get_all_pits.d.ts +24 -0
  487. package/types/functions/get_script.d.ts +30 -0
  488. package/types/functions/get_script_context.d.ts +24 -0
  489. package/types/functions/get_script_languages.d.ts +25 -0
  490. package/types/functions/get_source.d.ts +35 -0
  491. package/types/functions/index.d.ts +39 -0
  492. package/types/functions/indices.add_block.d.ts +36 -0
  493. package/types/functions/indices.analyze.d.ts +42 -0
  494. package/types/functions/indices.clear_cache.d.ts +32 -0
  495. package/types/functions/indices.clone.d.ts +42 -0
  496. package/types/functions/indices.close.d.ts +36 -0
  497. package/types/functions/indices.create.d.ts +41 -0
  498. package/types/functions/indices.create_data_stream.d.ts +27 -0
  499. package/types/functions/indices.data_streams_stats.d.ts +32 -0
  500. package/types/functions/indices.delete.d.ts +30 -0
  501. package/types/functions/indices.delete_alias.d.ts +28 -0
  502. package/types/functions/indices.delete_data_stream.d.ts +24 -0
  503. package/types/functions/indices.delete_index_template.d.ts +27 -0
  504. package/types/functions/indices.delete_template.d.ts +27 -0
  505. package/types/functions/indices.exists.d.ts +31 -0
  506. package/types/functions/indices.exists_alias.d.ts +29 -0
  507. package/types/functions/indices.exists_index_template.d.ts +28 -0
  508. package/types/functions/indices.exists_template.d.ts +28 -0
  509. package/types/functions/indices.flush.d.ts +29 -0
  510. package/types/functions/indices.forcemerge.d.ts +34 -0
  511. package/types/functions/indices.get.d.ts +33 -0
  512. package/types/functions/indices.get_alias.d.ts +30 -0
  513. package/types/functions/indices.get_data_stream.d.ts +27 -0
  514. package/types/functions/indices.get_field_mapping.d.ts +31 -0
  515. package/types/functions/indices.get_index_template.d.ts +31 -0
  516. package/types/functions/indices.get_mapping.d.ts +31 -0
  517. package/types/functions/indices.get_settings.d.ts +34 -0
  518. package/types/functions/indices.get_template.d.ts +29 -0
  519. package/types/functions/indices.get_upgrade.d.ts +27 -0
  520. package/types/functions/indices.open.d.ts +38 -0
  521. package/types/functions/indices.put_alias.d.ts +41 -0
  522. package/types/functions/indices.put_index_template.d.ts +41 -0
  523. package/types/functions/indices.put_mapping.d.ts +47 -0
  524. package/types/functions/indices.put_settings.d.ts +34 -0
  525. package/types/functions/indices.put_template.d.ts +40 -0
  526. package/types/functions/indices.recovery.d.ts +27 -0
  527. package/types/functions/indices.refresh.d.ts +27 -0
  528. package/types/functions/indices.resolve_index.d.ts +30 -0
  529. package/types/functions/indices.rollover.d.ts +49 -0
  530. package/types/functions/indices.segments.d.ts +32 -0
  531. package/types/functions/indices.shard_stores.d.ts +31 -0
  532. package/types/functions/indices.shrink.d.ts +43 -0
  533. package/types/functions/indices.simulate_index_template.d.ts +42 -0
  534. package/types/functions/indices.simulate_template.d.ts +34 -0
  535. package/types/functions/indices.split.d.ts +44 -0
  536. package/types/functions/indices.stats.d.ts +39 -0
  537. package/types/functions/indices.update_aliases.d.ts +32 -0
  538. package/types/functions/indices.upgrade.d.ts +29 -0
  539. package/types/functions/indices.validate_query.d.ts +48 -0
  540. package/types/functions/info.d.ts +28 -0
  541. package/types/functions/ingest.delete_pipeline.d.ts +27 -0
  542. package/types/functions/ingest.get_pipeline.d.ts +27 -0
  543. package/types/functions/ingest.processor_grok.d.ts +23 -0
  544. package/types/functions/ingest.put_pipeline.d.ts +37 -0
  545. package/types/functions/ingest.simulate.d.ts +35 -0
  546. package/types/functions/knn.delete_model.d.ts +23 -0
  547. package/types/functions/knn.get_model.d.ts +23 -0
  548. package/types/functions/knn.search_models.d.ts +69 -0
  549. package/types/functions/knn.stats.d.ts +26 -0
  550. package/types/functions/knn.train_model.d.ts +35 -0
  551. package/types/functions/knn.warmup.d.ts +23 -0
  552. package/types/functions/mget.d.ts +42 -0
  553. package/types/functions/ml.delete_model.d.ts +24 -0
  554. package/types/functions/ml.delete_model_group.d.ts +24 -0
  555. package/types/functions/ml.get_model_group.d.ts +24 -0
  556. package/types/functions/ml.get_task.d.ts +24 -0
  557. package/types/functions/ml.register_model.d.ts +32 -0
  558. package/types/functions/ml.register_model_group.d.ts +32 -0
  559. package/types/functions/ml.search_models.d.ts +24 -0
  560. package/types/functions/msearch.d.ts +35 -0
  561. package/types/functions/msearch_template.d.ts +34 -0
  562. package/types/functions/mtermvectors.d.ts +45 -0
  563. package/types/functions/nodes.hot_threads.d.ts +31 -0
  564. package/types/functions/nodes.info.d.ts +28 -0
  565. package/types/functions/nodes.reload_secure_settings.d.ts +31 -0
  566. package/types/functions/nodes.stats.d.ts +35 -0
  567. package/types/functions/nodes.usage.d.ts +27 -0
  568. package/types/functions/notifications.create_config.d.ts +26 -0
  569. package/types/functions/notifications.delete_config.d.ts +24 -0
  570. package/types/functions/notifications.delete_configs.d.ts +25 -0
  571. package/types/functions/notifications.get_config.d.ts +24 -0
  572. package/types/functions/notifications.get_configs.d.ts +70 -0
  573. package/types/functions/notifications.list_channels.d.ts +27 -0
  574. package/types/functions/notifications.list_features.d.ts +25 -0
  575. package/types/functions/notifications.send_test.d.ts +27 -0
  576. package/types/functions/notifications.update_config.d.ts +27 -0
  577. package/types/functions/ping.d.ts +21 -0
  578. package/types/functions/ppl.explain.d.ts +26 -0
  579. package/types/functions/ppl.get_stats.d.ts +24 -0
  580. package/types/functions/ppl.post_stats.d.ts +26 -0
  581. package/types/functions/ppl.query.d.ts +26 -0
  582. package/types/functions/put_script.d.ts +33 -0
  583. package/types/functions/rank_eval.d.ts +39 -0
  584. package/types/functions/reindex.d.ts +59 -0
  585. package/types/functions/reindex_rethrottle.d.ts +28 -0
  586. package/types/functions/remote_store.restore.d.ts +34 -0
  587. package/types/functions/render_search_template.d.ts +33 -0
  588. package/types/functions/rollups.delete.d.ts +24 -0
  589. package/types/functions/rollups.explain.d.ts +25 -0
  590. package/types/functions/rollups.get.d.ts +25 -0
  591. package/types/functions/rollups.put.d.ts +28 -0
  592. package/types/functions/rollups.start.d.ts +24 -0
  593. package/types/functions/rollups.stop.d.ts +24 -0
  594. package/types/functions/scripts_painless_execute.d.ts +33 -0
  595. package/types/functions/scroll.d.ts +33 -0
  596. package/types/functions/search.d.ts +111 -0
  597. package/types/functions/search_pipeline.delete.d.ts +28 -0
  598. package/types/functions/search_pipeline.get.d.ts +26 -0
  599. package/types/functions/search_pipeline.put.d.ts +30 -0
  600. package/types/functions/search_shards.d.ts +35 -0
  601. package/types/functions/search_template.d.ts +63 -0
  602. package/types/functions/security.authinfo.d.ts +25 -0
  603. package/types/functions/security.authtoken.d.ts +22 -0
  604. package/types/functions/security.change_password.d.ts +24 -0
  605. package/types/functions/security.config_upgrade_check.d.ts +22 -0
  606. package/types/functions/security.config_upgrade_perform.d.ts +24 -0
  607. package/types/functions/security.create_action_group.d.ts +25 -0
  608. package/types/functions/security.create_allowlist.d.ts +24 -0
  609. package/types/functions/security.create_role.d.ts +25 -0
  610. package/types/functions/security.create_role_mapping.d.ts +25 -0
  611. package/types/functions/security.create_tenant.d.ts +25 -0
  612. package/types/functions/security.create_update_tenancy_config.d.ts +26 -0
  613. package/types/functions/security.create_user.d.ts +25 -0
  614. package/types/functions/security.create_user_legacy.d.ts +25 -0
  615. package/types/functions/security.delete_action_group.d.ts +24 -0
  616. package/types/functions/security.delete_distinguished_name.d.ts +24 -0
  617. package/types/functions/security.delete_role.d.ts +24 -0
  618. package/types/functions/security.delete_role_mapping.d.ts +24 -0
  619. package/types/functions/security.delete_tenant.d.ts +24 -0
  620. package/types/functions/security.delete_user.d.ts +24 -0
  621. package/types/functions/security.delete_user_legacy.d.ts +24 -0
  622. package/types/functions/security.flush_cache.d.ts +22 -0
  623. package/types/functions/security.generate_obo_token.d.ts +24 -0
  624. package/types/functions/security.generate_user_token.d.ts +24 -0
  625. package/types/functions/security.generate_user_token_legacy.d.ts +24 -0
  626. package/types/functions/security.get_account_details.d.ts +22 -0
  627. package/types/functions/security.get_action_group.d.ts +24 -0
  628. package/types/functions/security.get_action_groups.d.ts +22 -0
  629. package/types/functions/security.get_allowlist.d.ts +22 -0
  630. package/types/functions/security.get_audit_configuration.d.ts +22 -0
  631. package/types/functions/security.get_certificates.d.ts +22 -0
  632. package/types/functions/security.get_configuration.d.ts +22 -0
  633. package/types/functions/security.get_dashboards_info.d.ts +22 -0
  634. package/types/functions/security.get_distinguished_name.d.ts +25 -0
  635. package/types/functions/security.get_distinguished_names.d.ts +24 -0
  636. package/types/functions/security.get_permissions_info.d.ts +22 -0
  637. package/types/functions/security.get_role.d.ts +24 -0
  638. package/types/functions/security.get_role_mapping.d.ts +24 -0
  639. package/types/functions/security.get_role_mappings.d.ts +22 -0
  640. package/types/functions/security.get_roles.d.ts +22 -0
  641. package/types/functions/security.get_sslinfo.d.ts +24 -0
  642. package/types/functions/security.get_tenancy_config.d.ts +22 -0
  643. package/types/functions/security.get_tenant.d.ts +24 -0
  644. package/types/functions/security.get_tenants.d.ts +22 -0
  645. package/types/functions/security.get_user.d.ts +24 -0
  646. package/types/functions/security.get_user_legacy.d.ts +24 -0
  647. package/types/functions/security.get_users.d.ts +22 -0
  648. package/types/functions/security.get_users_legacy.d.ts +22 -0
  649. package/types/functions/security.health.d.ts +24 -0
  650. package/types/functions/security.migrate.d.ts +22 -0
  651. package/types/functions/security.patch_action_group.d.ts +27 -0
  652. package/types/functions/security.patch_action_groups.d.ts +26 -0
  653. package/types/functions/security.patch_allowlist.d.ts +26 -0
  654. package/types/functions/security.patch_audit_configuration.d.ts +26 -0
  655. package/types/functions/security.patch_configuration.d.ts +26 -0
  656. package/types/functions/security.patch_distinguished_name.d.ts +25 -0
  657. package/types/functions/security.patch_distinguished_names.d.ts +26 -0
  658. package/types/functions/security.patch_role.d.ts +27 -0
  659. package/types/functions/security.patch_role_mapping.d.ts +27 -0
  660. package/types/functions/security.patch_role_mappings.d.ts +26 -0
  661. package/types/functions/security.patch_roles.d.ts +26 -0
  662. package/types/functions/security.patch_tenant.d.ts +27 -0
  663. package/types/functions/security.patch_tenants.d.ts +26 -0
  664. package/types/functions/security.patch_user.d.ts +27 -0
  665. package/types/functions/security.patch_users.d.ts +26 -0
  666. package/types/functions/security.post_dashboards_info.d.ts +24 -0
  667. package/types/functions/security.reload_http_certificates.d.ts +22 -0
  668. package/types/functions/security.reload_transport_certificates.d.ts +22 -0
  669. package/types/functions/security.tenant_info.d.ts +22 -0
  670. package/types/functions/security.update_audit_configuration.d.ts +24 -0
  671. package/types/functions/security.update_configuration.d.ts +24 -0
  672. package/types/functions/security.update_distinguished_name.d.ts +25 -0
  673. package/types/functions/security.validate.d.ts +24 -0
  674. package/types/functions/security.who_am_i.d.ts +22 -0
  675. package/types/functions/security.who_am_i_protected.d.ts +22 -0
  676. package/types/functions/snapshot.cleanup_repository.d.ts +30 -0
  677. package/types/functions/snapshot.clone.d.ts +33 -0
  678. package/types/functions/snapshot.create.d.ts +42 -0
  679. package/types/functions/snapshot.create_repository.d.ts +36 -0
  680. package/types/functions/snapshot.delete.d.ts +27 -0
  681. package/types/functions/snapshot.delete_repository.d.ts +27 -0
  682. package/types/functions/snapshot.get.d.ts +36 -0
  683. package/types/functions/snapshot.get_repository.d.ts +28 -0
  684. package/types/functions/snapshot.restore.d.ts +46 -0
  685. package/types/functions/snapshot.status.d.ts +31 -0
  686. package/types/functions/snapshot.verify_repository.d.ts +30 -0
  687. package/types/functions/sql.close.d.ts +26 -0
  688. package/types/functions/sql.explain.d.ts +26 -0
  689. package/types/functions/sql.get_stats.d.ts +24 -0
  690. package/types/functions/sql.post_stats.d.ts +26 -0
  691. package/types/functions/sql.query.d.ts +26 -0
  692. package/types/functions/sql.settings.d.ts +27 -0
  693. package/types/functions/tasks.cancel.d.ts +29 -0
  694. package/types/functions/tasks.get.d.ts +32 -0
  695. package/types/functions/tasks.list.d.ts +31 -0
  696. package/types/functions/termvectors.d.ts +51 -0
  697. package/types/functions/transforms.delete.d.ts +24 -0
  698. package/types/functions/transforms.explain.d.ts +25 -0
  699. package/types/functions/transforms.get.d.ts +25 -0
  700. package/types/functions/transforms.preview.d.ts +22 -0
  701. package/types/functions/transforms.put.d.ts +28 -0
  702. package/types/functions/transforms.search.d.ts +28 -0
  703. package/types/functions/transforms.start.d.ts +24 -0
  704. package/types/functions/transforms.stop.d.ts +24 -0
  705. package/types/functions/update.d.ts +50 -0
  706. package/types/functions/update_by_query.d.ts +85 -0
  707. package/types/functions/update_by_query_rethrottle.d.ts +28 -0
  708. package/api/api/bulk.js +0 -130
  709. package/api/api/cat.js +0 -933
  710. package/api/api/clear_scroll.js +0 -79
  711. package/api/api/cluster.js +0 -814
  712. package/api/api/count.js +0 -133
  713. package/api/api/create.js +0 -131
  714. package/api/api/create_pit.js +0 -88
  715. package/api/api/dangling_indices.js +0 -214
  716. package/api/api/delete.js +0 -125
  717. package/api/api/delete_all_pits.js +0 -53
  718. package/api/api/delete_by_query.js +0 -192
  719. package/api/api/delete_by_query_rethrottle.js +0 -98
  720. package/api/api/delete_pit.js +0 -61
  721. package/api/api/delete_script.js +0 -94
  722. package/api/api/exists.js +0 -133
  723. package/api/api/exists_source.js +0 -142
  724. package/api/api/explain.js +0 -140
  725. package/api/api/features.js +0 -136
  726. package/api/api/field_caps.js +0 -102
  727. package/api/api/get.js +0 -133
  728. package/api/api/get_all_pits.js +0 -53
  729. package/api/api/get_script.js +0 -95
  730. package/api/api/get_script_context.js +0 -71
  731. package/api/api/get_script_languages.js +0 -71
  732. package/api/api/get_source.js +0 -133
  733. package/api/api/http.js +0 -213
  734. package/api/api/index.js +0 -142
  735. package/api/api/indices.js +0 -2541
  736. package/api/api/info.js +0 -71
  737. package/api/api/ingest.js +0 -335
  738. package/api/api/mget.js +0 -128
  739. package/api/api/msearch.js +0 -125
  740. package/api/api/msearch_template.js +0 -126
  741. package/api/api/mtermvectors.js +0 -98
  742. package/api/api/nodes.js +0 -496
  743. package/api/api/ping.js +0 -71
  744. package/api/api/put_script.js +0 -113
  745. package/api/api/rank_eval.js +0 -107
  746. package/api/api/reindex.js +0 -109
  747. package/api/api/reindex_rethrottle.js +0 -97
  748. package/api/api/render_search_template.js +0 -79
  749. package/api/api/rollups.js +0 -249
  750. package/api/api/scripts_painless_execute.js +0 -73
  751. package/api/api/scroll.js +0 -96
  752. package/api/api/search.js +0 -221
  753. package/api/api/search_shards.js +0 -102
  754. package/api/api/search_template.js +0 -145
  755. package/api/api/security.js +0 -1954
  756. package/api/api/shutdown.js +0 -149
  757. package/api/api/snapshot.js +0 -782
  758. package/api/api/tasks.js +0 -193
  759. package/api/api/terms_enum.js +0 -67
  760. package/api/api/termvectors.js +0 -134
  761. package/api/api/transforms.js +0 -304
  762. package/api/api/update.js +0 -147
  763. package/api/api/update_by_query.js +0 -193
  764. package/api/api/update_by_query_rethrottle.js +0 -98
  765. package/api/new.d.ts +0 -3194
  766. package/api/opensearch_dashboards.d.ts +0 -278
  767. package/api/requestParams.d.ts +0 -1838
  768. package/api/types.d.ts +0 -10014
@@ -1,1954 +0,0 @@
1
- /*
2
- * Copyright OpenSearch Contributors
3
- * SPDX-License-Identifier: Apache-2.0
4
- *
5
- * The OpenSearch Contributors require contributions made to
6
- * this file be licensed under the Apache-2.0 license or a
7
- * compatible open source license.
8
- *
9
- */
10
-
11
- 'use strict';
12
-
13
- /** @namespace API-Security */
14
-
15
- /* eslint camelcase: 0 */
16
- /* eslint no-unused-vars: 0 */
17
-
18
- const {
19
- handleError,
20
- snakeCaseKeys,
21
- encodePathParam,
22
- normalizeArguments,
23
- kConfigurationError,
24
- } = require('../utils');
25
- const snakeCase = {};
26
-
27
- function SecurityApi(transport, ConfigurationError) {
28
- this.transport = transport;
29
- this[kConfigurationError] = ConfigurationError;
30
- }
31
-
32
- /**
33
- * Changes the password for the current user.
34
- * <br/> See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#change-password - Security - Change Password}
35
- *
36
- * @memberOf API-Security
37
- *
38
- * @param {Object} params
39
- * @param {Object} params.body
40
- *
41
- * @param {Object} options - Options for {@link Transport#request}
42
- * @param {function} callback - Callback that handles errors and response
43
- *
44
- * @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*}
45
- */
46
- SecurityApi.prototype.changePassword = function securityChangePasswordApi(
47
- params,
48
- options,
49
- callback
50
- ) {
51
- [params, options, callback] = normalizeArguments(params, options, callback);
52
-
53
- if (params.body == null) {
54
- const err = new this[kConfigurationError]('Missing required parameter: body');
55
- return handleError(err, callback);
56
- }
57
-
58
- let { method, body, ...querystring } = params;
59
-
60
- let path = ['', '_plugins', '_security', 'api', 'account'].filter((c) => c != null).join('/');
61
- method = method || 'PUT';
62
- body = body || '';
63
- querystring = snakeCaseKeys(null, snakeCase, querystring);
64
-
65
- return this.transport.request({ method, path, body, querystring }, options, callback);
66
- };
67
-
68
- /**
69
- * Creates or replaces the specified action group.
70
- * <br/> See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#create-action-group - Security - Create Action Group}
71
- *
72
- * @memberOf API-Security
73
- *
74
- * @param {Object} params
75
- * @param {string} params.action_group - The name of the action group to create or replace
76
- * @param {Object} params.body
77
- *
78
- * @param {Object} options - Options for {@link Transport#request}
79
- * @param {function} callback - Callback that handles errors and response
80
- *
81
- * @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*}
82
- */
83
- SecurityApi.prototype.createActionGroup = function securityCreateActionGroupApi(
84
- params,
85
- options,
86
- callback
87
- ) {
88
- [params, options, callback] = normalizeArguments(params, options, callback);
89
-
90
- if (params.actionGroup == null && params.action_group == null) {
91
- const err = new this[kConfigurationError]('Missing required parameter: action_group');
92
- return handleError(err, callback);
93
- }
94
- if (params.body == null) {
95
- const err = new this[kConfigurationError]('Missing required parameter: body');
96
- return handleError(err, callback);
97
- }
98
-
99
- let { method, body, actionGroup, action_group, ...querystring } = params;
100
-
101
- action_group = encodePathParam(actionGroup, action_group);
102
-
103
- let path = ['', '_plugins', '_security', 'api', 'actiongroups', action_group]
104
- .filter((c) => c != null)
105
- .join('/');
106
- method = method || 'PUT';
107
- body = body || '';
108
- querystring = snakeCaseKeys(null, snakeCase, querystring);
109
-
110
- return this.transport.request({ method, path, body, querystring }, options, callback);
111
- };
112
-
113
- /**
114
- * Creates or replaces the specified role.
115
- * <br/> See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#create-role - Security - Create Role}
116
- *
117
- * @memberOf API-Security
118
- *
119
- * @param {Object} params
120
- * @param {string} params.role
121
- * @param {Object} params.body
122
- *
123
- * @param {Object} options - Options for {@link Transport#request}
124
- * @param {function} callback - Callback that handles errors and response
125
- *
126
- * @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*}
127
- */
128
- SecurityApi.prototype.createRole = function securityCreateRoleApi(params, options, callback) {
129
- [params, options, callback] = normalizeArguments(params, options, callback);
130
-
131
- if (params.role == null) {
132
- const err = new this[kConfigurationError]('Missing required parameter: role');
133
- return handleError(err, callback);
134
- }
135
- if (params.body == null) {
136
- const err = new this[kConfigurationError]('Missing required parameter: body');
137
- return handleError(err, callback);
138
- }
139
-
140
- let { method, body, role, ...querystring } = params;
141
-
142
- role = encodePathParam(role);
143
-
144
- let path = ['', '_plugins', '_security', 'api', 'roles', role].filter((c) => c != null).join('/');
145
- method = method || 'PUT';
146
- body = body || '';
147
- querystring = snakeCaseKeys(null, snakeCase, querystring);
148
-
149
- return this.transport.request({ method, path, body, querystring }, options, callback);
150
- };
151
-
152
- /**
153
- * Creates or replaces the specified role mapping.
154
- * <br/> See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#create-role-mapping - Security - Create Role Mapping}
155
- *
156
- * @memberOf API-Security
157
- *
158
- * @param {Object} params
159
- * @param {string} params.role
160
- * @param {Object} params.body
161
- *
162
- * @param {Object} options - Options for {@link Transport#request}
163
- * @param {function} callback - Callback that handles errors and response
164
- *
165
- * @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*}
166
- */
167
- SecurityApi.prototype.createRoleMapping = function securityCreateRoleMappingApi(
168
- params,
169
- options,
170
- callback
171
- ) {
172
- [params, options, callback] = normalizeArguments(params, options, callback);
173
-
174
- if (params.role == null) {
175
- const err = new this[kConfigurationError]('Missing required parameter: role');
176
- return handleError(err, callback);
177
- }
178
- if (params.body == null) {
179
- const err = new this[kConfigurationError]('Missing required parameter: body');
180
- return handleError(err, callback);
181
- }
182
-
183
- let { method, body, role, ...querystring } = params;
184
-
185
- role = encodePathParam(role);
186
-
187
- let path = ['', '_plugins', '_security', 'api', 'rolesmapping', role]
188
- .filter((c) => c != null)
189
- .join('/');
190
- method = method || 'PUT';
191
- body = body || '';
192
- querystring = snakeCaseKeys(null, snakeCase, querystring);
193
-
194
- return this.transport.request({ method, path, body, querystring }, options, callback);
195
- };
196
-
197
- /**
198
- * Creates or replaces the specified tenant.
199
- * <br/> See Also: {@link https://opensearch.org/docs/2.7/security/access-control/api/#create-tenant - Security - Create Tenant}
200
- *
201
- * @memberOf API-Security
202
- *
203
- * @param {Object} params
204
- * @param {string} params.tenant
205
- * @param {Object} params.body
206
- *
207
- * @param {Object} options - Options for {@link Transport#request}
208
- * @param {function} callback - Callback that handles errors and response
209
- *
210
- * @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*}
211
- */
212
- SecurityApi.prototype.createTenant = function securityCreateTenantApi(params, options, callback) {
213
- [params, options, callback] = normalizeArguments(params, options, callback);
214
-
215
- if (params.tenant == null) {
216
- const err = new this[kConfigurationError]('Missing required parameter: tenant');
217
- return handleError(err, callback);
218
- }
219
- if (params.body == null) {
220
- const err = new this[kConfigurationError]('Missing required parameter: body');
221
- return handleError(err, callback);
222
- }
223
-
224
- let { method, body, tenant, ...querystring } = params;
225
-
226
- tenant = encodePathParam(tenant);
227
-
228
- let path = ['', '_plugins', '_security', 'api', 'tenants', tenant]
229
- .filter((c) => c != null)
230
- .join('/');
231
- method = method || 'PUT';
232
- body = body || '';
233
- querystring = snakeCaseKeys(null, snakeCase, querystring);
234
-
235
- return this.transport.request({ method, path, body, querystring }, options, callback);
236
- };
237
-
238
- /**
239
- * Creates or replaces the specified user.
240
- * <br/> See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#create-user - Security - Create User}
241
- *
242
- * @memberOf API-Security
243
- *
244
- * @param {Object} params
245
- * @param {string} params.username
246
- * @param {Object} params.body
247
- *
248
- * @param {Object} options - Options for {@link Transport#request}
249
- * @param {function} callback - Callback that handles errors and response
250
- *
251
- * @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*}
252
- */
253
- SecurityApi.prototype.createUser = function securityCreateUserApi(params, options, callback) {
254
- [params, options, callback] = normalizeArguments(params, options, callback);
255
-
256
- if (params.username == null) {
257
- const err = new this[kConfigurationError]('Missing required parameter: username');
258
- return handleError(err, callback);
259
- }
260
- if (params.body == null) {
261
- const err = new this[kConfigurationError]('Missing required parameter: body');
262
- return handleError(err, callback);
263
- }
264
-
265
- let { method, body, username, ...querystring } = params;
266
-
267
- username = encodePathParam(username);
268
-
269
- let path = ['', '_plugins', '_security', 'api', 'internalusers', username]
270
- .filter((c) => c != null)
271
- .join('/');
272
- method = method || 'PUT';
273
- body = body || '';
274
- querystring = snakeCaseKeys(null, snakeCase, querystring);
275
-
276
- return this.transport.request({ method, path, body, querystring }, options, callback);
277
- };
278
-
279
- /**
280
- * Delete a specified action group.
281
- * <br/> See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#delete-action-group - Security - Delete Action Group}
282
- *
283
- * @memberOf API-Security
284
- *
285
- * @param {Object} params
286
- * @param {string} params.action_group - Action group to delete.
287
- *
288
- * @param {Object} options - Options for {@link Transport#request}
289
- * @param {function} callback - Callback that handles errors and response
290
- *
291
- * @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*}
292
- */
293
- SecurityApi.prototype.deleteActionGroup = function securityDeleteActionGroupApi(
294
- params,
295
- options,
296
- callback
297
- ) {
298
- [params, options, callback] = normalizeArguments(params, options, callback);
299
-
300
- if (params.actionGroup == null && params.action_group == null) {
301
- const err = new this[kConfigurationError]('Missing required parameter: action_group');
302
- return handleError(err, callback);
303
- }
304
-
305
- let { method, body, actionGroup, action_group, ...querystring } = params;
306
-
307
- action_group = encodePathParam(actionGroup, action_group);
308
-
309
- let path = ['', '_plugins', '_security', 'api', 'actiongroups', action_group]
310
- .filter((c) => c != null)
311
- .join('/');
312
- method = method || 'DELETE';
313
- body = body || '';
314
- querystring = snakeCaseKeys(null, snakeCase, querystring);
315
-
316
- return this.transport.request({ method, path, body, querystring }, options, callback);
317
- };
318
-
319
- /**
320
- * Deletes all distinguished names in the specified cluster’s or node’s allow list.
321
- * <br/> See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#delete-distinguished-names - Security - Delete Distinguished Names}
322
- *
323
- * @memberOf API-Security
324
- *
325
- * @param {Object} params
326
- * @param {string} params.cluster_name
327
- *
328
- * @param {Object} options - Options for {@link Transport#request}
329
- * @param {function} callback - Callback that handles errors and response
330
- *
331
- * @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*}
332
- */
333
- SecurityApi.prototype.deleteDistinguishedNames = function securityDeleteDistinguishedNamesApi(
334
- params,
335
- options,
336
- callback
337
- ) {
338
- [params, options, callback] = normalizeArguments(params, options, callback);
339
-
340
- if (params.clusterName == null && params.cluster_name == null) {
341
- const err = new this[kConfigurationError]('Missing required parameter: cluster_name');
342
- return handleError(err, callback);
343
- }
344
-
345
- let { method, body, clusterName, cluster_name, ...querystring } = params;
346
-
347
- cluster_name = encodePathParam(clusterName, cluster_name);
348
-
349
- let path = ['', '_plugins', '_security', 'api', 'nodesdn', cluster_name]
350
- .filter((c) => c != null)
351
- .join('/');
352
- method = method || 'DELETE';
353
- body = body || '';
354
- querystring = snakeCaseKeys(null, snakeCase, querystring);
355
-
356
- return this.transport.request({ method, path, body, querystring }, options, callback);
357
- };
358
-
359
- /**
360
- * Delete the specified role.
361
- * <br/> See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#delete-role - Security - Delete Role}
362
- *
363
- * @memberOf API-Security
364
- *
365
- * @param {Object} params
366
- * @param {string} params.role
367
- *
368
- * @param {Object} options - Options for {@link Transport#request}
369
- * @param {function} callback - Callback that handles errors and response
370
- *
371
- * @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*}
372
- */
373
- SecurityApi.prototype.deleteRole = function securityDeleteRoleApi(params, options, callback) {
374
- [params, options, callback] = normalizeArguments(params, options, callback);
375
-
376
- if (params.role == null) {
377
- const err = new this[kConfigurationError]('Missing required parameter: role');
378
- return handleError(err, callback);
379
- }
380
-
381
- let { method, body, role, ...querystring } = params;
382
-
383
- role = encodePathParam(role);
384
-
385
- let path = ['', '_plugins', '_security', 'api', 'roles', role].filter((c) => c != null).join('/');
386
- method = method || 'DELETE';
387
- body = body || '';
388
- querystring = snakeCaseKeys(null, snakeCase, querystring);
389
-
390
- return this.transport.request({ method, path, body, querystring }, options, callback);
391
- };
392
-
393
- /**
394
- * Deletes the specified role mapping.
395
- * <br/> See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#delete-role-mapping - Security - Delete Role Mapping}
396
- *
397
- * @memberOf API-Security
398
- *
399
- * @param {Object} params
400
- * @param {string} params.role
401
- *
402
- * @param {Object} options - Options for {@link Transport#request}
403
- * @param {function} callback - Callback that handles errors and response
404
- *
405
- * @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*}
406
- */
407
- SecurityApi.prototype.deleteRoleMapping = function securityDeleteRoleMappingApi(
408
- params,
409
- options,
410
- callback
411
- ) {
412
- [params, options, callback] = normalizeArguments(params, options, callback);
413
-
414
- if (params.role == null) {
415
- const err = new this[kConfigurationError]('Missing required parameter: role');
416
- return handleError(err, callback);
417
- }
418
-
419
- let { method, body, role, ...querystring } = params;
420
-
421
- role = encodePathParam(role);
422
-
423
- let path = ['', '_plugins', '_security', 'api', 'rolesmapping', role]
424
- .filter((c) => c != null)
425
- .join('/');
426
- method = method || 'DELETE';
427
- body = body || '';
428
- querystring = snakeCaseKeys(null, snakeCase, querystring);
429
-
430
- return this.transport.request({ method, path, body, querystring }, options, callback);
431
- };
432
-
433
- /**
434
- * Delete the specified tenant.
435
- * <br/> See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#delete-action-group - Security - Delete Tenant}
436
- *
437
- * @memberOf API-Security
438
- *
439
- * @param {Object} params
440
- * @param {string} params.tenant
441
- *
442
- * @param {Object} options - Options for {@link Transport#request}
443
- * @param {function} callback - Callback that handles errors and response
444
- *
445
- * @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*}
446
- */
447
- SecurityApi.prototype.deleteTenant = function securityDeleteTenantApi(params, options, callback) {
448
- [params, options, callback] = normalizeArguments(params, options, callback);
449
-
450
- if (params.tenant == null) {
451
- const err = new this[kConfigurationError]('Missing required parameter: tenant');
452
- return handleError(err, callback);
453
- }
454
-
455
- let { method, body, tenant, ...querystring } = params;
456
-
457
- tenant = encodePathParam(tenant);
458
-
459
- let path = ['', '_plugins', '_security', 'api', 'tenants', tenant]
460
- .filter((c) => c != null)
461
- .join('/');
462
- method = method || 'DELETE';
463
- body = body || '';
464
- querystring = snakeCaseKeys(null, snakeCase, querystring);
465
-
466
- return this.transport.request({ method, path, body, querystring }, options, callback);
467
- };
468
-
469
- /**
470
- * Delete the specified user.
471
- * <br/> See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#delete-user - Security - Delete User}
472
- *
473
- * @memberOf API-Security
474
- *
475
- * @param {Object} params
476
- * @param {string} params.username
477
- *
478
- * @param {Object} options - Options for {@link Transport#request}
479
- * @param {function} callback - Callback that handles errors and response
480
- *
481
- * @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*}
482
- */
483
- SecurityApi.prototype.deleteUser = function securityDeleteUserApi(params, options, callback) {
484
- [params, options, callback] = normalizeArguments(params, options, callback);
485
-
486
- if (params.username == null) {
487
- const err = new this[kConfigurationError]('Missing required parameter: username');
488
- return handleError(err, callback);
489
- }
490
-
491
- let { method, body, username, ...querystring } = params;
492
-
493
- username = encodePathParam(username);
494
-
495
- let path = ['', '_plugins', '_security', 'api', 'internalusers', username]
496
- .filter((c) => c != null)
497
- .join('/');
498
- method = method || 'DELETE';
499
- body = body || '';
500
- querystring = snakeCaseKeys(null, snakeCase, querystring);
501
-
502
- return this.transport.request({ method, path, body, querystring }, options, callback);
503
- };
504
-
505
- /**
506
- * Flushes the Security plugin user, authentication, and authorization cache.
507
- * <br/> See Also: {@link https://opensearch.org/docs/2.7/security/access-control/api/#flush-cache - Security - Flush Cache}
508
- *
509
- * @memberOf API-Security
510
- *
511
- * @param {Object} params
512
- *
513
- * @param {Object} options - Options for {@link Transport#request}
514
- * @param {function} callback - Callback that handles errors and response
515
- *
516
- * @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*}
517
- */
518
- SecurityApi.prototype.flushCache = function securityFlushCacheApi(params, options, callback) {
519
- [params, options, callback] = normalizeArguments(params, options, callback);
520
-
521
- let { method, body, ...querystring } = params;
522
-
523
- let path = ['', '_plugins', '_security', 'api', 'cache'].filter((c) => c != null).join('/');
524
- method = method || 'DELETE';
525
- body = body || '';
526
- querystring = snakeCaseKeys(null, snakeCase, querystring);
527
-
528
- return this.transport.request({ method, path, body, querystring }, options, callback);
529
- };
530
-
531
- /**
532
- * Returns account details for the current user.
533
- * <br/> See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#get-account-details - Security - Get Account Details}
534
- *
535
- * @memberOf API-Security
536
- *
537
- * @param {Object} params
538
- *
539
- * @param {Object} options - Options for {@link Transport#request}
540
- * @param {function} callback - Callback that handles errors and response
541
- *
542
- * @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*}
543
- */
544
- SecurityApi.prototype.getAccountDetails = function securityGetAccountDetailsApi(
545
- params,
546
- options,
547
- callback
548
- ) {
549
- [params, options, callback] = normalizeArguments(params, options, callback);
550
-
551
- let { method, body, ...querystring } = params;
552
-
553
- let path = ['', '_plugins', '_security', 'api', 'account'].filter((c) => c != null).join('/');
554
- method = method || 'GET';
555
- body = body || '';
556
- querystring = snakeCaseKeys(null, snakeCase, querystring);
557
-
558
- return this.transport.request({ method, path, body, querystring }, options, callback);
559
- };
560
-
561
- /**
562
- * Retrieves one action group.
563
- * <br/> See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#get-action-group - Security - Get Action Group}
564
- *
565
- * @memberOf API-Security
566
- *
567
- * @param {Object} params
568
- * @param {string} params.action_group - Action group to retrieve.
569
- *
570
- * @param {Object} options - Options for {@link Transport#request}
571
- * @param {function} callback - Callback that handles errors and response
572
- *
573
- * @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*}
574
- */
575
- SecurityApi.prototype.getActionGroup = function securityGetActionGroupApi(
576
- params,
577
- options,
578
- callback
579
- ) {
580
- [params, options, callback] = normalizeArguments(params, options, callback);
581
-
582
- if (params.actionGroup == null && params.action_group == null) {
583
- const err = new this[kConfigurationError]('Missing required parameter: action_group');
584
- return handleError(err, callback);
585
- }
586
-
587
- let { method, body, actionGroup, action_group, ...querystring } = params;
588
-
589
- action_group = encodePathParam(actionGroup, action_group);
590
-
591
- let path = ['', '_plugins', '_security', 'api', 'actiongroups', action_group]
592
- .filter((c) => c != null)
593
- .join('/');
594
- method = method || 'GET';
595
- body = body || '';
596
- querystring = snakeCaseKeys(null, snakeCase, querystring);
597
-
598
- return this.transport.request({ method, path, body, querystring }, options, callback);
599
- };
600
-
601
- /**
602
- * Retrieves all action groups.
603
- * <br/> See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#get-action-groups - Security - Get Action Groups}
604
- *
605
- * @memberOf API-Security
606
- *
607
- * @param {Object} params
608
- *
609
- * @param {Object} options - Options for {@link Transport#request}
610
- * @param {function} callback - Callback that handles errors and response
611
- *
612
- * @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*}
613
- */
614
- SecurityApi.prototype.getActionGroups = function securityGetActionGroupsApi(
615
- params,
616
- options,
617
- callback
618
- ) {
619
- [params, options, callback] = normalizeArguments(params, options, callback);
620
-
621
- let { method, body, ...querystring } = params;
622
-
623
- let path = ['', '_plugins', '_security', 'api', 'actiongroups']
624
- .filter((c) => c != null)
625
- .join('/');
626
- method = method || 'GET';
627
- body = body || '';
628
- querystring = snakeCaseKeys(null, snakeCase, querystring);
629
-
630
- return this.transport.request({ method, path, body, querystring }, options, callback);
631
- };
632
-
633
- /**
634
- * Retrieves the audit configuration.
635
- * <br/> See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#audit-logs - Security - Get Audit Configuration}
636
- *
637
- * @memberOf API-Security
638
- *
639
- * @param {Object} params
640
- *
641
- * @param {Object} options - Options for {@link Transport#request}
642
- * @param {function} callback - Callback that handles errors and response
643
- *
644
- * @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*}
645
- */
646
- SecurityApi.prototype.getAuditConfiguration = function securityGetAuditConfigurationApi(
647
- params,
648
- options,
649
- callback
650
- ) {
651
- [params, options, callback] = normalizeArguments(params, options, callback);
652
-
653
- let { method, body, ...querystring } = params;
654
-
655
- let path = ['', '_plugins', '_security', 'api', 'audit'].filter((c) => c != null).join('/');
656
- method = method || 'GET';
657
- body = body || '';
658
- querystring = snakeCaseKeys(null, snakeCase, querystring);
659
-
660
- return this.transport.request({ method, path, body, querystring }, options, callback);
661
- };
662
-
663
- /**
664
- * Retrieves the cluster’s security certificates.
665
- * <br/> See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#get-certificates - Security - Get Certificates}
666
- *
667
- * @memberOf API-Security
668
- *
669
- * @param {Object} params
670
- *
671
- * @param {Object} options - Options for {@link Transport#request}
672
- * @param {function} callback - Callback that handles errors and response
673
- *
674
- * @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*}
675
- */
676
- SecurityApi.prototype.getCertificates = function securityGetCertificatesApi(
677
- params,
678
- options,
679
- callback
680
- ) {
681
- [params, options, callback] = normalizeArguments(params, options, callback);
682
-
683
- let { method, body, ...querystring } = params;
684
-
685
- let path = ['', '_plugins', '_security', 'api', 'ssl', 'certs']
686
- .filter((c) => c != null)
687
- .join('/');
688
- method = method || 'GET';
689
- body = body || '';
690
- querystring = snakeCaseKeys(null, snakeCase, querystring);
691
-
692
- return this.transport.request({ method, path, body, querystring }, options, callback);
693
- };
694
-
695
- /**
696
- * Returns the current Security plugin configuration in JSON format.
697
- * <br/> See Also: {@link https://opensearch.org/docs/2.7/security/access-control/api/#get-configuration - Security - Get Configuration}
698
- *
699
- * @memberOf API-Security
700
- *
701
- * @param {Object} params
702
- *
703
- * @param {Object} options - Options for {@link Transport#request}
704
- * @param {function} callback - Callback that handles errors and response
705
- *
706
- * @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*}
707
- */
708
- SecurityApi.prototype.getConfiguration = function securityGetConfigurationApi(
709
- params,
710
- options,
711
- callback
712
- ) {
713
- [params, options, callback] = normalizeArguments(params, options, callback);
714
-
715
- let { method, body, ...querystring } = params;
716
-
717
- let path = ['', '_plugins', '_security', 'api', 'securityconfig']
718
- .filter((c) => c != null)
719
- .join('/');
720
- method = method || 'GET';
721
- body = body || '';
722
- querystring = snakeCaseKeys(null, snakeCase, querystring);
723
-
724
- return this.transport.request({ method, path, body, querystring }, options, callback);
725
- };
726
-
727
- /**
728
- * Retrieves all distinguished names in the allow list.
729
- * <br/> See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#get-distinguished-names - Security - Get Distinguished Names}
730
- *
731
- * @memberOf API-Security
732
- *
733
- * @param {Object} params
734
- * @param {string} [params.cluster_name]
735
- *
736
- * @param {Object} options - Options for {@link Transport#request}
737
- * @param {function} callback - Callback that handles errors and response
738
- *
739
- * @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*}
740
- */
741
- SecurityApi.prototype.getDistinguishedNames = function securityGetDistinguishedNamesApi(
742
- params,
743
- options,
744
- callback
745
- ) {
746
- [params, options, callback] = normalizeArguments(params, options, callback);
747
-
748
- let { method, body, clusterName, cluster_name, ...querystring } = params;
749
-
750
- cluster_name = encodePathParam(clusterName, cluster_name);
751
-
752
- let path = ['', '_plugins', '_security', 'api', 'nodesdn', cluster_name]
753
- .filter((c) => c != null)
754
- .join('/');
755
- method = method || 'GET';
756
- body = body || '';
757
- querystring = snakeCaseKeys(null, snakeCase, querystring);
758
-
759
- return this.transport.request({ method, path, body, querystring }, options, callback);
760
- };
761
-
762
- /**
763
- * Retrieves one role.
764
- * <br/> See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#get-role - Security - Get Role}
765
- *
766
- * @memberOf API-Security
767
- *
768
- * @param {Object} params
769
- * @param {string} params.role
770
- *
771
- * @param {Object} options - Options for {@link Transport#request}
772
- * @param {function} callback - Callback that handles errors and response
773
- *
774
- * @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*}
775
- */
776
- SecurityApi.prototype.getRole = function securityGetRoleApi(params, options, callback) {
777
- [params, options, callback] = normalizeArguments(params, options, callback);
778
-
779
- if (params.role == null) {
780
- const err = new this[kConfigurationError]('Missing required parameter: role');
781
- return handleError(err, callback);
782
- }
783
-
784
- let { method, body, role, ...querystring } = params;
785
-
786
- role = encodePathParam(role);
787
-
788
- let path = ['', '_plugins', '_security', 'api', 'roles', role].filter((c) => c != null).join('/');
789
- method = method || 'GET';
790
- body = body || '';
791
- querystring = snakeCaseKeys(null, snakeCase, querystring);
792
-
793
- return this.transport.request({ method, path, body, querystring }, options, callback);
794
- };
795
-
796
- /**
797
- * Retrieves one role mapping.
798
- * <br/> See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#get-role-mapping - Security - Get Role Mapping}
799
- *
800
- * @memberOf API-Security
801
- *
802
- * @param {Object} params
803
- * @param {string} params.role
804
- *
805
- * @param {Object} options - Options for {@link Transport#request}
806
- * @param {function} callback - Callback that handles errors and response
807
- *
808
- * @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*}
809
- */
810
- SecurityApi.prototype.getRoleMapping = function securityGetRoleMappingApi(
811
- params,
812
- options,
813
- callback
814
- ) {
815
- [params, options, callback] = normalizeArguments(params, options, callback);
816
-
817
- if (params.role == null) {
818
- const err = new this[kConfigurationError]('Missing required parameter: role');
819
- return handleError(err, callback);
820
- }
821
-
822
- let { method, body, role, ...querystring } = params;
823
-
824
- role = encodePathParam(role);
825
-
826
- let path = ['', '_plugins', '_security', 'api', 'rolesmapping', role]
827
- .filter((c) => c != null)
828
- .join('/');
829
- method = method || 'GET';
830
- body = body || '';
831
- querystring = snakeCaseKeys(null, snakeCase, querystring);
832
-
833
- return this.transport.request({ method, path, body, querystring }, options, callback);
834
- };
835
-
836
- /**
837
- * Retrieves all role mappings.
838
- * <br/> See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#get-role-mappings - Security - Get Role Mappings}
839
- *
840
- * @memberOf API-Security
841
- *
842
- * @param {Object} params
843
- *
844
- * @param {Object} options - Options for {@link Transport#request}
845
- * @param {function} callback - Callback that handles errors and response
846
- *
847
- * @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*}
848
- */
849
- SecurityApi.prototype.getRoleMappings = function securityGetRoleMappingsApi(
850
- params,
851
- options,
852
- callback
853
- ) {
854
- [params, options, callback] = normalizeArguments(params, options, callback);
855
-
856
- let { method, body, ...querystring } = params;
857
-
858
- let path = ['', '_plugins', '_security', 'api', 'rolesmapping']
859
- .filter((c) => c != null)
860
- .join('/');
861
- method = method || 'GET';
862
- body = body || '';
863
- querystring = snakeCaseKeys(null, snakeCase, querystring);
864
-
865
- return this.transport.request({ method, path, body, querystring }, options, callback);
866
- };
867
-
868
- /**
869
- * Retrieves all roles.
870
- * <br/> See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#get-roles - Security - Get Roles}
871
- *
872
- * @memberOf API-Security
873
- *
874
- * @param {Object} params
875
- *
876
- * @param {Object} options - Options for {@link Transport#request}
877
- * @param {function} callback - Callback that handles errors and response
878
- *
879
- * @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*}
880
- */
881
- SecurityApi.prototype.getRoles = function securityGetRolesApi(params, options, callback) {
882
- [params, options, callback] = normalizeArguments(params, options, callback);
883
-
884
- let { method, body, ...querystring } = params;
885
-
886
- let path = ['', '_plugins', '_security', 'api', 'roles'].filter((c) => c != null).join('/');
887
- method = method || 'GET';
888
- body = body || '';
889
- querystring = snakeCaseKeys(null, snakeCase, querystring);
890
-
891
- return this.transport.request({ method, path, body, querystring }, options, callback);
892
- };
893
-
894
- /**
895
- * Retrieves one tenant.
896
- * <br/> See Also: {@link https://opensearch.org/docs/2.7/security/access-control/api/#get-tenant - Security - Get Tenant}
897
- *
898
- * @memberOf API-Security
899
- *
900
- * @param {Object} params
901
- * @param {string} params.tenant
902
- *
903
- * @param {Object} options - Options for {@link Transport#request}
904
- * @param {function} callback - Callback that handles errors and response
905
- *
906
- * @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*}
907
- */
908
- SecurityApi.prototype.getTenant = function securityGetTenantApi(params, options, callback) {
909
- [params, options, callback] = normalizeArguments(params, options, callback);
910
-
911
- if (params.tenant == null) {
912
- const err = new this[kConfigurationError]('Missing required parameter: tenant');
913
- return handleError(err, callback);
914
- }
915
-
916
- let { method, body, tenant, ...querystring } = params;
917
-
918
- tenant = encodePathParam(tenant);
919
-
920
- let path = ['', '_plugins', '_security', 'api', 'tenants', tenant]
921
- .filter((c) => c != null)
922
- .join('/');
923
- method = method || 'GET';
924
- body = body || '';
925
- querystring = snakeCaseKeys(null, snakeCase, querystring);
926
-
927
- return this.transport.request({ method, path, body, querystring }, options, callback);
928
- };
929
-
930
- /**
931
- * Retrieves all tenants.
932
- * <br/> See Also: {@link https://opensearch.org/docs/2.7/security/access-control/api/#get-tenants - Security - Get Tenants}
933
- *
934
- * @memberOf API-Security
935
- *
936
- * @param {Object} params
937
- *
938
- * @param {Object} options - Options for {@link Transport#request}
939
- * @param {function} callback - Callback that handles errors and response
940
- *
941
- * @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*}
942
- */
943
- SecurityApi.prototype.getTenants = function securityGetTenantsApi(params, options, callback) {
944
- [params, options, callback] = normalizeArguments(params, options, callback);
945
-
946
- let { method, body, ...querystring } = params;
947
-
948
- let path = ['', '_plugins', '_security', 'api', 'tenants'].filter((c) => c != null).join('/');
949
- method = method || 'GET';
950
- body = body || '';
951
- querystring = snakeCaseKeys(null, snakeCase, querystring);
952
-
953
- return this.transport.request({ method, path, body, querystring }, options, callback);
954
- };
955
-
956
- /**
957
- * Retrieve one internal user.
958
- * <br/> See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#get-user - Security - Get User}
959
- *
960
- * @memberOf API-Security
961
- *
962
- * @param {Object} params
963
- * @param {string} params.username
964
- *
965
- * @param {Object} options - Options for {@link Transport#request}
966
- * @param {function} callback - Callback that handles errors and response
967
- *
968
- * @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*}
969
- */
970
- SecurityApi.prototype.getUser = function securityGetUserApi(params, options, callback) {
971
- [params, options, callback] = normalizeArguments(params, options, callback);
972
-
973
- if (params.username == null) {
974
- const err = new this[kConfigurationError]('Missing required parameter: username');
975
- return handleError(err, callback);
976
- }
977
-
978
- let { method, body, username, ...querystring } = params;
979
-
980
- username = encodePathParam(username);
981
-
982
- let path = ['', '_plugins', '_security', 'api', 'internalusers', username]
983
- .filter((c) => c != null)
984
- .join('/');
985
- method = method || 'GET';
986
- body = body || '';
987
- querystring = snakeCaseKeys(null, snakeCase, querystring);
988
-
989
- return this.transport.request({ method, path, body, querystring }, options, callback);
990
- };
991
-
992
- /**
993
- * Retrieve all internal users.
994
- * <br/> See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#get-users - Security - Get Users}
995
- *
996
- * @memberOf API-Security
997
- *
998
- * @param {Object} params
999
- *
1000
- * @param {Object} options - Options for {@link Transport#request}
1001
- * @param {function} callback - Callback that handles errors and response
1002
- *
1003
- * @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*}
1004
- */
1005
- SecurityApi.prototype.getUsers = function securityGetUsersApi(params, options, callback) {
1006
- [params, options, callback] = normalizeArguments(params, options, callback);
1007
-
1008
- let { method, body, ...querystring } = params;
1009
-
1010
- let path = ['', '_plugins', '_security', 'api', 'internalusers']
1011
- .filter((c) => c != null)
1012
- .join('/');
1013
- method = method || 'GET';
1014
- body = body || '';
1015
- querystring = snakeCaseKeys(null, snakeCase, querystring);
1016
-
1017
- return this.transport.request({ method, path, body, querystring }, options, callback);
1018
- };
1019
-
1020
- /**
1021
- * Checks to see if the Security plugin is up and running.
1022
- * <br/> See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#health-check - Security - Health}
1023
- *
1024
- * @memberOf API-Security
1025
- *
1026
- * @param {Object} params
1027
- *
1028
- * @param {Object} options - Options for {@link Transport#request}
1029
- * @param {function} callback - Callback that handles errors and response
1030
- *
1031
- * @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*}
1032
- */
1033
- SecurityApi.prototype.health = function securityHealthApi(params, options, callback) {
1034
- [params, options, callback] = normalizeArguments(params, options, callback);
1035
-
1036
- let { method, body, ...querystring } = params;
1037
-
1038
- let path = ['', '_plugins', '_security', 'health'].filter((c) => c != null).join('/');
1039
- method = method || 'GET';
1040
- body = body || '';
1041
- querystring = snakeCaseKeys(null, snakeCase, querystring);
1042
-
1043
- return this.transport.request({ method, path, body, querystring }, options, callback);
1044
- };
1045
-
1046
- /**
1047
- * Updates individual attributes of an action group.
1048
- * <br/> See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#patch-action-group - Security - Patch Action Group}
1049
- *
1050
- * @memberOf API-Security
1051
- *
1052
- * @param {Object} params
1053
- * @param {string} params.action_group
1054
- * @param {Object} params.body
1055
- *
1056
- * @param {Object} options - Options for {@link Transport#request}
1057
- * @param {function} callback - Callback that handles errors and response
1058
- *
1059
- * @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*}
1060
- */
1061
- SecurityApi.prototype.patchActionGroup = function securityPatchActionGroupApi(
1062
- params,
1063
- options,
1064
- callback
1065
- ) {
1066
- [params, options, callback] = normalizeArguments(params, options, callback);
1067
-
1068
- if (params.actionGroup == null && params.action_group == null) {
1069
- const err = new this[kConfigurationError]('Missing required parameter: action_group');
1070
- return handleError(err, callback);
1071
- }
1072
- if (params.body == null) {
1073
- const err = new this[kConfigurationError]('Missing required parameter: body');
1074
- return handleError(err, callback);
1075
- }
1076
-
1077
- let { method, body, actionGroup, action_group, ...querystring } = params;
1078
-
1079
- action_group = encodePathParam(actionGroup, action_group);
1080
-
1081
- let path = ['', '_plugins', '_security', 'api', 'actiongroups', action_group]
1082
- .filter((c) => c != null)
1083
- .join('/');
1084
- method = method || 'PATCH';
1085
- body = body || '';
1086
- querystring = snakeCaseKeys(null, snakeCase, querystring);
1087
-
1088
- return this.transport.request({ method, path, body, querystring }, options, callback);
1089
- };
1090
-
1091
- /**
1092
- * Creates, updates, or deletes multiple action groups in a single call.
1093
- * <br/> See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#patch-action-groups - Security - Patch Action Groups}
1094
- *
1095
- * @memberOf API-Security
1096
- *
1097
- * @param {Object} params
1098
- * @param {Object} params.body
1099
- *
1100
- * @param {Object} options - Options for {@link Transport#request}
1101
- * @param {function} callback - Callback that handles errors and response
1102
- *
1103
- * @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*}
1104
- */
1105
- SecurityApi.prototype.patchActionGroups = function securityPatchActionGroupsApi(
1106
- params,
1107
- options,
1108
- callback
1109
- ) {
1110
- [params, options, callback] = normalizeArguments(params, options, callback);
1111
-
1112
- if (params.body == null) {
1113
- const err = new this[kConfigurationError]('Missing required parameter: body');
1114
- return handleError(err, callback);
1115
- }
1116
-
1117
- let { method, body, ...querystring } = params;
1118
-
1119
- let path = ['', '_plugins', '_security', 'api', 'actiongroups']
1120
- .filter((c) => c != null)
1121
- .join('/');
1122
- method = method || 'PATCH';
1123
- body = body || '';
1124
- querystring = snakeCaseKeys(null, snakeCase, querystring);
1125
-
1126
- return this.transport.request({ method, path, body, querystring }, options, callback);
1127
- };
1128
-
1129
- /**
1130
- * A PATCH call is used to update specified fields in the audit configuration.
1131
- * <br/> See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#audit-logs - Security - Patch Audit Configuration}
1132
- *
1133
- * @memberOf API-Security
1134
- *
1135
- * @param {Object} params
1136
- * @param {Object} params.body
1137
- *
1138
- * @param {Object} options - Options for {@link Transport#request}
1139
- * @param {function} callback - Callback that handles errors and response
1140
- *
1141
- * @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*}
1142
- */
1143
- SecurityApi.prototype.patchAuditConfiguration = function securityPatchAuditConfigurationApi(
1144
- params,
1145
- options,
1146
- callback
1147
- ) {
1148
- [params, options, callback] = normalizeArguments(params, options, callback);
1149
-
1150
- if (params.body == null) {
1151
- const err = new this[kConfigurationError]('Missing required parameter: body');
1152
- return handleError(err, callback);
1153
- }
1154
-
1155
- let { method, body, ...querystring } = params;
1156
-
1157
- let path = ['', '_plugins', '_security', 'api', 'audit'].filter((c) => c != null).join('/');
1158
- method = method || 'PATCH';
1159
- body = body || '';
1160
- querystring = snakeCaseKeys(null, snakeCase, querystring);
1161
-
1162
- return this.transport.request({ method, path, body, querystring }, options, callback);
1163
- };
1164
-
1165
- /**
1166
- * A PATCH call is used to update the existing configuration using the REST API.
1167
- * <br/> See Also: {@link https://opensearch.org/docs/2.7/security/access-control/api/#patch-configuration - Security - Patch Configuration}
1168
- *
1169
- * @memberOf API-Security
1170
- *
1171
- * @param {Object} params
1172
- * @param {Object} params.body
1173
- *
1174
- * @param {Object} options - Options for {@link Transport#request}
1175
- * @param {function} callback - Callback that handles errors and response
1176
- *
1177
- * @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*}
1178
- */
1179
- SecurityApi.prototype.patchConfiguration = function securityPatchConfigurationApi(
1180
- params,
1181
- options,
1182
- callback
1183
- ) {
1184
- [params, options, callback] = normalizeArguments(params, options, callback);
1185
-
1186
- if (params.body == null) {
1187
- const err = new this[kConfigurationError]('Missing required parameter: body');
1188
- return handleError(err, callback);
1189
- }
1190
-
1191
- let { method, body, ...querystring } = params;
1192
-
1193
- let path = ['', '_plugins', '_security', 'api', 'securityconfig']
1194
- .filter((c) => c != null)
1195
- .join('/');
1196
- method = method || 'PATCH';
1197
- body = body || '';
1198
- querystring = snakeCaseKeys(null, snakeCase, querystring);
1199
-
1200
- return this.transport.request({ method, path, body, querystring }, options, callback);
1201
- };
1202
-
1203
- /**
1204
- * Bulk update of distinguished names.
1205
- * <br/> See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#update-all-distinguished-names - Security - Patch Distinguished Names}
1206
- *
1207
- * @memberOf API-Security
1208
- *
1209
- * @param {Object} params
1210
- * @param {Object} params.body
1211
- *
1212
- * @param {Object} options - Options for {@link Transport#request}
1213
- * @param {function} callback - Callback that handles errors and response
1214
- *
1215
- * @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*}
1216
- */
1217
- SecurityApi.prototype.patchDistinguishedNames = function securityPatchDistinguishedNamesApi(
1218
- params,
1219
- options,
1220
- callback
1221
- ) {
1222
- [params, options, callback] = normalizeArguments(params, options, callback);
1223
-
1224
- if (params.body == null) {
1225
- const err = new this[kConfigurationError]('Missing required parameter: body');
1226
- return handleError(err, callback);
1227
- }
1228
-
1229
- let { method, body, ...querystring } = params;
1230
-
1231
- let path = ['', '_plugins', '_security', 'api', 'nodesdn'].filter((c) => c != null).join('/');
1232
- method = method || 'PATCH';
1233
- body = body || '';
1234
- querystring = snakeCaseKeys(null, snakeCase, querystring);
1235
-
1236
- return this.transport.request({ method, path, body, querystring }, options, callback);
1237
- };
1238
-
1239
- /**
1240
- * Updates individual attributes of a role.
1241
- * <br/> See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#patch-role - Security - Patch Role}
1242
- *
1243
- * @memberOf API-Security
1244
- *
1245
- * @param {Object} params
1246
- * @param {string} params.role
1247
- * @param {Object} params.body
1248
- *
1249
- * @param {Object} options - Options for {@link Transport#request}
1250
- * @param {function} callback - Callback that handles errors and response
1251
- *
1252
- * @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*}
1253
- */
1254
- SecurityApi.prototype.patchRole = function securityPatchRoleApi(params, options, callback) {
1255
- [params, options, callback] = normalizeArguments(params, options, callback);
1256
-
1257
- if (params.role == null) {
1258
- const err = new this[kConfigurationError]('Missing required parameter: role');
1259
- return handleError(err, callback);
1260
- }
1261
- if (params.body == null) {
1262
- const err = new this[kConfigurationError]('Missing required parameter: body');
1263
- return handleError(err, callback);
1264
- }
1265
-
1266
- let { method, body, role, ...querystring } = params;
1267
-
1268
- role = encodePathParam(role);
1269
-
1270
- let path = ['', '_plugins', '_security', 'api', 'roles', role].filter((c) => c != null).join('/');
1271
- method = method || 'PATCH';
1272
- body = body || '';
1273
- querystring = snakeCaseKeys(null, snakeCase, querystring);
1274
-
1275
- return this.transport.request({ method, path, body, querystring }, options, callback);
1276
- };
1277
-
1278
- /**
1279
- * Updates individual attributes of a role mapping.
1280
- * <br/> See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#patch-role-mapping - Security - Patch Role Mapping}
1281
- *
1282
- * @memberOf API-Security
1283
- *
1284
- * @param {Object} params
1285
- * @param {string} params.role
1286
- * @param {Object} params.body
1287
- *
1288
- * @param {Object} options - Options for {@link Transport#request}
1289
- * @param {function} callback - Callback that handles errors and response
1290
- *
1291
- * @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*}
1292
- */
1293
- SecurityApi.prototype.patchRoleMapping = function securityPatchRoleMappingApi(
1294
- params,
1295
- options,
1296
- callback
1297
- ) {
1298
- [params, options, callback] = normalizeArguments(params, options, callback);
1299
-
1300
- if (params.role == null) {
1301
- const err = new this[kConfigurationError]('Missing required parameter: role');
1302
- return handleError(err, callback);
1303
- }
1304
- if (params.body == null) {
1305
- const err = new this[kConfigurationError]('Missing required parameter: body');
1306
- return handleError(err, callback);
1307
- }
1308
-
1309
- let { method, body, role, ...querystring } = params;
1310
-
1311
- role = encodePathParam(role);
1312
-
1313
- let path = ['', '_plugins', '_security', 'api', 'rolesmapping', role]
1314
- .filter((c) => c != null)
1315
- .join('/');
1316
- method = method || 'PATCH';
1317
- body = body || '';
1318
- querystring = snakeCaseKeys(null, snakeCase, querystring);
1319
-
1320
- return this.transport.request({ method, path, body, querystring }, options, callback);
1321
- };
1322
-
1323
- /**
1324
- * Creates or updates multiple role mappings in a single call.
1325
- * <br/> See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#patch-role-mappings - Security - Patch Role Mappings}
1326
- *
1327
- * @memberOf API-Security
1328
- *
1329
- * @param {Object} params
1330
- * @param {Object} params.body
1331
- *
1332
- * @param {Object} options - Options for {@link Transport#request}
1333
- * @param {function} callback - Callback that handles errors and response
1334
- *
1335
- * @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*}
1336
- */
1337
- SecurityApi.prototype.patchRoleMappings = function securityPatchRoleMappingsApi(
1338
- params,
1339
- options,
1340
- callback
1341
- ) {
1342
- [params, options, callback] = normalizeArguments(params, options, callback);
1343
-
1344
- if (params.body == null) {
1345
- const err = new this[kConfigurationError]('Missing required parameter: body');
1346
- return handleError(err, callback);
1347
- }
1348
-
1349
- let { method, body, ...querystring } = params;
1350
-
1351
- let path = ['', '_plugins', '_security', 'api', 'rolesmapping']
1352
- .filter((c) => c != null)
1353
- .join('/');
1354
- method = method || 'PATCH';
1355
- body = body || '';
1356
- querystring = snakeCaseKeys(null, snakeCase, querystring);
1357
-
1358
- return this.transport.request({ method, path, body, querystring }, options, callback);
1359
- };
1360
-
1361
- /**
1362
- * Creates, updates, or deletes multiple roles in a single call.
1363
- * <br/> See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#patch-roles - Security - Patch Roles}
1364
- *
1365
- * @memberOf API-Security
1366
- *
1367
- * @param {Object} params
1368
- * @param {Object} params.body
1369
- *
1370
- * @param {Object} options - Options for {@link Transport#request}
1371
- * @param {function} callback - Callback that handles errors and response
1372
- *
1373
- * @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*}
1374
- */
1375
- SecurityApi.prototype.patchRoles = function securityPatchRolesApi(params, options, callback) {
1376
- [params, options, callback] = normalizeArguments(params, options, callback);
1377
-
1378
- if (params.body == null) {
1379
- const err = new this[kConfigurationError]('Missing required parameter: body');
1380
- return handleError(err, callback);
1381
- }
1382
-
1383
- let { method, body, ...querystring } = params;
1384
-
1385
- let path = ['', '_plugins', '_security', 'api', 'roles'].filter((c) => c != null).join('/');
1386
- method = method || 'PATCH';
1387
- body = body || '';
1388
- querystring = snakeCaseKeys(null, snakeCase, querystring);
1389
-
1390
- return this.transport.request({ method, path, body, querystring }, options, callback);
1391
- };
1392
-
1393
- /**
1394
- * Add, delete, or modify a single tenant.
1395
- * <br/> See Also: {@link https://opensearch.org/docs/2.7/security/access-control/api/#patch-tenant - Security - Patch Tenant}
1396
- *
1397
- * @memberOf API-Security
1398
- *
1399
- * @param {Object} params
1400
- * @param {string} params.tenant
1401
- * @param {Object} params.body
1402
- *
1403
- * @param {Object} options - Options for {@link Transport#request}
1404
- * @param {function} callback - Callback that handles errors and response
1405
- *
1406
- * @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*}
1407
- */
1408
- SecurityApi.prototype.patchTenant = function securityPatchTenantApi(params, options, callback) {
1409
- [params, options, callback] = normalizeArguments(params, options, callback);
1410
-
1411
- if (params.tenant == null) {
1412
- const err = new this[kConfigurationError]('Missing required parameter: tenant');
1413
- return handleError(err, callback);
1414
- }
1415
- if (params.body == null) {
1416
- const err = new this[kConfigurationError]('Missing required parameter: body');
1417
- return handleError(err, callback);
1418
- }
1419
-
1420
- let { method, body, tenant, ...querystring } = params;
1421
-
1422
- tenant = encodePathParam(tenant);
1423
-
1424
- let path = ['', '_plugins', '_security', 'api', 'tenants', tenant]
1425
- .filter((c) => c != null)
1426
- .join('/');
1427
- method = method || 'PATCH';
1428
- body = body || '';
1429
- querystring = snakeCaseKeys(null, snakeCase, querystring);
1430
-
1431
- return this.transport.request({ method, path, body, querystring }, options, callback);
1432
- };
1433
-
1434
- /**
1435
- * Add, delete, or modify multiple tenants in a single call.
1436
- * <br/> See Also: {@link https://opensearch.org/docs/2.7/security/access-control/api/#patch-tenants - Security - Patch Tenants}
1437
- *
1438
- * @memberOf API-Security
1439
- *
1440
- * @param {Object} params
1441
- * @param {Object} params.body
1442
- *
1443
- * @param {Object} options - Options for {@link Transport#request}
1444
- * @param {function} callback - Callback that handles errors and response
1445
- *
1446
- * @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*}
1447
- */
1448
- SecurityApi.prototype.patchTenants = function securityPatchTenantsApi(params, options, callback) {
1449
- [params, options, callback] = normalizeArguments(params, options, callback);
1450
-
1451
- if (params.body == null) {
1452
- const err = new this[kConfigurationError]('Missing required parameter: body');
1453
- return handleError(err, callback);
1454
- }
1455
-
1456
- let { method, body, ...querystring } = params;
1457
-
1458
- let path = ['', '_plugins', '_security', 'api', 'tenants'].filter((c) => c != null).join('/');
1459
- method = method || 'PATCH';
1460
- body = body || '';
1461
- querystring = snakeCaseKeys(null, snakeCase, querystring);
1462
-
1463
- return this.transport.request({ method, path, body, querystring }, options, callback);
1464
- };
1465
-
1466
- /**
1467
- * Updates individual attributes of an internal user.
1468
- * <br/> See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#patch-user - Security - Patch User}
1469
- *
1470
- * @memberOf API-Security
1471
- *
1472
- * @param {Object} params
1473
- * @param {string} params.username
1474
- * @param {Object} params.body
1475
- *
1476
- * @param {Object} options - Options for {@link Transport#request}
1477
- * @param {function} callback - Callback that handles errors and response
1478
- *
1479
- * @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*}
1480
- */
1481
- SecurityApi.prototype.patchUser = function securityPatchUserApi(params, options, callback) {
1482
- [params, options, callback] = normalizeArguments(params, options, callback);
1483
-
1484
- if (params.username == null) {
1485
- const err = new this[kConfigurationError]('Missing required parameter: username');
1486
- return handleError(err, callback);
1487
- }
1488
- if (params.body == null) {
1489
- const err = new this[kConfigurationError]('Missing required parameter: body');
1490
- return handleError(err, callback);
1491
- }
1492
-
1493
- let { method, body, username, ...querystring } = params;
1494
-
1495
- username = encodePathParam(username);
1496
-
1497
- let path = ['', '_plugins', '_security', 'api', 'internalusers', username]
1498
- .filter((c) => c != null)
1499
- .join('/');
1500
- method = method || 'PATCH';
1501
- body = body || '';
1502
- querystring = snakeCaseKeys(null, snakeCase, querystring);
1503
-
1504
- return this.transport.request({ method, path, body, querystring }, options, callback);
1505
- };
1506
-
1507
- /**
1508
- * Creates, updates, or deletes multiple internal users in a single call.
1509
- * <br/> See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#patch-users - Security - Patch Users}
1510
- *
1511
- * @memberOf API-Security
1512
- *
1513
- * @param {Object} params
1514
- * @param {Object} params.body
1515
- *
1516
- * @param {Object} options - Options for {@link Transport#request}
1517
- * @param {function} callback - Callback that handles errors and response
1518
- *
1519
- * @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*}
1520
- */
1521
- SecurityApi.prototype.patchUsers = function securityPatchUsersApi(params, options, callback) {
1522
- [params, options, callback] = normalizeArguments(params, options, callback);
1523
-
1524
- if (params.body == null) {
1525
- const err = new this[kConfigurationError]('Missing required parameter: body');
1526
- return handleError(err, callback);
1527
- }
1528
-
1529
- let { method, body, ...querystring } = params;
1530
-
1531
- let path = ['', '_plugins', '_security', 'api', 'internalusers']
1532
- .filter((c) => c != null)
1533
- .join('/');
1534
- method = method || 'PATCH';
1535
- body = body || '';
1536
- querystring = snakeCaseKeys(null, snakeCase, querystring);
1537
-
1538
- return this.transport.request({ method, path, body, querystring }, options, callback);
1539
- };
1540
-
1541
- /**
1542
- * Reload HTTP layer communication certificates.
1543
- * <br/> See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#reload-http-certificates - Security - Reload Http Certificates}
1544
- *
1545
- * @memberOf API-Security
1546
- *
1547
- * @param {Object} params
1548
- *
1549
- * @param {Object} options - Options for {@link Transport#request}
1550
- * @param {function} callback - Callback that handles errors and response
1551
- *
1552
- * @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*}
1553
- */
1554
- SecurityApi.prototype.reloadHttpCertificates = function securityReloadHttpCertificatesApi(
1555
- params,
1556
- options,
1557
- callback
1558
- ) {
1559
- [params, options, callback] = normalizeArguments(params, options, callback);
1560
-
1561
- let { method, body, ...querystring } = params;
1562
-
1563
- let path = ['', '_plugins', '_security', 'api', 'ssl', 'http', 'reloadcerts']
1564
- .filter((c) => c != null)
1565
- .join('/');
1566
- method = method || 'PUT';
1567
- body = body || '';
1568
- querystring = snakeCaseKeys(null, snakeCase, querystring);
1569
-
1570
- return this.transport.request({ method, path, body, querystring }, options, callback);
1571
- };
1572
-
1573
- /**
1574
- * Reload transport layer communication certificates.
1575
- * <br/> See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#reload-transport-certificates - Security - Reload Transport Certificates}
1576
- *
1577
- * @memberOf API-Security
1578
- *
1579
- * @param {Object} params
1580
- *
1581
- * @param {Object} options - Options for {@link Transport#request}
1582
- * @param {function} callback - Callback that handles errors and response
1583
- *
1584
- * @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*}
1585
- */
1586
- SecurityApi.prototype.reloadTransportCertificates = function securityReloadTransportCertificatesApi(
1587
- params,
1588
- options,
1589
- callback
1590
- ) {
1591
- [params, options, callback] = normalizeArguments(params, options, callback);
1592
-
1593
- let { method, body, ...querystring } = params;
1594
-
1595
- let path = ['', '_plugins', '_security', 'api', 'ssl', 'transport', 'reloadcerts']
1596
- .filter((c) => c != null)
1597
- .join('/');
1598
- method = method || 'PUT';
1599
- body = body || '';
1600
- querystring = snakeCaseKeys(null, snakeCase, querystring);
1601
-
1602
- return this.transport.request({ method, path, body, querystring }, options, callback);
1603
- };
1604
-
1605
- /**
1606
- * Updates the audit configuration.
1607
- * <br/> See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#audit-logs - Security - Update Audit Configuration}
1608
- *
1609
- * @memberOf API-Security
1610
- *
1611
- * @param {Object} params
1612
- * @param {Object} params.body
1613
- *
1614
- * @param {Object} options - Options for {@link Transport#request}
1615
- * @param {function} callback - Callback that handles errors and response
1616
- *
1617
- * @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*}
1618
- */
1619
- SecurityApi.prototype.updateAuditConfiguration = function securityUpdateAuditConfigurationApi(
1620
- params,
1621
- options,
1622
- callback
1623
- ) {
1624
- [params, options, callback] = normalizeArguments(params, options, callback);
1625
-
1626
- if (params.body == null) {
1627
- const err = new this[kConfigurationError]('Missing required parameter: body');
1628
- return handleError(err, callback);
1629
- }
1630
-
1631
- let { method, body, ...querystring } = params;
1632
-
1633
- let path = ['', '_plugins', '_security', 'api', 'audit', 'config']
1634
- .filter((c) => c != null)
1635
- .join('/');
1636
- method = method || 'PUT';
1637
- body = body || '';
1638
- querystring = snakeCaseKeys(null, snakeCase, querystring);
1639
-
1640
- return this.transport.request({ method, path, body, querystring }, options, callback);
1641
- };
1642
-
1643
- /**
1644
- * Adds or updates the existing configuration using the REST API.
1645
- * <br/> See Also: {@link https://opensearch.org/docs/2.7/security/access-control/api/#update-configuration - Security - Update Configuration}
1646
- *
1647
- * @memberOf API-Security
1648
- *
1649
- * @param {Object} params
1650
- * @param {Object} params.body
1651
- *
1652
- * @param {Object} options - Options for {@link Transport#request}
1653
- * @param {function} callback - Callback that handles errors and response
1654
- *
1655
- * @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*}
1656
- */
1657
- SecurityApi.prototype.updateConfiguration = function securityUpdateConfigurationApi(
1658
- params,
1659
- options,
1660
- callback
1661
- ) {
1662
- [params, options, callback] = normalizeArguments(params, options, callback);
1663
-
1664
- if (params.body == null) {
1665
- const err = new this[kConfigurationError]('Missing required parameter: body');
1666
- return handleError(err, callback);
1667
- }
1668
-
1669
- let { method, body, ...querystring } = params;
1670
-
1671
- let path = ['', '_plugins', '_security', 'api', 'securityconfig', 'config']
1672
- .filter((c) => c != null)
1673
- .join('/');
1674
- method = method || 'PUT';
1675
- body = body || '';
1676
- querystring = snakeCaseKeys(null, snakeCase, querystring);
1677
-
1678
- return this.transport.request({ method, path, body, querystring }, options, callback);
1679
- };
1680
-
1681
- /**
1682
- * Adds or updates the specified distinguished names in the cluster’s or node’s allow list.
1683
- * <br/> See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#update-distinguished-names - Security - Update Distinguished Names}
1684
- *
1685
- * @memberOf API-Security
1686
- *
1687
- * @param {Object} params
1688
- * @param {string} params.cluster_name
1689
- * @param {Object} [params.body]
1690
- *
1691
- * @param {Object} options - Options for {@link Transport#request}
1692
- * @param {function} callback - Callback that handles errors and response
1693
- *
1694
- * @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*}
1695
- */
1696
- SecurityApi.prototype.updateDistinguishedNames = function securityUpdateDistinguishedNamesApi(
1697
- params,
1698
- options,
1699
- callback
1700
- ) {
1701
- [params, options, callback] = normalizeArguments(params, options, callback);
1702
-
1703
- if (params.clusterName == null && params.cluster_name == null) {
1704
- const err = new this[kConfigurationError]('Missing required parameter: cluster_name');
1705
- return handleError(err, callback);
1706
- }
1707
-
1708
- let { method, body, clusterName, cluster_name, ...querystring } = params;
1709
-
1710
- cluster_name = encodePathParam(clusterName, cluster_name);
1711
-
1712
- let path = ['', '_plugins', '_security', 'api', 'nodesdn', cluster_name]
1713
- .filter((c) => c != null)
1714
- .join('/');
1715
- method = method || 'PUT';
1716
- body = body || '';
1717
- querystring = snakeCaseKeys(null, snakeCase, querystring);
1718
-
1719
- return this.transport.request({ method, path, body, querystring }, options, callback);
1720
- };
1721
-
1722
- Object.defineProperties(SecurityApi.prototype, {
1723
- change_password: {
1724
- get() {
1725
- return this.changePassword;
1726
- },
1727
- },
1728
- create_action_group: {
1729
- get() {
1730
- return this.createActionGroup;
1731
- },
1732
- },
1733
- create_role: {
1734
- get() {
1735
- return this.createRole;
1736
- },
1737
- },
1738
- create_role_mapping: {
1739
- get() {
1740
- return this.createRoleMapping;
1741
- },
1742
- },
1743
- create_tenant: {
1744
- get() {
1745
- return this.createTenant;
1746
- },
1747
- },
1748
- create_user: {
1749
- get() {
1750
- return this.createUser;
1751
- },
1752
- },
1753
- delete_action_group: {
1754
- get() {
1755
- return this.deleteActionGroup;
1756
- },
1757
- },
1758
- delete_distinguished_names: {
1759
- get() {
1760
- return this.deleteDistinguishedNames;
1761
- },
1762
- },
1763
- delete_role: {
1764
- get() {
1765
- return this.deleteRole;
1766
- },
1767
- },
1768
- delete_role_mapping: {
1769
- get() {
1770
- return this.deleteRoleMapping;
1771
- },
1772
- },
1773
- delete_tenant: {
1774
- get() {
1775
- return this.deleteTenant;
1776
- },
1777
- },
1778
- delete_user: {
1779
- get() {
1780
- return this.deleteUser;
1781
- },
1782
- },
1783
- flush_cache: {
1784
- get() {
1785
- return this.flushCache;
1786
- },
1787
- },
1788
- get_account_details: {
1789
- get() {
1790
- return this.getAccountDetails;
1791
- },
1792
- },
1793
- get_action_group: {
1794
- get() {
1795
- return this.getActionGroup;
1796
- },
1797
- },
1798
- get_action_groups: {
1799
- get() {
1800
- return this.getActionGroups;
1801
- },
1802
- },
1803
- get_audit_configuration: {
1804
- get() {
1805
- return this.getAuditConfiguration;
1806
- },
1807
- },
1808
- get_certificates: {
1809
- get() {
1810
- return this.getCertificates;
1811
- },
1812
- },
1813
- get_configuration: {
1814
- get() {
1815
- return this.getConfiguration;
1816
- },
1817
- },
1818
- get_distinguished_names: {
1819
- get() {
1820
- return this.getDistinguishedNames;
1821
- },
1822
- },
1823
- get_role: {
1824
- get() {
1825
- return this.getRole;
1826
- },
1827
- },
1828
- get_role_mapping: {
1829
- get() {
1830
- return this.getRoleMapping;
1831
- },
1832
- },
1833
- get_role_mappings: {
1834
- get() {
1835
- return this.getRoleMappings;
1836
- },
1837
- },
1838
- get_roles: {
1839
- get() {
1840
- return this.getRoles;
1841
- },
1842
- },
1843
- get_tenant: {
1844
- get() {
1845
- return this.getTenant;
1846
- },
1847
- },
1848
- get_tenants: {
1849
- get() {
1850
- return this.getTenants;
1851
- },
1852
- },
1853
- get_user: {
1854
- get() {
1855
- return this.getUser;
1856
- },
1857
- },
1858
- get_users: {
1859
- get() {
1860
- return this.getUsers;
1861
- },
1862
- },
1863
- patch_action_group: {
1864
- get() {
1865
- return this.patchActionGroup;
1866
- },
1867
- },
1868
- patch_action_groups: {
1869
- get() {
1870
- return this.patchActionGroups;
1871
- },
1872
- },
1873
- patch_audit_configuration: {
1874
- get() {
1875
- return this.patchAuditConfiguration;
1876
- },
1877
- },
1878
- patch_configuration: {
1879
- get() {
1880
- return this.patchConfiguration;
1881
- },
1882
- },
1883
- patch_distinguished_names: {
1884
- get() {
1885
- return this.patchDistinguishedNames;
1886
- },
1887
- },
1888
- patch_role: {
1889
- get() {
1890
- return this.patchRole;
1891
- },
1892
- },
1893
- patch_role_mapping: {
1894
- get() {
1895
- return this.patchRoleMapping;
1896
- },
1897
- },
1898
- patch_role_mappings: {
1899
- get() {
1900
- return this.patchRoleMappings;
1901
- },
1902
- },
1903
- patch_roles: {
1904
- get() {
1905
- return this.patchRoles;
1906
- },
1907
- },
1908
- patch_tenant: {
1909
- get() {
1910
- return this.patchTenant;
1911
- },
1912
- },
1913
- patch_tenants: {
1914
- get() {
1915
- return this.patchTenants;
1916
- },
1917
- },
1918
- patch_user: {
1919
- get() {
1920
- return this.patchUser;
1921
- },
1922
- },
1923
- patch_users: {
1924
- get() {
1925
- return this.patchUsers;
1926
- },
1927
- },
1928
- reload_http_certificates: {
1929
- get() {
1930
- return this.reloadHttpCertificates;
1931
- },
1932
- },
1933
- reload_transport_certificates: {
1934
- get() {
1935
- return this.reloadTransportCertificates;
1936
- },
1937
- },
1938
- update_audit_configuration: {
1939
- get() {
1940
- return this.updateAuditConfiguration;
1941
- },
1942
- },
1943
- update_configuration: {
1944
- get() {
1945
- return this.updateConfiguration;
1946
- },
1947
- },
1948
- update_distinguished_names: {
1949
- get() {
1950
- return this.updateDistinguishedNames;
1951
- },
1952
- },
1953
- });
1954
- module.exports = SecurityApi;