elasticsearch-api 7.17.11 → 9.0.2
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.
- checksums.yaml +4 -4
- data/README.md +17 -163
- data/elasticsearch-api.gemspec +19 -33
- data/lib/elasticsearch/api/actions/async_search/delete.rb +63 -0
- data/lib/elasticsearch/api/actions/async_search/get.rb +71 -0
- data/lib/elasticsearch/api/actions/async_search/status.rb +66 -0
- data/lib/elasticsearch/api/actions/async_search/submit.rb +113 -0
- data/lib/elasticsearch/api/actions/bulk.rb +135 -49
- data/lib/elasticsearch/api/actions/cat/aliases.rb +41 -31
- data/lib/elasticsearch/api/actions/cat/allocation.rb +40 -33
- data/lib/elasticsearch/api/actions/cat/component_templates.rb +82 -0
- data/lib/elasticsearch/api/actions/cat/count.rb +38 -27
- data/lib/elasticsearch/api/actions/cat/fielddata.rb +36 -29
- data/lib/elasticsearch/api/actions/cat/health.rb +36 -29
- data/lib/elasticsearch/api/actions/cat/help.rb +16 -18
- data/lib/elasticsearch/api/actions/cat/indices.rb +51 -43
- data/lib/elasticsearch/api/actions/cat/master.rb +31 -28
- data/lib/elasticsearch/api/actions/cat/ml_data_frame_analytics.rb +77 -0
- data/lib/elasticsearch/api/actions/cat/ml_datafeeds.rb +84 -0
- data/lib/elasticsearch/api/actions/cat/ml_jobs.rb +85 -0
- data/lib/elasticsearch/api/actions/cat/ml_trained_models.rb +80 -0
- data/lib/elasticsearch/api/actions/cat/nodeattrs.rb +31 -28
- data/lib/elasticsearch/api/actions/cat/nodes.rb +32 -37
- data/lib/elasticsearch/api/actions/cat/pending_tasks.rb +33 -31
- data/lib/elasticsearch/api/actions/cat/plugins.rb +31 -29
- data/lib/elasticsearch/api/actions/cat/recovery.rb +41 -36
- data/lib/elasticsearch/api/actions/cat/repositories.rb +31 -28
- data/lib/elasticsearch/api/actions/cat/segments.rb +42 -28
- data/lib/elasticsearch/api/actions/cat/shards.rb +40 -35
- data/lib/elasticsearch/api/actions/cat/snapshots.rb +40 -32
- data/lib/elasticsearch/api/actions/cat/tasks.rb +38 -34
- data/lib/elasticsearch/api/actions/cat/templates.rb +40 -30
- data/lib/elasticsearch/api/actions/cat/thread_pool.rb +42 -34
- data/lib/elasticsearch/api/actions/cat/transforms.rb +80 -0
- data/lib/elasticsearch/api/actions/clear_scroll.rb +28 -14
- data/lib/elasticsearch/api/actions/close_point_in_time.rb +19 -8
- data/lib/elasticsearch/api/actions/cluster/allocation_explain.rb +24 -20
- data/lib/elasticsearch/api/actions/cluster/delete_component_template.rb +26 -19
- data/lib/elasticsearch/api/actions/cluster/delete_voting_config_exclusions.rb +23 -16
- data/lib/elasticsearch/api/actions/cluster/exists_component_template.rb +29 -20
- data/lib/elasticsearch/api/actions/cluster/get_component_template.rb +30 -20
- data/lib/elasticsearch/api/actions/cluster/get_settings.rb +22 -22
- data/lib/elasticsearch/api/actions/cluster/health.rb +40 -38
- data/lib/elasticsearch/api/actions/cluster/info.rb +61 -0
- data/lib/elasticsearch/api/actions/cluster/pending_tasks.rb +23 -19
- data/lib/elasticsearch/api/actions/cluster/post_voting_config_exclusions.rb +38 -20
- data/lib/elasticsearch/api/actions/cluster/put_component_template.rb +42 -22
- data/lib/elasticsearch/api/actions/cluster/put_settings.rb +31 -20
- data/lib/elasticsearch/api/actions/cluster/remote_info.rb +16 -7
- data/lib/elasticsearch/api/actions/cluster/reroute.rb +32 -27
- data/lib/elasticsearch/api/actions/cluster/state.rb +43 -32
- data/lib/elasticsearch/api/actions/cluster/stats.rb +27 -20
- data/lib/elasticsearch/api/actions/connector/check_in.rb +65 -0
- data/lib/elasticsearch/api/actions/connector/delete.rb +70 -0
- data/lib/elasticsearch/api/actions/connector/get.rb +66 -0
- data/lib/elasticsearch/api/actions/connector/list.rb +62 -0
- data/lib/elasticsearch/api/actions/connector/post.rb +58 -0
- data/lib/elasticsearch/api/actions/connector/put.rb +67 -0
- data/lib/elasticsearch/api/actions/connector/sync_job_cancel.rb +69 -0
- data/lib/elasticsearch/api/actions/connector/sync_job_check_in.rb +70 -0
- data/lib/elasticsearch/api/actions/connector/sync_job_claim.rb +76 -0
- data/lib/elasticsearch/api/actions/connector/sync_job_delete.rb +69 -0
- data/lib/elasticsearch/api/actions/connector/sync_job_error.rb +73 -0
- data/lib/elasticsearch/api/actions/connector/sync_job_get.rb +67 -0
- data/lib/elasticsearch/api/actions/connector/sync_job_list.rb +60 -0
- data/lib/elasticsearch/api/actions/connector/sync_job_post.rb +58 -0
- data/lib/elasticsearch/api/actions/connector/sync_job_update_stats.rb +75 -0
- data/lib/elasticsearch/api/actions/connector/update_active_filtering.rb +65 -0
- data/lib/elasticsearch/api/actions/connector/update_api_key_id.rb +70 -0
- data/lib/elasticsearch/api/actions/connector/update_configuration.rb +67 -0
- data/lib/elasticsearch/api/actions/connector/update_error.rb +69 -0
- data/lib/elasticsearch/api/actions/connector/update_features.rb +76 -0
- data/lib/elasticsearch/api/actions/connector/update_filtering.rb +69 -0
- data/lib/elasticsearch/api/actions/connector/update_filtering_validation.rb +67 -0
- data/lib/elasticsearch/api/actions/connector/update_index_name.rb +67 -0
- data/lib/elasticsearch/api/actions/connector/update_name.rb +66 -0
- data/lib/elasticsearch/api/actions/connector/update_native.rb +66 -0
- data/lib/elasticsearch/api/actions/connector/update_pipeline.rb +67 -0
- data/lib/elasticsearch/api/actions/connector/update_scheduling.rb +66 -0
- data/lib/elasticsearch/api/actions/connector/update_service_type.rb +66 -0
- data/lib/elasticsearch/api/actions/connector/update_status.rb +66 -0
- data/lib/elasticsearch/api/actions/count.rb +63 -57
- data/lib/elasticsearch/api/actions/create.rb +117 -25
- data/lib/elasticsearch/api/actions/cross_cluster_replication/delete_auto_follow_pattern.rb +64 -0
- data/lib/elasticsearch/api/actions/cross_cluster_replication/follow.rb +69 -0
- data/lib/elasticsearch/api/actions/cross_cluster_replication/follow_info.rb +65 -0
- data/lib/elasticsearch/api/actions/cross_cluster_replication/follow_stats.rb +64 -0
- data/lib/elasticsearch/api/actions/cross_cluster_replication/forget_follower.rb +72 -0
- data/lib/elasticsearch/api/actions/cross_cluster_replication/get_auto_follow_pattern.rb +67 -0
- data/lib/elasticsearch/api/actions/cross_cluster_replication/pause_auto_follow_pattern.rb +69 -0
- data/lib/elasticsearch/api/actions/cross_cluster_replication/pause_follow.rb +67 -0
- data/lib/elasticsearch/api/actions/cross_cluster_replication/put_auto_follow_pattern.rb +68 -0
- data/lib/elasticsearch/api/actions/cross_cluster_replication/resume_auto_follow_pattern.rb +66 -0
- data/lib/elasticsearch/api/actions/cross_cluster_replication/resume_follow.rb +66 -0
- data/lib/elasticsearch/api/actions/cross_cluster_replication/stats.rb +55 -0
- data/lib/elasticsearch/api/actions/cross_cluster_replication/unfollow.rb +66 -0
- data/lib/elasticsearch/api/actions/dangling_indices/delete_dangling_index.rb +25 -20
- data/lib/elasticsearch/api/actions/dangling_indices/import_dangling_index.rb +26 -20
- data/lib/elasticsearch/api/actions/dangling_indices/list_dangling_indices.rb +17 -7
- data/lib/elasticsearch/api/actions/delete.rb +66 -45
- data/lib/elasticsearch/api/actions/delete_by_query.rb +133 -88
- data/lib/elasticsearch/api/actions/delete_by_query_rethrottle.rb +25 -17
- data/lib/elasticsearch/api/actions/delete_script.rb +28 -19
- data/lib/elasticsearch/api/actions/enrich/delete_policy.rb +62 -0
- data/lib/elasticsearch/api/actions/enrich/execute_policy.rb +63 -0
- data/lib/elasticsearch/api/actions/enrich/get_policy.rb +65 -0
- data/lib/elasticsearch/api/actions/enrich/put_policy.rb +64 -0
- data/lib/elasticsearch/api/actions/enrich/stats.rb +52 -0
- data/lib/elasticsearch/api/actions/eql/delete.rb +64 -0
- data/lib/elasticsearch/api/actions/eql/get.rb +65 -0
- data/lib/elasticsearch/api/actions/eql/get_status.rb +61 -0
- data/lib/elasticsearch/api/actions/eql/search.rb +73 -0
- data/lib/elasticsearch/api/actions/esql/async_query.rb +70 -0
- data/lib/elasticsearch/api/actions/esql/async_query_delete.rb +67 -0
- data/lib/elasticsearch/api/actions/esql/async_query_get.rb +72 -0
- data/lib/elasticsearch/api/actions/esql/async_query_stop.rb +66 -0
- data/lib/elasticsearch/api/actions/esql/query.rb +61 -0
- data/lib/elasticsearch/api/actions/exists.rb +58 -51
- data/lib/elasticsearch/api/actions/exists_source.rb +42 -47
- data/lib/elasticsearch/api/actions/explain.rb +50 -54
- data/lib/elasticsearch/api/actions/features/get_features.rb +23 -16
- data/lib/elasticsearch/api/actions/features/reset_features.rb +26 -8
- data/lib/elasticsearch/api/actions/field_caps.rb +40 -28
- data/lib/elasticsearch/api/actions/fleet/global_checkpoints.rb +70 -0
- data/lib/elasticsearch/api/actions/fleet/msearch.rb +110 -0
- data/lib/elasticsearch/api/actions/fleet/search.rb +119 -0
- data/lib/elasticsearch/api/actions/get.rb +94 -49
- data/lib/elasticsearch/api/actions/get_script.rb +25 -17
- data/lib/elasticsearch/api/actions/get_script_context.rb +15 -7
- data/lib/elasticsearch/api/actions/get_script_languages.rb +15 -7
- data/lib/elasticsearch/api/actions/get_source.rb +44 -46
- data/lib/elasticsearch/api/actions/graph/explore.rb +75 -0
- data/lib/elasticsearch/api/actions/health_report.rb +75 -0
- data/lib/elasticsearch/api/actions/index.rb +138 -53
- data/lib/elasticsearch/api/actions/index_lifecycle_management/delete_lifecycle.rb +63 -0
- data/lib/elasticsearch/api/actions/index_lifecycle_management/explain_lifecycle.rb +67 -0
- data/lib/elasticsearch/api/actions/index_lifecycle_management/get_lifecycle.rb +64 -0
- data/lib/elasticsearch/api/actions/index_lifecycle_management/get_status.rb +51 -0
- data/lib/elasticsearch/api/actions/index_lifecycle_management/migrate_to_data_tiers.rb +66 -0
- data/lib/elasticsearch/api/actions/index_lifecycle_management/move_to_step.rb +71 -0
- data/lib/elasticsearch/api/actions/index_lifecycle_management/put_lifecycle.rb +65 -0
- data/lib/elasticsearch/api/actions/index_lifecycle_management/remove_policy.rb +62 -0
- data/lib/elasticsearch/api/actions/index_lifecycle_management/retry.rb +63 -0
- data/lib/elasticsearch/api/actions/index_lifecycle_management/start.rb +55 -0
- data/lib/elasticsearch/api/actions/index_lifecycle_management/stop.rb +56 -0
- data/lib/elasticsearch/api/actions/indices/add_block.rb +40 -26
- data/lib/elasticsearch/api/actions/indices/analyze.rb +31 -19
- data/lib/elasticsearch/api/actions/indices/cancel_migrate_reindex.rb +65 -0
- data/lib/elasticsearch/api/actions/indices/clear_cache.rb +41 -31
- data/lib/elasticsearch/api/actions/indices/clone.rb +59 -23
- data/lib/elasticsearch/api/actions/indices/close.rb +47 -27
- data/lib/elasticsearch/api/actions/indices/create.rb +43 -24
- data/lib/elasticsearch/api/actions/indices/create_data_stream.rb +68 -0
- data/lib/elasticsearch/api/actions/indices/create_from.rb +71 -0
- data/lib/elasticsearch/api/actions/indices/data_streams_stats.rb +67 -0
- data/lib/elasticsearch/api/actions/indices/delete.rb +45 -26
- data/lib/elasticsearch/api/actions/indices/delete_alias.rb +29 -22
- data/lib/elasticsearch/api/actions/indices/delete_data_lifecycle.rb +64 -0
- data/lib/elasticsearch/api/actions/indices/delete_data_stream.rb +63 -0
- data/lib/elasticsearch/api/actions/indices/delete_index_template.rb +26 -23
- data/lib/elasticsearch/api/actions/indices/delete_template.rb +31 -20
- data/lib/elasticsearch/api/actions/indices/disk_usage.rb +39 -25
- data/lib/elasticsearch/api/actions/indices/downsample.rb +76 -0
- data/lib/elasticsearch/api/actions/indices/exists.rb +32 -30
- data/lib/elasticsearch/api/actions/indices/exists_alias.rb +34 -28
- data/lib/elasticsearch/api/actions/indices/exists_index_template.rb +26 -25
- data/lib/elasticsearch/api/actions/indices/exists_template.rb +30 -24
- data/lib/elasticsearch/api/actions/indices/explain_data_lifecycle.rb +63 -0
- data/lib/elasticsearch/api/actions/indices/field_usage_stats.rb +34 -23
- data/lib/elasticsearch/api/actions/indices/flush.rb +42 -26
- data/lib/elasticsearch/api/actions/indices/forcemerge.rb +64 -25
- data/lib/elasticsearch/api/actions/indices/get.rb +36 -31
- data/lib/elasticsearch/api/actions/indices/get_alias.rb +39 -27
- data/lib/elasticsearch/api/actions/indices/get_data_lifecycle.rb +68 -0
- data/lib/elasticsearch/api/actions/indices/get_data_lifecycle_stats.rb +51 -0
- data/lib/elasticsearch/api/actions/indices/get_data_stream.rb +69 -0
- data/lib/elasticsearch/api/actions/indices/get_field_mapping.rb +42 -44
- data/lib/elasticsearch/api/actions/indices/get_index_template.rb +27 -22
- data/lib/elasticsearch/api/actions/indices/get_mapping.rb +36 -41
- data/lib/elasticsearch/api/actions/indices/get_migrate_reindex_status.rb +65 -0
- data/lib/elasticsearch/api/actions/indices/get_settings.rb +45 -33
- data/lib/elasticsearch/api/actions/indices/get_template.rb +30 -24
- data/lib/elasticsearch/api/actions/indices/migrate_reindex.rb +60 -0
- data/lib/elasticsearch/api/actions/indices/migrate_to_data_stream.rb +72 -0
- data/lib/elasticsearch/api/actions/indices/modify_data_stream.rb +54 -0
- data/lib/elasticsearch/api/actions/indices/open.rb +54 -27
- data/lib/elasticsearch/api/actions/indices/promote_data_stream.rb +69 -0
- data/lib/elasticsearch/api/actions/indices/put_alias.rb +32 -23
- data/lib/elasticsearch/api/actions/indices/put_data_lifecycle.rb +72 -0
- data/lib/elasticsearch/api/actions/indices/put_index_template.rb +45 -21
- data/lib/elasticsearch/api/actions/indices/put_mapping.rb +54 -44
- data/lib/elasticsearch/api/actions/indices/put_settings.rb +58 -31
- data/lib/elasticsearch/api/actions/indices/put_template.rb +43 -24
- data/lib/elasticsearch/api/actions/indices/recovery.rb +42 -20
- data/lib/elasticsearch/api/actions/indices/refresh.rb +40 -22
- data/lib/elasticsearch/api/actions/indices/reload_search_analyzers.rb +74 -0
- data/lib/elasticsearch/api/actions/indices/resolve_cluster.rb +115 -0
- data/lib/elasticsearch/api/actions/indices/resolve_index.rb +32 -17
- data/lib/elasticsearch/api/actions/indices/rollover.rb +60 -29
- data/lib/elasticsearch/api/actions/indices/segments.rb +33 -24
- data/lib/elasticsearch/api/actions/indices/shard_stores.rb +37 -24
- data/lib/elasticsearch/api/actions/indices/shrink.rb +51 -25
- data/lib/elasticsearch/api/actions/indices/simulate_index_template.rb +25 -21
- data/lib/elasticsearch/api/actions/indices/simulate_template.rb +28 -22
- data/lib/elasticsearch/api/actions/indices/split.rb +52 -25
- data/lib/elasticsearch/api/actions/indices/stats.rb +53 -58
- data/lib/elasticsearch/api/actions/indices/update_aliases.rb +21 -19
- data/lib/elasticsearch/api/actions/indices/validate_query.rb +46 -53
- data/lib/elasticsearch/api/actions/inference/chat_completion_unified.rb +63 -0
- data/lib/elasticsearch/api/actions/inference/completion.rb +62 -0
- data/lib/elasticsearch/api/actions/inference/delete.rb +69 -0
- data/lib/elasticsearch/api/actions/inference/get.rb +67 -0
- data/lib/elasticsearch/api/actions/inference/inference.rb +73 -0
- data/lib/elasticsearch/api/actions/inference/put.rb +77 -0
- data/lib/elasticsearch/api/actions/inference/put_alibabacloud.rb +75 -0
- data/lib/elasticsearch/api/actions/inference/put_amazonbedrock.rb +70 -0
- data/lib/elasticsearch/api/actions/inference/put_anthropic.rb +76 -0
- data/lib/elasticsearch/api/actions/inference/put_azureaistudio.rb +75 -0
- data/lib/elasticsearch/api/actions/inference/put_azureopenai.rb +80 -0
- data/lib/elasticsearch/api/actions/inference/put_cohere.rb +75 -0
- data/lib/elasticsearch/api/actions/inference/put_elasticsearch.rb +71 -0
- data/lib/elasticsearch/api/actions/inference/put_elser.rb +67 -0
- data/lib/elasticsearch/api/actions/inference/put_googleaistudio.rb +75 -0
- data/lib/elasticsearch/api/actions/inference/put_googlevertexai.rb +75 -0
- data/lib/elasticsearch/api/actions/inference/put_hugging_face.rb +86 -0
- data/lib/elasticsearch/api/actions/inference/put_jinaai.rb +77 -0
- data/lib/elasticsearch/api/actions/inference/put_mistral.rb +76 -0
- data/lib/elasticsearch/api/actions/inference/put_openai.rb +76 -0
- data/lib/elasticsearch/api/actions/inference/put_voyageai.rb +71 -0
- data/lib/elasticsearch/api/actions/inference/put_watsonx.rb +78 -0
- data/lib/elasticsearch/api/actions/inference/rerank.rb +62 -0
- data/lib/elasticsearch/api/actions/inference/sparse_embedding.rb +62 -0
- data/lib/elasticsearch/api/actions/inference/stream_completion.rb +65 -0
- data/lib/elasticsearch/api/actions/inference/text_embedding.rb +62 -0
- data/lib/elasticsearch/api/actions/inference/update.rb +73 -0
- data/lib/elasticsearch/api/actions/info.rb +15 -7
- data/lib/elasticsearch/api/actions/ingest/delete_geoip_database.rb +64 -0
- data/lib/elasticsearch/api/actions/ingest/delete_ip_location_database.rb +66 -0
- data/lib/elasticsearch/api/actions/ingest/delete_pipeline.rb +27 -19
- data/lib/elasticsearch/api/actions/ingest/geo_ip_stats.rb +15 -7
- data/lib/elasticsearch/api/actions/ingest/get_geoip_database.rb +65 -0
- data/lib/elasticsearch/api/actions/ingest/get_ip_location_database.rb +67 -0
- data/lib/elasticsearch/api/actions/ingest/get_pipeline.rb +28 -19
- data/lib/elasticsearch/api/actions/ingest/processor_grok.rb +17 -7
- data/lib/elasticsearch/api/actions/ingest/put_geoip_database.rb +66 -0
- data/lib/elasticsearch/api/actions/ingest/put_ip_location_database.rb +68 -0
- data/lib/elasticsearch/api/actions/ingest/put_pipeline.rb +25 -21
- data/lib/elasticsearch/api/actions/ingest/simulate.rb +27 -19
- data/lib/elasticsearch/api/actions/license/delete.rb +54 -0
- data/lib/elasticsearch/api/actions/license/get.rb +54 -0
- data/lib/elasticsearch/api/actions/{shutdown/get_node.rb → license/get_basic_status.rb} +15 -15
- data/lib/elasticsearch/api/actions/{shutdown/delete_node.rb → license/get_trial_status.rb} +16 -14
- data/lib/elasticsearch/api/actions/license/post.rb +60 -0
- data/lib/elasticsearch/api/actions/license/post_start_basic.rb +58 -0
- data/lib/elasticsearch/api/actions/license/post_start_trial.rb +57 -0
- data/lib/elasticsearch/api/actions/logstash/delete_pipeline.rb +62 -0
- data/lib/elasticsearch/api/actions/logstash/get_pipeline.rb +63 -0
- data/lib/elasticsearch/api/actions/logstash/put_pipeline.rb +64 -0
- data/lib/elasticsearch/api/actions/machine_learning/clear_trained_model_deployment_cache.rb +64 -0
- data/lib/elasticsearch/api/actions/machine_learning/close_job.rb +70 -0
- data/lib/elasticsearch/api/actions/machine_learning/delete_calendar.rb +61 -0
- data/lib/elasticsearch/api/actions/machine_learning/delete_calendar_event.rb +65 -0
- data/lib/elasticsearch/api/actions/machine_learning/delete_calendar_job.rb +65 -0
- data/lib/elasticsearch/api/actions/machine_learning/delete_data_frame_analytics.rb +62 -0
- data/lib/elasticsearch/api/actions/machine_learning/delete_datafeed.rb +65 -0
- data/lib/elasticsearch/api/actions/machine_learning/delete_expired_data.rb +75 -0
- data/lib/elasticsearch/api/actions/machine_learning/delete_filter.rb +62 -0
- data/lib/elasticsearch/api/actions/machine_learning/delete_forecast.rb +80 -0
- data/lib/elasticsearch/api/actions/machine_learning/delete_job.rb +73 -0
- data/lib/elasticsearch/api/actions/machine_learning/delete_model_snapshot.rb +67 -0
- data/lib/elasticsearch/api/actions/machine_learning/delete_trained_model.rb +63 -0
- data/lib/elasticsearch/api/actions/machine_learning/delete_trained_model_alias.rb +67 -0
- data/lib/elasticsearch/api/actions/machine_learning/estimate_model_memory.rb +56 -0
- data/lib/elasticsearch/api/actions/machine_learning/evaluate_data_frame.rb +57 -0
- data/lib/elasticsearch/api/actions/machine_learning/explain_data_frame_analytics.rb +76 -0
- data/lib/elasticsearch/api/actions/machine_learning/flush_job.rb +79 -0
- data/lib/elasticsearch/api/actions/machine_learning/forecast.rb +77 -0
- data/lib/elasticsearch/api/actions/machine_learning/get_buckets.rb +86 -0
- data/lib/elasticsearch/api/actions/machine_learning/get_calendar_events.rb +65 -0
- data/lib/elasticsearch/api/actions/machine_learning/get_calendars.rb +70 -0
- data/lib/elasticsearch/api/actions/machine_learning/get_categories.rb +80 -0
- data/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics.rb +81 -0
- data/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics_stats.rb +76 -0
- data/lib/elasticsearch/api/actions/machine_learning/get_datafeed_stats.rb +78 -0
- data/lib/elasticsearch/api/actions/machine_learning/get_datafeeds.rb +80 -0
- data/lib/elasticsearch/api/actions/machine_learning/get_filters.rb +65 -0
- data/lib/elasticsearch/api/actions/machine_learning/get_influencers.rb +83 -0
- data/lib/elasticsearch/api/actions/machine_learning/get_job_stats.rb +73 -0
- data/lib/elasticsearch/api/actions/machine_learning/get_jobs.rb +79 -0
- data/lib/elasticsearch/api/actions/machine_learning/get_memory_stats.rb +69 -0
- data/lib/elasticsearch/api/actions/machine_learning/get_model_snapshot_upgrade_stats.rb +73 -0
- data/lib/elasticsearch/api/actions/machine_learning/get_model_snapshots.rb +82 -0
- data/lib/elasticsearch/api/actions/machine_learning/get_overall_buckets.rb +105 -0
- data/lib/elasticsearch/api/actions/machine_learning/get_records.rb +86 -0
- data/lib/elasticsearch/api/actions/machine_learning/get_trained_models.rb +82 -0
- data/lib/elasticsearch/api/actions/machine_learning/get_trained_models_stats.rb +73 -0
- data/lib/elasticsearch/api/actions/machine_learning/infer_trained_model.rb +63 -0
- data/lib/elasticsearch/api/actions/machine_learning/info.rb +57 -0
- data/lib/elasticsearch/api/actions/machine_learning/open_job.rb +68 -0
- data/lib/elasticsearch/api/actions/machine_learning/post_calendar_events.rb +62 -0
- data/lib/elasticsearch/api/actions/machine_learning/post_data.rb +66 -0
- data/lib/elasticsearch/api/actions/machine_learning/preview_data_frame_analytics.rb +69 -0
- data/lib/elasticsearch/api/actions/machine_learning/preview_datafeed.rb +81 -0
- data/lib/elasticsearch/api/actions/machine_learning/put_calendar.rb +61 -0
- data/lib/elasticsearch/api/actions/machine_learning/put_calendar_job.rb +64 -0
- data/lib/elasticsearch/api/actions/machine_learning/put_data_frame_analytics.rb +69 -0
- data/lib/elasticsearch/api/actions/machine_learning/put_datafeed.rb +80 -0
- data/lib/elasticsearch/api/actions/machine_learning/put_filter.rb +64 -0
- data/lib/elasticsearch/api/actions/machine_learning/put_job.rb +75 -0
- data/lib/elasticsearch/api/actions/machine_learning/put_trained_model.rb +68 -0
- data/lib/elasticsearch/api/actions/machine_learning/put_trained_model_alias.rb +83 -0
- data/lib/elasticsearch/api/actions/machine_learning/put_trained_model_definition_part.rb +67 -0
- data/lib/elasticsearch/api/actions/machine_learning/put_trained_model_vocabulary.rb +64 -0
- data/lib/elasticsearch/api/actions/machine_learning/reset_job.rb +69 -0
- data/lib/elasticsearch/api/actions/machine_learning/revert_model_snapshot.rb +80 -0
- data/lib/elasticsearch/api/actions/machine_learning/set_upgrade_mode.rb +66 -0
- data/lib/elasticsearch/api/actions/machine_learning/start_data_frame_analytics.rb +75 -0
- data/lib/elasticsearch/api/actions/machine_learning/start_datafeed.rb +87 -0
- data/lib/elasticsearch/api/actions/machine_learning/start_trained_model_deployment.rb +83 -0
- data/lib/elasticsearch/api/actions/machine_learning/stop_data_frame_analytics.rb +76 -0
- data/lib/elasticsearch/api/actions/machine_learning/stop_datafeed.rb +74 -0
- data/lib/elasticsearch/api/actions/machine_learning/stop_trained_model_deployment.rb +66 -0
- data/lib/elasticsearch/api/actions/machine_learning/update_data_frame_analytics.rb +64 -0
- data/lib/elasticsearch/api/actions/machine_learning/update_datafeed.rb +79 -0
- data/lib/elasticsearch/api/actions/machine_learning/update_filter.rb +63 -0
- data/lib/elasticsearch/api/actions/machine_learning/update_job.rb +63 -0
- data/lib/elasticsearch/api/actions/machine_learning/update_model_snapshot.rb +67 -0
- data/lib/elasticsearch/api/actions/machine_learning/update_trained_model_deployment.rb +67 -0
- data/lib/elasticsearch/api/actions/machine_learning/upgrade_job_snapshot.rb +76 -0
- data/lib/elasticsearch/api/actions/mget.rb +49 -44
- data/lib/elasticsearch/api/actions/migration/deprecations.rb +65 -0
- data/lib/elasticsearch/api/actions/migration/get_feature_upgrade_status.rb +54 -0
- data/lib/elasticsearch/api/actions/migration/post_feature_upgrade.rb +54 -0
- data/lib/elasticsearch/api/actions/msearch.rb +68 -57
- data/lib/elasticsearch/api/actions/msearch_template.rb +49 -44
- data/lib/elasticsearch/api/actions/mtermvectors.rb +47 -58
- data/lib/elasticsearch/api/actions/nodes/clear_repositories_metering_archive.rb +27 -10
- data/lib/elasticsearch/api/actions/nodes/get_repositories_metering_info.rb +23 -8
- data/lib/elasticsearch/api/actions/nodes/hot_threads.rb +33 -35
- data/lib/elasticsearch/api/actions/nodes/info.rb +28 -23
- data/lib/elasticsearch/api/actions/nodes/reload_secure_settings.rb +31 -19
- data/lib/elasticsearch/api/actions/nodes/stats.rb +39 -40
- data/lib/elasticsearch/api/actions/nodes/usage.rb +28 -21
- data/lib/elasticsearch/api/actions/open_point_in_time.rb +59 -25
- data/lib/elasticsearch/api/actions/ping.rb +16 -12
- data/lib/elasticsearch/api/actions/put_script.rb +33 -23
- data/lib/elasticsearch/api/actions/query_rules/delete_rule.rb +66 -0
- data/lib/elasticsearch/api/actions/query_rules/delete_ruleset.rb +70 -0
- data/lib/elasticsearch/api/actions/query_rules/get_rule.rb +65 -0
- data/lib/elasticsearch/api/actions/query_rules/get_ruleset.rb +61 -0
- data/lib/elasticsearch/api/actions/query_rules/list_rulesets.rb +53 -0
- data/lib/elasticsearch/api/actions/query_rules/put_rule.rb +71 -0
- data/lib/elasticsearch/api/actions/query_rules/put_ruleset.rb +68 -0
- data/lib/elasticsearch/api/actions/query_rules/test.rb +63 -0
- data/lib/elasticsearch/api/actions/rank_eval.rb +30 -25
- data/lib/elasticsearch/api/actions/reindex.rb +165 -33
- data/lib/elasticsearch/api/actions/reindex_rethrottle.rb +31 -17
- data/lib/elasticsearch/api/actions/render_search_template.rb +25 -11
- data/lib/elasticsearch/api/actions/scripts_painless_execute.rb +21 -9
- data/lib/elasticsearch/api/actions/scroll.rb +29 -26
- data/lib/elasticsearch/api/actions/search.rb +148 -116
- data/lib/elasticsearch/api/actions/search_application/delete.rb +65 -0
- data/lib/elasticsearch/api/actions/search_application/delete_behavioral_analytics.rb +65 -0
- data/lib/elasticsearch/api/actions/search_application/get.rb +64 -0
- data/lib/elasticsearch/api/actions/search_application/get_behavioral_analytics.rb +66 -0
- data/lib/elasticsearch/api/actions/search_application/list.rb +58 -0
- data/lib/elasticsearch/api/actions/search_application/post_behavioral_analytics_event.rb +71 -0
- data/lib/elasticsearch/api/actions/search_application/put.rb +67 -0
- data/lib/elasticsearch/api/actions/search_application/put_behavioral_analytics.rb +64 -0
- data/lib/elasticsearch/api/actions/search_application/render_query.rb +69 -0
- data/lib/elasticsearch/api/actions/search_application/search.rb +73 -0
- data/lib/elasticsearch/api/actions/search_mvt.rb +167 -35
- data/lib/elasticsearch/api/actions/search_shards.rb +43 -28
- data/lib/elasticsearch/api/actions/search_template.rb +46 -54
- data/lib/elasticsearch/api/actions/searchable_snapshots/cache_stats.rb +68 -0
- data/lib/elasticsearch/api/actions/searchable_snapshots/clear_cache.rb +71 -0
- data/lib/elasticsearch/api/actions/searchable_snapshots/mount.rb +74 -0
- data/lib/elasticsearch/api/actions/searchable_snapshots/stats.rb +63 -0
- data/lib/elasticsearch/api/actions/security/activate_user_profile.rb +62 -0
- data/lib/elasticsearch/api/actions/security/authenticate.rb +54 -0
- data/lib/elasticsearch/api/actions/security/bulk_delete_role.rb +56 -0
- data/lib/elasticsearch/api/actions/security/bulk_put_role.rb +56 -0
- data/lib/elasticsearch/api/actions/security/bulk_update_api_keys.rb +62 -0
- data/lib/elasticsearch/api/actions/security/change_password.rb +68 -0
- data/lib/elasticsearch/api/actions/security/clear_api_key_cache.rb +64 -0
- data/lib/elasticsearch/api/actions/security/clear_cached_privileges.rb +64 -0
- data/lib/elasticsearch/api/actions/security/clear_cached_realms.rb +69 -0
- data/lib/elasticsearch/api/actions/security/clear_cached_roles.rb +63 -0
- data/lib/elasticsearch/api/actions/security/clear_cached_service_tokens.rb +75 -0
- data/lib/elasticsearch/api/actions/security/create_api_key.rb +62 -0
- data/lib/elasticsearch/api/actions/security/create_cross_cluster_api_key.rb +62 -0
- data/lib/elasticsearch/api/actions/security/create_service_token.rb +78 -0
- data/lib/elasticsearch/api/actions/security/delegate_pki.rb +60 -0
- data/lib/elasticsearch/api/actions/security/delete_privileges.rb +69 -0
- data/lib/elasticsearch/api/actions/security/delete_role.rb +64 -0
- data/lib/elasticsearch/api/actions/security/delete_role_mapping.rb +65 -0
- data/lib/elasticsearch/api/actions/security/delete_service_token.rb +70 -0
- data/lib/elasticsearch/api/actions/security/delete_user.rb +62 -0
- data/lib/elasticsearch/api/actions/security/disable_user.rb +64 -0
- data/lib/elasticsearch/api/actions/security/disable_user_profile.rb +69 -0
- data/lib/elasticsearch/api/actions/security/enable_user.rb +63 -0
- data/lib/elasticsearch/api/actions/security/enable_user_profile.rb +70 -0
- data/lib/elasticsearch/api/actions/security/enroll_kibana.rb +53 -0
- data/lib/elasticsearch/api/actions/security/enroll_node.rb +53 -0
- data/lib/elasticsearch/api/actions/security/get_api_key.rb +70 -0
- data/lib/elasticsearch/api/actions/security/get_builtin_privileges.rb +51 -0
- data/lib/elasticsearch/api/actions/security/get_privileges.rb +73 -0
- data/lib/elasticsearch/api/actions/security/get_role.rb +75 -0
- data/lib/elasticsearch/api/actions/security/get_role_mapping.rb +65 -0
- data/lib/elasticsearch/api/actions/security/get_service_accounts.rb +72 -0
- data/lib/elasticsearch/api/actions/security/get_service_credentials.rb +68 -0
- data/lib/elasticsearch/api/actions/security/get_settings.rb +57 -0
- data/lib/elasticsearch/api/actions/security/get_token.rb +62 -0
- data/lib/elasticsearch/api/actions/security/get_user.rb +72 -0
- data/lib/elasticsearch/api/actions/security/get_user_privileges.rb +57 -0
- data/lib/elasticsearch/api/actions/security/get_user_profile.rb +68 -0
- data/lib/elasticsearch/api/actions/security/grant_api_key.rb +68 -0
- data/lib/elasticsearch/api/actions/security/has_privileges.rb +68 -0
- data/lib/elasticsearch/api/actions/security/has_privileges_user_profile.rb +56 -0
- data/lib/elasticsearch/api/actions/security/invalidate_api_key.rb +63 -0
- data/lib/elasticsearch/api/actions/security/invalidate_token.rb +62 -0
- data/lib/elasticsearch/api/actions/security/oidc_authenticate.rb +56 -0
- data/lib/elasticsearch/api/actions/security/oidc_logout.rb +57 -0
- data/lib/elasticsearch/api/actions/security/oidc_prepare_authentication.rb +57 -0
- data/lib/elasticsearch/api/actions/security/put_privileges.rb +66 -0
- data/lib/elasticsearch/api/actions/security/put_role.rb +66 -0
- data/lib/elasticsearch/api/actions/security/put_role_mapping.rb +81 -0
- data/lib/elasticsearch/api/actions/security/put_user.rb +69 -0
- data/lib/elasticsearch/api/actions/security/query_api_keys.rb +67 -0
- data/lib/elasticsearch/api/actions/security/query_role.rb +61 -0
- data/lib/elasticsearch/api/actions/security/query_user.rb +61 -0
- data/lib/elasticsearch/api/actions/security/saml_authenticate.rb +62 -0
- data/lib/elasticsearch/api/actions/security/saml_complete_logout.rb +61 -0
- data/lib/elasticsearch/api/actions/security/saml_invalidate.rb +60 -0
- data/lib/elasticsearch/api/actions/security/saml_logout.rb +58 -0
- data/lib/elasticsearch/api/actions/security/saml_prepare_authentication.rb +63 -0
- data/lib/elasticsearch/api/actions/security/saml_service_provider_metadata.rb +63 -0
- data/lib/elasticsearch/api/actions/security/suggest_user_profiles.rb +65 -0
- data/lib/elasticsearch/api/actions/security/update_api_key.rb +74 -0
- data/lib/elasticsearch/api/actions/security/update_cross_cluster_api_key.rb +72 -0
- data/lib/elasticsearch/api/actions/security/update_settings.rb +61 -0
- data/lib/elasticsearch/api/actions/security/update_user_profile_data.rb +79 -0
- data/lib/elasticsearch/api/actions/simulate/ingest.rb +85 -0
- data/lib/elasticsearch/api/actions/snapshot/cleanup_repository.rb +28 -19
- data/lib/elasticsearch/api/actions/snapshot/clone.rb +28 -20
- data/lib/elasticsearch/api/actions/snapshot/create.rb +30 -21
- data/lib/elasticsearch/api/actions/snapshot/create_repository.rb +36 -22
- data/lib/elasticsearch/api/actions/snapshot/delete.rb +31 -19
- data/lib/elasticsearch/api/actions/snapshot/delete_repository.rb +35 -20
- data/lib/elasticsearch/api/actions/snapshot/get.rb +58 -41
- data/lib/elasticsearch/api/actions/snapshot/get_repository.rb +33 -21
- data/lib/elasticsearch/api/actions/snapshot/repository_analyze.rb +113 -37
- data/lib/elasticsearch/api/actions/snapshot/restore.rb +40 -21
- data/lib/elasticsearch/api/actions/snapshot/status.rb +48 -23
- data/lib/elasticsearch/api/actions/snapshot/verify_repository.rb +28 -19
- data/lib/elasticsearch/api/actions/snapshot_lifecycle_management/delete_lifecycle.rb +66 -0
- data/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_lifecycle.rb +66 -0
- data/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_retention.rb +56 -0
- data/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_lifecycle.rb +67 -0
- data/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_stats.rb +53 -0
- data/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_status.rb +56 -0
- data/lib/elasticsearch/api/actions/snapshot_lifecycle_management/put_lifecycle.rb +70 -0
- data/lib/elasticsearch/api/actions/snapshot_lifecycle_management/start.rb +58 -0
- data/lib/elasticsearch/api/actions/snapshot_lifecycle_management/stop.rb +62 -0
- data/lib/elasticsearch/api/actions/{shutdown/put_node.rb → sql/clear_cursor.rb} +18 -15
- data/lib/elasticsearch/api/actions/sql/delete_async.rb +65 -0
- data/lib/elasticsearch/api/actions/sql/get_async.rb +71 -0
- data/lib/elasticsearch/api/actions/sql/get_async_status.rb +61 -0
- data/lib/elasticsearch/api/actions/sql/query.rb +57 -0
- data/lib/elasticsearch/api/actions/sql/translate.rb +55 -0
- data/lib/elasticsearch/api/actions/ssl/certificates.rb +60 -0
- data/lib/elasticsearch/api/actions/synonyms/delete_synonym.rb +72 -0
- data/lib/elasticsearch/api/actions/synonyms/delete_synonym_rule.rb +65 -0
- data/lib/elasticsearch/api/actions/synonyms/get_synonym.rb +62 -0
- data/lib/elasticsearch/api/actions/synonyms/get_synonym_rule.rb +65 -0
- data/lib/elasticsearch/api/actions/synonyms/get_synonyms_sets.rb +53 -0
- data/lib/elasticsearch/api/actions/synonyms/put_synonym.rb +66 -0
- data/lib/elasticsearch/api/actions/synonyms/put_synonym_rule.rb +69 -0
- data/lib/elasticsearch/api/actions/tasks/cancel.rb +34 -24
- data/lib/elasticsearch/api/actions/tasks/get.rb +30 -19
- data/lib/elasticsearch/api/actions/tasks/list.rb +80 -28
- data/lib/elasticsearch/api/actions/terms_enum.rb +68 -0
- data/lib/elasticsearch/api/actions/termvectors.rb +69 -59
- data/lib/elasticsearch/api/actions/text_structure/find_field_structure.rb +127 -0
- data/lib/elasticsearch/api/actions/text_structure/find_message_structure.rb +126 -0
- data/lib/elasticsearch/api/actions/text_structure/find_structure.rb +149 -0
- data/lib/elasticsearch/api/actions/text_structure/test_grok_pattern.rb +58 -0
- data/lib/elasticsearch/api/actions/transform/delete_transform.rb +65 -0
- data/lib/elasticsearch/api/actions/transform/get_node_stats.rb +55 -0
- data/lib/elasticsearch/api/actions/transform/get_transform.rb +77 -0
- data/lib/elasticsearch/api/actions/transform/get_transform_stats.rb +73 -0
- data/lib/elasticsearch/api/actions/transform/preview_transform.rb +75 -0
- data/lib/elasticsearch/api/actions/transform/put_transform.rb +86 -0
- data/lib/elasticsearch/api/actions/transform/reset_transform.rb +66 -0
- data/lib/elasticsearch/api/actions/transform/schedule_now_transform.rb +66 -0
- data/lib/elasticsearch/api/actions/transform/start_transform.rb +75 -0
- data/lib/elasticsearch/api/actions/transform/stop_transform.rb +74 -0
- data/lib/elasticsearch/api/actions/transform/update_transform.rb +73 -0
- data/lib/elasticsearch/api/actions/transform/upgrade_transforms.rb +64 -0
- data/lib/elasticsearch/api/actions/update.rb +61 -54
- data/lib/elasticsearch/api/actions/update_by_query.rb +144 -92
- data/lib/elasticsearch/api/actions/update_by_query_rethrottle.rb +25 -17
- data/lib/elasticsearch/api/actions/watcher/ack_watch.rb +74 -0
- data/lib/elasticsearch/api/actions/watcher/activate_watch.rb +61 -0
- data/lib/elasticsearch/api/actions/watcher/deactivate_watch.rb +61 -0
- data/lib/elasticsearch/api/actions/watcher/delete_watch.rb +73 -0
- data/lib/elasticsearch/api/actions/watcher/execute_watch.rb +73 -0
- data/lib/elasticsearch/api/actions/watcher/get_settings.rb +54 -0
- data/lib/elasticsearch/api/actions/watcher/get_watch.rb +60 -0
- data/lib/elasticsearch/api/actions/watcher/put_watch.rb +74 -0
- data/lib/elasticsearch/api/actions/watcher/query_watches.rb +58 -0
- data/lib/elasticsearch/api/actions/watcher/start.rb +52 -0
- data/lib/elasticsearch/api/actions/watcher/stats.rb +65 -0
- data/lib/elasticsearch/api/actions/watcher/stop.rb +54 -0
- data/lib/elasticsearch/api/actions/watcher/update_settings.rb +63 -0
- data/lib/elasticsearch/api/actions/xpack/info.rb +59 -0
- data/lib/elasticsearch/api/actions/xpack/usage.rb +55 -0
- data/lib/elasticsearch/api/response.rb +48 -0
- data/lib/elasticsearch/api/utils.rb +34 -143
- data/lib/elasticsearch/api/version.rb +2 -1
- data/lib/elasticsearch/api.rb +81 -47
- metadata +389 -434
- data/Gemfile +0 -43
- data/Rakefile +0 -124
- data/lib/elasticsearch/api/actions/cat/params_registry.rb +0 -60
- data/lib/elasticsearch/api/actions/cluster/params_registry.rb +0 -60
- data/lib/elasticsearch/api/actions/dangling_indices/params_registry.rb +0 -60
- data/lib/elasticsearch/api/actions/features/params_registry.rb +0 -60
- data/lib/elasticsearch/api/actions/indices/exists_type.rb +0 -71
- data/lib/elasticsearch/api/actions/indices/flush_synced.rb +0 -71
- data/lib/elasticsearch/api/actions/indices/get_upgrade.rb +0 -67
- data/lib/elasticsearch/api/actions/indices/params_registry.rb +0 -60
- data/lib/elasticsearch/api/actions/indices/upgrade.rb +0 -71
- data/lib/elasticsearch/api/actions/ingest/params_registry.rb +0 -60
- data/lib/elasticsearch/api/actions/nodes/params_registry.rb +0 -60
- data/lib/elasticsearch/api/actions/params_registry.rb +0 -58
- data/lib/elasticsearch/api/actions/shutdown/params_registry.rb +0 -60
- data/lib/elasticsearch/api/actions/snapshot/params_registry.rb +0 -60
- data/lib/elasticsearch/api/actions/tasks/params_registry.rb +0 -60
- data/lib/elasticsearch/api/namespace/cat.rb +0 -36
- data/lib/elasticsearch/api/namespace/cluster.rb +0 -37
- data/lib/elasticsearch/api/namespace/common.rb +0 -44
- data/lib/elasticsearch/api/namespace/dangling_indices.rb +0 -35
- data/lib/elasticsearch/api/namespace/features.rb +0 -36
- data/lib/elasticsearch/api/namespace/indices.rb +0 -37
- data/lib/elasticsearch/api/namespace/ingest.rb +0 -37
- data/lib/elasticsearch/api/namespace/nodes.rb +0 -37
- data/lib/elasticsearch/api/namespace/remote.rb +0 -37
- data/lib/elasticsearch/api/namespace/security.rb +0 -36
- data/lib/elasticsearch/api/namespace/shutdown.rb +0 -37
- data/lib/elasticsearch/api/namespace/snapshot.rb +0 -37
- data/lib/elasticsearch/api/namespace/tasks.rb +0 -37
- data/spec/elasticsearch/api/actions/bulk_spec.rb +0 -139
- data/spec/elasticsearch/api/actions/cat/aliases_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/cat/allocation_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/cat/count_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/cat/fielddata_spec.rb +0 -52
- data/spec/elasticsearch/api/actions/cat/health_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/cat/help_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/cat/indices_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/cat/master_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/cat/nodeattrs_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/cat/nodes_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/cat/pending_tasks_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/cat/plugins_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/cat/recovery_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/cat/repositories_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/cat/segments_spec.rb +0 -49
- data/spec/elasticsearch/api/actions/cat/shards_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/cat/snapshot_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/cat/tasks_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/cat/templates_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/cat/thread_pool_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/clear_scroll_spec.rb +0 -52
- data/spec/elasticsearch/api/actions/close_point_in_time_spec.rb +0 -34
- data/spec/elasticsearch/api/actions/cluster/allocation_explain_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/cluster/get_settings_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/cluster/health_spec.rb +0 -69
- data/spec/elasticsearch/api/actions/cluster/pending_tasks_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/cluster/put_settings_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/cluster/remote_info_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/cluster/reroute_spec.rb +0 -52
- data/spec/elasticsearch/api/actions/cluster/state_spec.rb +0 -52
- data/spec/elasticsearch/api/actions/cluster/stats_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/count_spec.rb +0 -66
- data/spec/elasticsearch/api/actions/create_document_spec.rb +0 -86
- data/spec/elasticsearch/api/actions/dangling_indices/delete_dangling_indices_spec.rb +0 -48
- data/spec/elasticsearch/api/actions/dangling_indices/import_dangling_indices_spec.rb +0 -48
- data/spec/elasticsearch/api/actions/dangling_indices/list_dangling_indices_spec.rb +0 -36
- data/spec/elasticsearch/api/actions/delete_by_query_spec.rb +0 -80
- data/spec/elasticsearch/api/actions/delete_document_spec.rb +0 -112
- data/spec/elasticsearch/api/actions/delete_script_spec.rb +0 -37
- data/spec/elasticsearch/api/actions/exists_document_spec.rb +0 -127
- data/spec/elasticsearch/api/actions/explain_document_spec.rb +0 -99
- data/spec/elasticsearch/api/actions/features/get_features_spec.rb +0 -34
- data/spec/elasticsearch/api/actions/features/reset_features_spec.rb +0 -34
- data/spec/elasticsearch/api/actions/field_caps_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/get_document_source_spec.rb +0 -101
- data/spec/elasticsearch/api/actions/get_document_spec.rb +0 -124
- data/spec/elasticsearch/api/actions/get_script_spec.rb +0 -50
- data/spec/elasticsearch/api/actions/hashie_spec.rb +0 -89
- data/spec/elasticsearch/api/actions/index_document_spec.rb +0 -137
- data/spec/elasticsearch/api/actions/indices/add_block_spec.rb +0 -63
- data/spec/elasticsearch/api/actions/indices/analyze_spec.rb +0 -68
- data/spec/elasticsearch/api/actions/indices/clear_cache_spec.rb +0 -80
- data/spec/elasticsearch/api/actions/indices/clone_spec.rb +0 -122
- data/spec/elasticsearch/api/actions/indices/close_spec.rb +0 -85
- data/spec/elasticsearch/api/actions/indices/create_spec.rb +0 -85
- data/spec/elasticsearch/api/actions/indices/delete_alias_spec.rb +0 -83
- data/spec/elasticsearch/api/actions/indices/delete_spec.rb +0 -108
- data/spec/elasticsearch/api/actions/indices/delete_template_spec.rb +0 -86
- data/spec/elasticsearch/api/actions/indices/disk_usage_spec.rb +0 -48
- data/spec/elasticsearch/api/actions/indices/exists_alias_spec.rb +0 -108
- data/spec/elasticsearch/api/actions/indices/exists_spec.rb +0 -108
- data/spec/elasticsearch/api/actions/indices/exists_template_spec.rb +0 -93
- data/spec/elasticsearch/api/actions/indices/exists_type_spec.rb +0 -108
- data/spec/elasticsearch/api/actions/indices/field_usage_stats_spec.rb +0 -46
- data/spec/elasticsearch/api/actions/indices/flush_spec.rb +0 -91
- data/spec/elasticsearch/api/actions/indices/flush_synced_spec.rb +0 -90
- data/spec/elasticsearch/api/actions/indices/forcemerge_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/indices/get_alias_spec.rb +0 -61
- data/spec/elasticsearch/api/actions/indices/get_field_mapping_spec.rb +0 -61
- data/spec/elasticsearch/api/actions/indices/get_mapping_spec.rb +0 -83
- data/spec/elasticsearch/api/actions/indices/get_settings_spec.rb +0 -72
- data/spec/elasticsearch/api/actions/indices/get_spec.rb +0 -54
- data/spec/elasticsearch/api/actions/indices/open_spec.rb +0 -65
- data/spec/elasticsearch/api/actions/indices/put_alias_spec.rb +0 -89
- data/spec/elasticsearch/api/actions/indices/put_mapping_spec.rb +0 -102
- data/spec/elasticsearch/api/actions/indices/put_settings_spec.rb +0 -108
- data/spec/elasticsearch/api/actions/indices/put_template_spec.rb +0 -107
- data/spec/elasticsearch/api/actions/indices/recovery_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/indices/refresh_spec.rb +0 -91
- data/spec/elasticsearch/api/actions/indices/rollover_spec.rb +0 -58
- data/spec/elasticsearch/api/actions/indices/segments_spec.rb +0 -91
- data/spec/elasticsearch/api/actions/indices/shard_stores_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/indices/shrink_spec.rb +0 -42
- data/spec/elasticsearch/api/actions/indices/split_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/indices/stats_spec.rb +0 -124
- data/spec/elasticsearch/api/actions/indices/update_aliases_spec.rb +0 -67
- data/spec/elasticsearch/api/actions/indices/upgrade_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/indices/validate_query_spec.rb +0 -122
- data/spec/elasticsearch/api/actions/info_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/ingest/delete_pipeline_spec.rb +0 -60
- data/spec/elasticsearch/api/actions/ingest/geo_ip_stats_spec.rb +0 -34
- data/spec/elasticsearch/api/actions/ingest/get_pipeline_spec.rb +0 -50
- data/spec/elasticsearch/api/actions/ingest/put_pipeline_spec.rb +0 -60
- data/spec/elasticsearch/api/actions/ingest/simulate_spec.rb +0 -49
- data/spec/elasticsearch/api/actions/json_builders_spec.rb +0 -84
- data/spec/elasticsearch/api/actions/mget_spec.rb +0 -102
- data/spec/elasticsearch/api/actions/msearch_spec.rb +0 -151
- data/spec/elasticsearch/api/actions/msearch_template_spec.rb +0 -93
- data/spec/elasticsearch/api/actions/mtermvectors_spec.rb +0 -46
- data/spec/elasticsearch/api/actions/nodes/clear_repositories_metering_archive_spec.rb +0 -51
- data/spec/elasticsearch/api/actions/nodes/get_repositories_metering_info_spec.rb +0 -44
- data/spec/elasticsearch/api/actions/nodes/hot_threads_spec.rb +0 -61
- data/spec/elasticsearch/api/actions/nodes/info_spec.rb +0 -102
- data/spec/elasticsearch/api/actions/nodes/reload_secure_settings_spec.rb +0 -84
- data/spec/elasticsearch/api/actions/nodes/stats_spec.rb +0 -76
- data/spec/elasticsearch/api/actions/open_point_in_time_spec.rb +0 -34
- data/spec/elasticsearch/api/actions/ping_spec.rb +0 -76
- data/spec/elasticsearch/api/actions/put_script_spec.rb +0 -56
- data/spec/elasticsearch/api/actions/reindex_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/render_search_template_spec.rb +0 -52
- data/spec/elasticsearch/api/actions/scroll_spec.rb +0 -52
- data/spec/elasticsearch/api/actions/search_mvt_spec.rb +0 -52
- data/spec/elasticsearch/api/actions/search_shards_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/search_spec.rb +0 -134
- data/spec/elasticsearch/api/actions/search_template_spec.rb +0 -34
- data/spec/elasticsearch/api/actions/shutdown/delete_node_spec.rb +0 -44
- data/spec/elasticsearch/api/actions/shutdown/get_node_spec.rb +0 -46
- data/spec/elasticsearch/api/actions/shutdown/put_node_spec.rb +0 -50
- data/spec/elasticsearch/api/actions/snapshot/clone_spec.rb +0 -67
- data/spec/elasticsearch/api/actions/snapshot/create_repository_spec.rb +0 -51
- data/spec/elasticsearch/api/actions/snapshot/create_spec.rb +0 -51
- data/spec/elasticsearch/api/actions/snapshot/delete_repository_spec.rb +0 -50
- data/spec/elasticsearch/api/actions/snapshot/delete_spec.rb +0 -51
- data/spec/elasticsearch/api/actions/snapshot/get_repository_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/snapshot/get_spec.rb +0 -51
- data/spec/elasticsearch/api/actions/snapshot/repository_analize_spec.rb +0 -48
- data/spec/elasticsearch/api/actions/snapshot/restore_spec.rb +0 -51
- data/spec/elasticsearch/api/actions/snapshot/status_spec.rb +0 -50
- data/spec/elasticsearch/api/actions/snapshot/verify_repository_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/tasks/cancel_spec.rb +0 -50
- data/spec/elasticsearch/api/actions/tasks/get_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/tasks/list_spec.rb +0 -39
- data/spec/elasticsearch/api/actions/termvectors_spec.rb +0 -66
- data/spec/elasticsearch/api/actions/update_by_query_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/update_document_spec.rb +0 -122
- data/spec/elasticsearch/api/api_spec.rb +0 -43
- data/spec/elasticsearch/api/client_spec.rb +0 -46
- data/spec/elasticsearch/api/rest_api_yaml_spec.rb +0 -159
- data/spec/elasticsearch/api/utils_spec.rb +0 -418
- data/spec/rest_yaml_tests_helper.rb +0 -135
- data/spec/skipped_tests.yml +0 -29
- data/spec/spec_helper.rb +0 -82
- data/utils/Gemfile +0 -28
- data/utils/README.md +0 -46
- data/utils/Thorfile +0 -6
- data/utils/thor/.rubocop.yml +0 -4
- data/utils/thor/generate_source.rb +0 -307
- data/utils/thor/generator/endpoint_specifics.rb +0 -187
- data/utils/thor/generator/files_helper.rb +0 -78
- data/utils/thor/lister.rb +0 -57
- data/utils/thor/templates/_documentation_top.erb +0 -58
- data/utils/thor/templates/_method_setup.erb +0 -53
- data/utils/thor/templates/_params_registry.erb +0 -31
- data/utils/thor/templates/_perform_request.erb +0 -56
- data/utils/thor/templates/method.erb +0 -73
- data/utils/thor/templates/test.erb +0 -43
- data/utils/thor/templates/test_helper.rb +0 -83
- /data/{LICENSE → LICENSE.txt} +0 -0
| @@ -14,42 +14,57 @@ | |
| 14 14 | 
             
            # KIND, either express or implied.  See the License for the
         | 
| 15 15 | 
             
            # specific language governing permissions and limitations
         | 
| 16 16 | 
             
            # under the License.
         | 
| 17 | 
            -
             | 
| 17 | 
            +
            #
         | 
| 18 | 
            +
            # This code was automatically generated from the Elasticsearch Specification
         | 
| 19 | 
            +
            # See https://github.com/elastic/elasticsearch-specification
         | 
| 20 | 
            +
            # See Elasticsearch::ES_SPECIFICATION_COMMIT for commit hash.
         | 
| 18 21 | 
             
            module Elasticsearch
         | 
| 19 22 | 
             
              module API
         | 
| 20 23 | 
             
                module Indices
         | 
| 21 24 | 
             
                  module Actions
         | 
| 22 | 
            -
                    #  | 
| 25 | 
            +
                    # Resolve indices.
         | 
| 26 | 
            +
                    # Resolve the names and/or index patterns for indices, aliases, and data streams.
         | 
| 27 | 
            +
                    # Multiple patterns and remote clusters are supported.
         | 
| 23 28 | 
             
                    #
         | 
| 24 | 
            -
                    # @option arguments [ | 
| 25 | 
            -
                    #  | 
| 29 | 
            +
                    # @option arguments [String, Array<String>] :name Comma-separated name(s) or index pattern(s) of the indices, aliases, and data streams to resolve.
         | 
| 30 | 
            +
                    #  Resources on remote clusters can be specified using the +<cluster>+:+<name>+ syntax. (*Required*)
         | 
| 31 | 
            +
                    # @option arguments [String, Array<String>] :expand_wildcards Type of index that wildcard patterns can match.
         | 
| 32 | 
            +
                    #  If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
         | 
| 33 | 
            +
                    #  Supports comma-separated values, such as +open,hidden+.
         | 
| 34 | 
            +
                    #  Valid values are: +all+, +open+, +closed+, +hidden+, +none+. Server default: open.
         | 
| 35 | 
            +
                    # @option arguments [Boolean] :ignore_unavailable If +false+, the request returns an error if it targets a missing or closed index.
         | 
| 36 | 
            +
                    # @option arguments [Boolean] :allow_no_indices If +false+, the request returns an error if any wildcard expression, index alias, or +_all+ value targets only missing or closed indices.
         | 
| 37 | 
            +
                    #  This behavior applies even if the request targets other open indices.
         | 
| 38 | 
            +
                    #  For example, a request targeting +foo*,bar*+ returns an error if an index starts with +foo+ but no index starts with +bar+. Server default: true.
         | 
| 26 39 | 
             
                    # @option arguments [Hash] :headers Custom HTTP headers
         | 
| 27 40 | 
             
                    #
         | 
| 28 | 
            -
                    # @see https://www.elastic.co/ | 
| 41 | 
            +
                    # @see https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-resolve-index
         | 
| 29 42 | 
             
                    #
         | 
| 30 43 | 
             
                    def resolve_index(arguments = {})
         | 
| 44 | 
            +
                      request_opts = { endpoint: arguments[:endpoint] || 'indices.resolve_index' }
         | 
| 45 | 
            +
             | 
| 46 | 
            +
                      defined_params = [:name].each_with_object({}) do |variable, set_variables|
         | 
| 47 | 
            +
                        set_variables[variable] = arguments[variable] if arguments.key?(variable)
         | 
| 48 | 
            +
                      end
         | 
| 49 | 
            +
                      request_opts[:defined_params] = defined_params unless defined_params.empty?
         | 
| 50 | 
            +
             | 
| 31 51 | 
             
                      raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]
         | 
| 32 52 |  | 
| 53 | 
            +
                      arguments = arguments.clone
         | 
| 33 54 | 
             
                      headers = arguments.delete(:headers) || {}
         | 
| 34 55 |  | 
| 35 | 
            -
                       | 
| 56 | 
            +
                      body = nil
         | 
| 36 57 |  | 
| 37 58 | 
             
                      _name = arguments.delete(:name)
         | 
| 38 59 |  | 
| 39 60 | 
             
                      method = Elasticsearch::API::HTTP_GET
         | 
| 40 | 
            -
                      path   = "_resolve/index/#{Utils. | 
| 41 | 
            -
                      params = Utils. | 
| 61 | 
            +
                      path   = "_resolve/index/#{Utils.listify(_name)}"
         | 
| 62 | 
            +
                      params = Utils.process_params(arguments)
         | 
| 42 63 |  | 
| 43 | 
            -
                       | 
| 44 | 
            -
             | 
| 64 | 
            +
                      Elasticsearch::API::Response.new(
         | 
| 65 | 
            +
                        perform_request(method, path, params, body, headers, request_opts)
         | 
| 66 | 
            +
                      )
         | 
| 45 67 | 
             
                    end
         | 
| 46 | 
            -
             | 
| 47 | 
            -
                    # Register this action with its valid params when the module is loaded.
         | 
| 48 | 
            -
                    #
         | 
| 49 | 
            -
                    # @since 6.2.0
         | 
| 50 | 
            -
                    ParamsRegistry.register(:resolve_index, [
         | 
| 51 | 
            -
                      :expand_wildcards
         | 
| 52 | 
            -
                    ].freeze)
         | 
| 53 68 | 
             
                  end
         | 
| 54 69 | 
             
                end
         | 
| 55 70 | 
             
              end
         | 
| @@ -14,32 +14,73 @@ | |
| 14 14 | 
             
            # KIND, either express or implied.  See the License for the
         | 
| 15 15 | 
             
            # specific language governing permissions and limitations
         | 
| 16 16 | 
             
            # under the License.
         | 
| 17 | 
            -
             | 
| 17 | 
            +
            #
         | 
| 18 | 
            +
            # This code was automatically generated from the Elasticsearch Specification
         | 
| 19 | 
            +
            # See https://github.com/elastic/elasticsearch-specification
         | 
| 20 | 
            +
            # See Elasticsearch::ES_SPECIFICATION_COMMIT for commit hash.
         | 
| 18 21 | 
             
            module Elasticsearch
         | 
| 19 22 | 
             
              module API
         | 
| 20 23 | 
             
                module Indices
         | 
| 21 24 | 
             
                  module Actions
         | 
| 22 | 
            -
                    #  | 
| 23 | 
            -
                    # is  | 
| 25 | 
            +
                    # Roll over to a new index.
         | 
| 26 | 
            +
                    # TIP: It is recommended to use the index lifecycle rollover action to automate rollovers.
         | 
| 27 | 
            +
                    # The rollover API creates a new index for a data stream or index alias.
         | 
| 28 | 
            +
                    # The API behavior depends on the rollover target.
         | 
| 29 | 
            +
                    # **Roll over a data stream**
         | 
| 30 | 
            +
                    # If you roll over a data stream, the API creates a new write index for the stream.
         | 
| 31 | 
            +
                    # The stream's previous write index becomes a regular backing index.
         | 
| 32 | 
            +
                    # A rollover also increments the data stream's generation.
         | 
| 33 | 
            +
                    # **Roll over an index alias with a write index**
         | 
| 34 | 
            +
                    # TIP: Prior to Elasticsearch 7.9, you'd typically use an index alias with a write index to manage time series data.
         | 
| 35 | 
            +
                    # Data streams replace this functionality, require less maintenance, and automatically integrate with data tiers.
         | 
| 36 | 
            +
                    # If an index alias points to multiple indices, one of the indices must be a write index.
         | 
| 37 | 
            +
                    # The rollover API creates a new write index for the alias with +is_write_index+ set to +true+.
         | 
| 38 | 
            +
                    # The API also +sets is_write_index+ to +false+ for the previous write index.
         | 
| 39 | 
            +
                    # **Roll over an index alias with one index**
         | 
| 40 | 
            +
                    # If you roll over an index alias that points to only one index, the API creates a new index for the alias and removes the original index from the alias.
         | 
| 41 | 
            +
                    # NOTE: A rollover creates a new index and is subject to the +wait_for_active_shards+ setting.
         | 
| 42 | 
            +
                    # **Increment index names for an alias**
         | 
| 43 | 
            +
                    # When you roll over an index alias, you can specify a name for the new index.
         | 
| 44 | 
            +
                    # If you don't specify a name and the current index ends with +-+ and a number, such as +my-index-000001+ or +my-index-3+, the new index name increments that number.
         | 
| 45 | 
            +
                    # For example, if you roll over an alias with a current index of +my-index-000001+, the rollover creates a new index named +my-index-000002+.
         | 
| 46 | 
            +
                    # This number is always six characters and zero-padded, regardless of the previous index's name.
         | 
| 47 | 
            +
                    # If you use an index alias for time series data, you can use date math in the index name to track the rollover date.
         | 
| 48 | 
            +
                    # For example, you can create an alias that points to an index named +<my-index-{now/d}-000001>+.
         | 
| 49 | 
            +
                    # If you create the index on May 6, 2099, the index's name is +my-index-2099.05.06-000001+.
         | 
| 50 | 
            +
                    # If you roll over the alias on May 7, 2099, the new index's name is +my-index-2099.05.07-000002+.
         | 
| 24 51 | 
             
                    #
         | 
| 25 | 
            -
                    # @option arguments [String] :alias  | 
| 26 | 
            -
                    # @option arguments [String] :new_index  | 
| 27 | 
            -
                    #  | 
| 28 | 
            -
                    #  | 
| 29 | 
            -
                    # @option arguments [Boolean] :dry_run If  | 
| 30 | 
            -
                    # @option arguments [Time] :master_timeout  | 
| 31 | 
            -
                    #  | 
| 52 | 
            +
                    # @option arguments [String] :alias Name of the data stream or index alias to roll over. (*Required*)
         | 
| 53 | 
            +
                    # @option arguments [String] :new_index Name of the index to create.
         | 
| 54 | 
            +
                    #  Supports date math.
         | 
| 55 | 
            +
                    #  Data streams do not support this parameter.
         | 
| 56 | 
            +
                    # @option arguments [Boolean] :dry_run If +true+, checks whether the current index satisfies the specified conditions but does not perform a rollover.
         | 
| 57 | 
            +
                    # @option arguments [Time] :master_timeout Period to wait for a connection to the master node.
         | 
| 58 | 
            +
                    #  If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
         | 
| 59 | 
            +
                    # @option arguments [Time] :timeout Period to wait for a response.
         | 
| 60 | 
            +
                    #  If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
         | 
| 61 | 
            +
                    # @option arguments [Integer, String] :wait_for_active_shards The number of shard copies that must be active before proceeding with the operation.
         | 
| 62 | 
            +
                    #  Set to all or any positive integer up to the total number of shards in the index (+number_of_replicas+1+). Server default: 1.
         | 
| 63 | 
            +
                    # @option arguments [Boolean] :lazy If set to true, the rollover action will only mark a data stream to signal that it needs to be rolled over at the next write.
         | 
| 64 | 
            +
                    #  Only allowed on data streams.
         | 
| 32 65 | 
             
                    # @option arguments [Hash] :headers Custom HTTP headers
         | 
| 33 | 
            -
                    # @option arguments [Hash] :body  | 
| 66 | 
            +
                    # @option arguments [Hash] :body request body
         | 
| 34 67 | 
             
                    #
         | 
| 35 | 
            -
                    # @see https://www.elastic.co/ | 
| 68 | 
            +
                    # @see https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-rollover
         | 
| 36 69 | 
             
                    #
         | 
| 37 70 | 
             
                    def rollover(arguments = {})
         | 
| 71 | 
            +
                      request_opts = { endpoint: arguments[:endpoint] || 'indices.rollover' }
         | 
| 72 | 
            +
             | 
| 73 | 
            +
                      defined_params = [:alias, :new_index].each_with_object({}) do |variable, set_variables|
         | 
| 74 | 
            +
                        set_variables[variable] = arguments[variable] if arguments.key?(variable)
         | 
| 75 | 
            +
                      end
         | 
| 76 | 
            +
                      request_opts[:defined_params] = defined_params unless defined_params.empty?
         | 
| 77 | 
            +
             | 
| 38 78 | 
             
                      raise ArgumentError, "Required argument 'alias' missing" unless arguments[:alias]
         | 
| 39 79 |  | 
| 80 | 
            +
                      arguments = arguments.clone
         | 
| 40 81 | 
             
                      headers = arguments.delete(:headers) || {}
         | 
| 41 82 |  | 
| 42 | 
            -
                       | 
| 83 | 
            +
                      body = arguments.delete(:body)
         | 
| 43 84 |  | 
| 44 85 | 
             
                      _alias = arguments.delete(:alias)
         | 
| 45 86 |  | 
| @@ -47,26 +88,16 @@ module Elasticsearch | |
| 47 88 |  | 
| 48 89 | 
             
                      method = Elasticsearch::API::HTTP_POST
         | 
| 49 90 | 
             
                      path   = if _alias && _new_index
         | 
| 50 | 
            -
                                 "#{Utils. | 
| 91 | 
            +
                                 "#{Utils.listify(_alias)}/_rollover/#{Utils.listify(_new_index)}"
         | 
| 51 92 | 
             
                               else
         | 
| 52 | 
            -
                                 "#{Utils. | 
| 93 | 
            +
                                 "#{Utils.listify(_alias)}/_rollover"
         | 
| 53 94 | 
             
                               end
         | 
| 54 | 
            -
                      params = Utils. | 
| 95 | 
            +
                      params = Utils.process_params(arguments)
         | 
| 55 96 |  | 
| 56 | 
            -
                       | 
| 57 | 
            -
             | 
| 97 | 
            +
                      Elasticsearch::API::Response.new(
         | 
| 98 | 
            +
                        perform_request(method, path, params, body, headers, request_opts)
         | 
| 99 | 
            +
                      )
         | 
| 58 100 | 
             
                    end
         | 
| 59 | 
            -
             | 
| 60 | 
            -
                    # Register this action with its valid params when the module is loaded.
         | 
| 61 | 
            -
                    #
         | 
| 62 | 
            -
                    # @since 6.2.0
         | 
| 63 | 
            -
                    ParamsRegistry.register(:rollover, [
         | 
| 64 | 
            -
                      :include_type_name,
         | 
| 65 | 
            -
                      :timeout,
         | 
| 66 | 
            -
                      :dry_run,
         | 
| 67 | 
            -
                      :master_timeout,
         | 
| 68 | 
            -
                      :wait_for_active_shards
         | 
| 69 | 
            -
                    ].freeze)
         | 
| 70 101 | 
             
                  end
         | 
| 71 102 | 
             
                end
         | 
| 72 103 | 
             
              end
         | 
| @@ -14,50 +14,59 @@ | |
| 14 14 | 
             
            # KIND, either express or implied.  See the License for the
         | 
| 15 15 | 
             
            # specific language governing permissions and limitations
         | 
| 16 16 | 
             
            # under the License.
         | 
| 17 | 
            -
             | 
| 17 | 
            +
            #
         | 
| 18 | 
            +
            # This code was automatically generated from the Elasticsearch Specification
         | 
| 19 | 
            +
            # See https://github.com/elastic/elasticsearch-specification
         | 
| 20 | 
            +
            # See Elasticsearch::ES_SPECIFICATION_COMMIT for commit hash.
         | 
| 18 21 | 
             
            module Elasticsearch
         | 
| 19 22 | 
             
              module API
         | 
| 20 23 | 
             
                module Indices
         | 
| 21 24 | 
             
                  module Actions
         | 
| 22 | 
            -
                    #  | 
| 25 | 
            +
                    # Get index segments.
         | 
| 26 | 
            +
                    # Get low-level information about the Lucene segments in index shards.
         | 
| 27 | 
            +
                    # For data streams, the API returns information about the stream's backing indices.
         | 
| 23 28 | 
             
                    #
         | 
| 24 | 
            -
                    # @option arguments [ | 
| 25 | 
            -
                    #  | 
| 26 | 
            -
                    #  | 
| 27 | 
            -
                    # @option arguments [ | 
| 28 | 
            -
                    #  | 
| 29 | 
            +
                    # @option arguments [String, Array] :index Comma-separated list of data streams, indices, and aliases used to limit the request.
         | 
| 30 | 
            +
                    #  Supports wildcards (+*+).
         | 
| 31 | 
            +
                    #  To target all data streams and indices, omit this parameter or use +*+ or +_all+.
         | 
| 32 | 
            +
                    # @option arguments [Boolean] :allow_no_indices If +false+, the request returns an error if any wildcard expression, index alias, or +_all+ value targets only missing or closed indices.
         | 
| 33 | 
            +
                    #  This behavior applies even if the request targets other open indices. Server default: true.
         | 
| 34 | 
            +
                    # @option arguments [String, Array<String>] :expand_wildcards Type of index that wildcard patterns can match.
         | 
| 35 | 
            +
                    #  If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
         | 
| 36 | 
            +
                    #  Supports comma-separated values, such as +open,hidden+.
         | 
| 37 | 
            +
                    #  Valid values are: +all+, +open+, +closed+, +hidden+, +none+. Server default: open.
         | 
| 38 | 
            +
                    # @option arguments [Boolean] :ignore_unavailable If +false+, the request returns an error if it targets a missing or closed index.
         | 
| 29 39 | 
             
                    # @option arguments [Hash] :headers Custom HTTP headers
         | 
| 30 40 | 
             
                    #
         | 
| 31 | 
            -
                    # @see https://www.elastic.co/ | 
| 41 | 
            +
                    # @see https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-segments
         | 
| 32 42 | 
             
                    #
         | 
| 33 43 | 
             
                    def segments(arguments = {})
         | 
| 34 | 
            -
                       | 
| 44 | 
            +
                      request_opts = { endpoint: arguments[:endpoint] || 'indices.segments' }
         | 
| 45 | 
            +
             | 
| 46 | 
            +
                      defined_params = [:index].each_with_object({}) do |variable, set_variables|
         | 
| 47 | 
            +
                        set_variables[variable] = arguments[variable] if arguments.key?(variable)
         | 
| 48 | 
            +
                      end
         | 
| 49 | 
            +
                      request_opts[:defined_params] = defined_params unless defined_params.empty?
         | 
| 35 50 |  | 
| 36 51 | 
             
                      arguments = arguments.clone
         | 
| 52 | 
            +
                      headers = arguments.delete(:headers) || {}
         | 
| 53 | 
            +
             | 
| 54 | 
            +
                      body = nil
         | 
| 37 55 |  | 
| 38 56 | 
             
                      _index = arguments.delete(:index)
         | 
| 39 57 |  | 
| 40 58 | 
             
                      method = Elasticsearch::API::HTTP_GET
         | 
| 41 59 | 
             
                      path   = if _index
         | 
| 42 | 
            -
                                 "#{Utils. | 
| 60 | 
            +
                                 "#{Utils.listify(_index)}/_segments"
         | 
| 43 61 | 
             
                               else
         | 
| 44 | 
            -
                                  | 
| 62 | 
            +
                                 '_segments'
         | 
| 45 63 | 
             
                               end
         | 
| 46 | 
            -
                      params = Utils. | 
| 64 | 
            +
                      params = Utils.process_params(arguments)
         | 
| 47 65 |  | 
| 48 | 
            -
                       | 
| 49 | 
            -
             | 
| 66 | 
            +
                      Elasticsearch::API::Response.new(
         | 
| 67 | 
            +
                        perform_request(method, path, params, body, headers, request_opts)
         | 
| 68 | 
            +
                      )
         | 
| 50 69 | 
             
                    end
         | 
| 51 | 
            -
             | 
| 52 | 
            -
                    # Register this action with its valid params when the module is loaded.
         | 
| 53 | 
            -
                    #
         | 
| 54 | 
            -
                    # @since 6.2.0
         | 
| 55 | 
            -
                    ParamsRegistry.register(:segments, [
         | 
| 56 | 
            -
                      :ignore_unavailable,
         | 
| 57 | 
            -
                      :allow_no_indices,
         | 
| 58 | 
            -
                      :expand_wildcards,
         | 
| 59 | 
            -
                      :verbose
         | 
| 60 | 
            -
                    ].freeze)
         | 
| 61 70 | 
             
                  end
         | 
| 62 71 | 
             
                end
         | 
| 63 72 | 
             
              end
         | 
| @@ -14,50 +14,63 @@ | |
| 14 14 | 
             
            # KIND, either express or implied.  See the License for the
         | 
| 15 15 | 
             
            # specific language governing permissions and limitations
         | 
| 16 16 | 
             
            # under the License.
         | 
| 17 | 
            -
             | 
| 17 | 
            +
            #
         | 
| 18 | 
            +
            # This code was automatically generated from the Elasticsearch Specification
         | 
| 19 | 
            +
            # See https://github.com/elastic/elasticsearch-specification
         | 
| 20 | 
            +
            # See Elasticsearch::ES_SPECIFICATION_COMMIT for commit hash.
         | 
| 18 21 | 
             
            module Elasticsearch
         | 
| 19 22 | 
             
              module API
         | 
| 20 23 | 
             
                module Indices
         | 
| 21 24 | 
             
                  module Actions
         | 
| 22 | 
            -
                    #  | 
| 25 | 
            +
                    # Get index shard stores.
         | 
| 26 | 
            +
                    # Get store information about replica shards in one or more indices.
         | 
| 27 | 
            +
                    # For data streams, the API retrieves store information for the stream's backing indices.
         | 
| 28 | 
            +
                    # The index shard stores API returns the following information:
         | 
| 29 | 
            +
                    # * The node on which each replica shard exists.
         | 
| 30 | 
            +
                    # * The allocation ID for each replica shard.
         | 
| 31 | 
            +
                    # * A unique ID for each replica shard.
         | 
| 32 | 
            +
                    # * Any errors encountered while opening the shard index or from an earlier failure.
         | 
| 33 | 
            +
                    # By default, the API returns store information only for primary shards that are unassigned or have one or more unassigned replica shards.
         | 
| 23 34 | 
             
                    #
         | 
| 24 | 
            -
                    # @option arguments [ | 
| 25 | 
            -
                    # @option arguments [ | 
| 26 | 
            -
                    #  | 
| 27 | 
            -
                    #  | 
| 28 | 
            -
                    # @option arguments [String] :expand_wildcards  | 
| 35 | 
            +
                    # @option arguments [String, Array] :index List of data streams, indices, and aliases used to limit the request.
         | 
| 36 | 
            +
                    # @option arguments [Boolean] :allow_no_indices If false, the request returns an error if any wildcard expression, index alias, or _all
         | 
| 37 | 
            +
                    #  value targets only missing or closed indices. This behavior applies even if the request
         | 
| 38 | 
            +
                    #  targets other open indices.
         | 
| 39 | 
            +
                    # @option arguments [String, Array<String>] :expand_wildcards Type of index that wildcard patterns can match. If the request can target data streams,
         | 
| 40 | 
            +
                    #  this argument determines whether wildcard expressions match hidden data streams. Server default: open.
         | 
| 41 | 
            +
                    # @option arguments [Boolean] :ignore_unavailable If true, missing or closed indices are not included in the response.
         | 
| 42 | 
            +
                    # @option arguments [Shardstorestatus] :status List of shard health statuses used to limit the request.
         | 
| 29 43 | 
             
                    # @option arguments [Hash] :headers Custom HTTP headers
         | 
| 30 44 | 
             
                    #
         | 
| 31 | 
            -
                    # @see https://www.elastic.co/ | 
| 45 | 
            +
                    # @see https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-shard-stores
         | 
| 32 46 | 
             
                    #
         | 
| 33 47 | 
             
                    def shard_stores(arguments = {})
         | 
| 34 | 
            -
                       | 
| 48 | 
            +
                      request_opts = { endpoint: arguments[:endpoint] || 'indices.shard_stores' }
         | 
| 49 | 
            +
             | 
| 50 | 
            +
                      defined_params = [:index].each_with_object({}) do |variable, set_variables|
         | 
| 51 | 
            +
                        set_variables[variable] = arguments[variable] if arguments.key?(variable)
         | 
| 52 | 
            +
                      end
         | 
| 53 | 
            +
                      request_opts[:defined_params] = defined_params unless defined_params.empty?
         | 
| 35 54 |  | 
| 36 55 | 
             
                      arguments = arguments.clone
         | 
| 56 | 
            +
                      headers = arguments.delete(:headers) || {}
         | 
| 57 | 
            +
             | 
| 58 | 
            +
                      body = nil
         | 
| 37 59 |  | 
| 38 60 | 
             
                      _index = arguments.delete(:index)
         | 
| 39 61 |  | 
| 40 62 | 
             
                      method = Elasticsearch::API::HTTP_GET
         | 
| 41 63 | 
             
                      path   = if _index
         | 
| 42 | 
            -
                                 "#{Utils. | 
| 64 | 
            +
                                 "#{Utils.listify(_index)}/_shard_stores"
         | 
| 43 65 | 
             
                               else
         | 
| 44 | 
            -
                                  | 
| 66 | 
            +
                                 '_shard_stores'
         | 
| 45 67 | 
             
                               end
         | 
| 46 | 
            -
                      params = Utils. | 
| 68 | 
            +
                      params = Utils.process_params(arguments)
         | 
| 47 69 |  | 
| 48 | 
            -
                       | 
| 49 | 
            -
             | 
| 70 | 
            +
                      Elasticsearch::API::Response.new(
         | 
| 71 | 
            +
                        perform_request(method, path, params, body, headers, request_opts)
         | 
| 72 | 
            +
                      )
         | 
| 50 73 | 
             
                    end
         | 
| 51 | 
            -
             | 
| 52 | 
            -
                    # Register this action with its valid params when the module is loaded.
         | 
| 53 | 
            -
                    #
         | 
| 54 | 
            -
                    # @since 6.2.0
         | 
| 55 | 
            -
                    ParamsRegistry.register(:shard_stores, [
         | 
| 56 | 
            -
                      :status,
         | 
| 57 | 
            -
                      :ignore_unavailable,
         | 
| 58 | 
            -
                      :allow_no_indices,
         | 
| 59 | 
            -
                      :expand_wildcards
         | 
| 60 | 
            -
                    ].freeze)
         | 
| 61 74 | 
             
                  end
         | 
| 62 75 | 
             
                end
         | 
| 63 76 | 
             
              end
         | 
| @@ -14,53 +14,79 @@ | |
| 14 14 | 
             
            # KIND, either express or implied.  See the License for the
         | 
| 15 15 | 
             
            # specific language governing permissions and limitations
         | 
| 16 16 | 
             
            # under the License.
         | 
| 17 | 
            -
             | 
| 17 | 
            +
            #
         | 
| 18 | 
            +
            # This code was automatically generated from the Elasticsearch Specification
         | 
| 19 | 
            +
            # See https://github.com/elastic/elasticsearch-specification
         | 
| 20 | 
            +
            # See Elasticsearch::ES_SPECIFICATION_COMMIT for commit hash.
         | 
| 18 21 | 
             
            module Elasticsearch
         | 
| 19 22 | 
             
              module API
         | 
| 20 23 | 
             
                module Indices
         | 
| 21 24 | 
             
                  module Actions
         | 
| 22 | 
            -
                    #  | 
| 25 | 
            +
                    # Shrink an index.
         | 
| 26 | 
            +
                    # Shrink an index into a new index with fewer primary shards.
         | 
| 27 | 
            +
                    # Before you can shrink an index:
         | 
| 28 | 
            +
                    # * The index must be read-only.
         | 
| 29 | 
            +
                    # * A copy of every shard in the index must reside on the same node.
         | 
| 30 | 
            +
                    # * The index must have a green health status.
         | 
| 31 | 
            +
                    # To make shard allocation easier, we recommend you also remove the index's replica shards.
         | 
| 32 | 
            +
                    # You can later re-add replica shards as part of the shrink operation.
         | 
| 33 | 
            +
                    # The requested number of primary shards in the target index must be a factor of the number of shards in the source index.
         | 
| 34 | 
            +
                    # For example an index with 8 primary shards can be shrunk into 4, 2 or 1 primary shards or an index with 15 primary shards can be shrunk into 5, 3 or 1.
         | 
| 35 | 
            +
                    # If the number of shards in the index is a prime number it can only be shrunk into a single primary shard
         | 
| 36 | 
            +
                    #  Before shrinking, a (primary or replica) copy of every shard in the index must be present on the same node.
         | 
| 37 | 
            +
                    # The current write index on a data stream cannot be shrunk. In order to shrink the current write index, the data stream must first be rolled over so that a new write index is created and then the previous write index can be shrunk.
         | 
| 38 | 
            +
                    # A shrink operation:
         | 
| 39 | 
            +
                    # * Creates a new target index with the same definition as the source index, but with a smaller number of primary shards.
         | 
| 40 | 
            +
                    # * Hard-links segments from the source index into the target index. If the file system does not support hard-linking, then all segments are copied into the new index, which is a much more time consuming process. Also if using multiple data paths, shards on different data paths require a full copy of segment files if they are not on the same disk since hardlinks do not work across disks.
         | 
| 41 | 
            +
                    # * Recovers the target index as though it were a closed index which had just been re-opened. Recovers shards to the +.routing.allocation.initial_recovery._id+ index setting.
         | 
| 42 | 
            +
                    # IMPORTANT: Indices can only be shrunk if they satisfy the following requirements:
         | 
| 43 | 
            +
                    # * The target index must not exist.
         | 
| 44 | 
            +
                    # * The source index must have more primary shards than the target index.
         | 
| 45 | 
            +
                    # * The number of primary shards in the target index must be a factor of the number of primary shards in the source index. The source index must have more primary shards than the target index.
         | 
| 46 | 
            +
                    # * The index must not contain more than 2,147,483,519 documents in total across all shards that will be shrunk into a single shard on the target index as this is the maximum number of docs that can fit into a single shard.
         | 
| 47 | 
            +
                    # * The node handling the shrink process must have sufficient free disk space to accommodate a second copy of the existing index.
         | 
| 23 48 | 
             
                    #
         | 
| 24 | 
            -
                    # @option arguments [String] :index  | 
| 25 | 
            -
                    # @option arguments [String] :target  | 
| 26 | 
            -
                    # @option arguments [ | 
| 27 | 
            -
                    #  | 
| 28 | 
            -
                    # @option arguments [Time] : | 
| 29 | 
            -
                    #  | 
| 49 | 
            +
                    # @option arguments [String] :index Name of the source index to shrink. (*Required*)
         | 
| 50 | 
            +
                    # @option arguments [String] :target Name of the target index to create. (*Required*)
         | 
| 51 | 
            +
                    # @option arguments [Time] :master_timeout Period to wait for a connection to the master node.
         | 
| 52 | 
            +
                    #  If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
         | 
| 53 | 
            +
                    # @option arguments [Time] :timeout Period to wait for a response.
         | 
| 54 | 
            +
                    #  If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
         | 
| 55 | 
            +
                    # @option arguments [Integer, String] :wait_for_active_shards The number of shard copies that must be active before proceeding with the operation.
         | 
| 56 | 
            +
                    #  Set to +all+ or any positive integer up to the total number of shards in the index (+number_of_replicas+1+). Server default: 1.
         | 
| 30 57 | 
             
                    # @option arguments [Hash] :headers Custom HTTP headers
         | 
| 31 | 
            -
                    # @option arguments [Hash] :body  | 
| 58 | 
            +
                    # @option arguments [Hash] :body request body
         | 
| 32 59 | 
             
                    #
         | 
| 33 | 
            -
                    # @see https://www.elastic.co/ | 
| 60 | 
            +
                    # @see https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-shrink
         | 
| 34 61 | 
             
                    #
         | 
| 35 62 | 
             
                    def shrink(arguments = {})
         | 
| 63 | 
            +
                      request_opts = { endpoint: arguments[:endpoint] || 'indices.shrink' }
         | 
| 64 | 
            +
             | 
| 65 | 
            +
                      defined_params = [:index, :target].each_with_object({}) do |variable, set_variables|
         | 
| 66 | 
            +
                        set_variables[variable] = arguments[variable] if arguments.key?(variable)
         | 
| 67 | 
            +
                      end
         | 
| 68 | 
            +
                      request_opts[:defined_params] = defined_params unless defined_params.empty?
         | 
| 69 | 
            +
             | 
| 36 70 | 
             
                      raise ArgumentError, "Required argument 'index' missing" unless arguments[:index]
         | 
| 37 71 | 
             
                      raise ArgumentError, "Required argument 'target' missing" unless arguments[:target]
         | 
| 38 72 |  | 
| 73 | 
            +
                      arguments = arguments.clone
         | 
| 39 74 | 
             
                      headers = arguments.delete(:headers) || {}
         | 
| 40 75 |  | 
| 41 | 
            -
                       | 
| 76 | 
            +
                      body = arguments.delete(:body)
         | 
| 42 77 |  | 
| 43 78 | 
             
                      _index = arguments.delete(:index)
         | 
| 44 79 |  | 
| 45 80 | 
             
                      _target = arguments.delete(:target)
         | 
| 46 81 |  | 
| 47 82 | 
             
                      method = Elasticsearch::API::HTTP_PUT
         | 
| 48 | 
            -
                      path   = "#{Utils. | 
| 49 | 
            -
                      params = Utils. | 
| 83 | 
            +
                      path   = "#{Utils.listify(_index)}/_shrink/#{Utils.listify(_target)}"
         | 
| 84 | 
            +
                      params = Utils.process_params(arguments)
         | 
| 50 85 |  | 
| 51 | 
            -
                       | 
| 52 | 
            -
             | 
| 86 | 
            +
                      Elasticsearch::API::Response.new(
         | 
| 87 | 
            +
                        perform_request(method, path, params, body, headers, request_opts)
         | 
| 88 | 
            +
                      )
         | 
| 53 89 | 
             
                    end
         | 
| 54 | 
            -
             | 
| 55 | 
            -
                    # Register this action with its valid params when the module is loaded.
         | 
| 56 | 
            -
                    #
         | 
| 57 | 
            -
                    # @since 6.2.0
         | 
| 58 | 
            -
                    ParamsRegistry.register(:shrink, [
         | 
| 59 | 
            -
                      :copy_settings,
         | 
| 60 | 
            -
                      :timeout,
         | 
| 61 | 
            -
                      :master_timeout,
         | 
| 62 | 
            -
                      :wait_for_active_shards
         | 
| 63 | 
            -
                    ].freeze)
         | 
| 64 90 | 
             
                  end
         | 
| 65 91 | 
             
                end
         | 
| 66 92 | 
             
              end
         | 
| @@ -14,47 +14,51 @@ | |
| 14 14 | 
             
            # KIND, either express or implied.  See the License for the
         | 
| 15 15 | 
             
            # specific language governing permissions and limitations
         | 
| 16 16 | 
             
            # under the License.
         | 
| 17 | 
            -
             | 
| 17 | 
            +
            #
         | 
| 18 | 
            +
            # This code was automatically generated from the Elasticsearch Specification
         | 
| 19 | 
            +
            # See https://github.com/elastic/elasticsearch-specification
         | 
| 20 | 
            +
            # See Elasticsearch::ES_SPECIFICATION_COMMIT for commit hash.
         | 
| 18 21 | 
             
            module Elasticsearch
         | 
| 19 22 | 
             
              module API
         | 
| 20 23 | 
             
                module Indices
         | 
| 21 24 | 
             
                  module Actions
         | 
| 22 | 
            -
                    # Simulate  | 
| 25 | 
            +
                    # Simulate an index.
         | 
| 26 | 
            +
                    # Get the index configuration that would be applied to the specified index from an existing index template.
         | 
| 23 27 | 
             
                    #
         | 
| 24 | 
            -
                    # @option arguments [String] :name  | 
| 28 | 
            +
                    # @option arguments [String] :name Name of the index to simulate (*Required*)
         | 
| 25 29 | 
             
                    # @option arguments [Boolean] :create Whether the index template we optionally defined in the body should only be dry-run added if new or can also replace an existing one
         | 
| 26 | 
            -
                    # @option arguments [String] :cause User defined reason for dry-run creating the new template for simulation purposes
         | 
| 27 | 
            -
                    # @option arguments [Time] :master_timeout  | 
| 30 | 
            +
                    # @option arguments [String] :cause User defined reason for dry-run creating the new template for simulation purposes Server default: false.
         | 
| 31 | 
            +
                    # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
         | 
| 32 | 
            +
                    # @option arguments [Boolean] :include_defaults If true, returns all relevant default configurations for the index template.
         | 
| 28 33 | 
             
                    # @option arguments [Hash] :headers Custom HTTP headers
         | 
| 29 | 
            -
                    # @option arguments [Hash] :body New index template definition, which will be included in the simulation, as if it already exists in the system
         | 
| 30 34 | 
             
                    #
         | 
| 31 | 
            -
                    # @see https://www.elastic.co/ | 
| 35 | 
            +
                    # @see https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-simulate-index-template
         | 
| 32 36 | 
             
                    #
         | 
| 33 37 | 
             
                    def simulate_index_template(arguments = {})
         | 
| 38 | 
            +
                      request_opts = { endpoint: arguments[:endpoint] || 'indices.simulate_index_template' }
         | 
| 39 | 
            +
             | 
| 40 | 
            +
                      defined_params = [:name].each_with_object({}) do |variable, set_variables|
         | 
| 41 | 
            +
                        set_variables[variable] = arguments[variable] if arguments.key?(variable)
         | 
| 42 | 
            +
                      end
         | 
| 43 | 
            +
                      request_opts[:defined_params] = defined_params unless defined_params.empty?
         | 
| 44 | 
            +
             | 
| 34 45 | 
             
                      raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]
         | 
| 35 46 |  | 
| 47 | 
            +
                      arguments = arguments.clone
         | 
| 36 48 | 
             
                      headers = arguments.delete(:headers) || {}
         | 
| 37 49 |  | 
| 38 | 
            -
                       | 
| 50 | 
            +
                      body = nil
         | 
| 39 51 |  | 
| 40 52 | 
             
                      _name = arguments.delete(:name)
         | 
| 41 53 |  | 
| 42 54 | 
             
                      method = Elasticsearch::API::HTTP_POST
         | 
| 43 | 
            -
                      path   = "_index_template/_simulate_index/#{Utils. | 
| 44 | 
            -
                      params = Utils. | 
| 55 | 
            +
                      path   = "_index_template/_simulate_index/#{Utils.listify(_name)}"
         | 
| 56 | 
            +
                      params = Utils.process_params(arguments)
         | 
| 45 57 |  | 
| 46 | 
            -
                       | 
| 47 | 
            -
             | 
| 58 | 
            +
                      Elasticsearch::API::Response.new(
         | 
| 59 | 
            +
                        perform_request(method, path, params, body, headers, request_opts)
         | 
| 60 | 
            +
                      )
         | 
| 48 61 | 
             
                    end
         | 
| 49 | 
            -
             | 
| 50 | 
            -
                    # Register this action with its valid params when the module is loaded.
         | 
| 51 | 
            -
                    #
         | 
| 52 | 
            -
                    # @since 6.2.0
         | 
| 53 | 
            -
                    ParamsRegistry.register(:simulate_index_template, [
         | 
| 54 | 
            -
                      :create,
         | 
| 55 | 
            -
                      :cause,
         | 
| 56 | 
            -
                      :master_timeout
         | 
| 57 | 
            -
                    ].freeze)
         | 
| 58 62 | 
             
                  end
         | 
| 59 63 | 
             
                end
         | 
| 60 64 | 
             
              end
         | 
| @@ -14,49 +14,55 @@ | |
| 14 14 | 
             
            # KIND, either express or implied.  See the License for the
         | 
| 15 15 | 
             
            # specific language governing permissions and limitations
         | 
| 16 16 | 
             
            # under the License.
         | 
| 17 | 
            -
             | 
| 17 | 
            +
            #
         | 
| 18 | 
            +
            # This code was automatically generated from the Elasticsearch Specification
         | 
| 19 | 
            +
            # See https://github.com/elastic/elasticsearch-specification
         | 
| 20 | 
            +
            # See Elasticsearch::ES_SPECIFICATION_COMMIT for commit hash.
         | 
| 18 21 | 
             
            module Elasticsearch
         | 
| 19 22 | 
             
              module API
         | 
| 20 23 | 
             
                module Indices
         | 
| 21 24 | 
             
                  module Actions
         | 
| 22 | 
            -
                    # Simulate  | 
| 25 | 
            +
                    # Simulate an index template.
         | 
| 26 | 
            +
                    # Get the index configuration that would be applied by a particular index template.
         | 
| 23 27 | 
             
                    #
         | 
| 24 | 
            -
                    # @option arguments [String] :name  | 
| 25 | 
            -
                    #  | 
| 28 | 
            +
                    # @option arguments [String] :name Name of the index template to simulate. To test a template configuration before you add it to the cluster, omit
         | 
| 29 | 
            +
                    #  this parameter and specify the template configuration in the request body.
         | 
| 30 | 
            +
                    # @option arguments [Boolean] :create If true, the template passed in the body is only used if no existing templates match the same index patterns. If false, the simulation uses the template with the highest priority. Note that the template is not permanently added or updated in either case; it is only used for the simulation.
         | 
| 26 31 | 
             
                    # @option arguments [String] :cause User defined reason for dry-run creating the new template for simulation purposes
         | 
| 27 | 
            -
                    # @option arguments [Time] :master_timeout  | 
| 32 | 
            +
                    # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
         | 
| 33 | 
            +
                    # @option arguments [Boolean] :include_defaults If true, returns all relevant default configurations for the index template.
         | 
| 28 34 | 
             
                    # @option arguments [Hash] :headers Custom HTTP headers
         | 
| 29 | 
            -
                    # @option arguments [Hash] :body  | 
| 35 | 
            +
                    # @option arguments [Hash] :body request body
         | 
| 30 36 | 
             
                    #
         | 
| 31 | 
            -
                    # @see https://www.elastic.co/ | 
| 37 | 
            +
                    # @see https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-simulate-template
         | 
| 32 38 | 
             
                    #
         | 
| 33 39 | 
             
                    def simulate_template(arguments = {})
         | 
| 34 | 
            -
                       | 
| 40 | 
            +
                      request_opts = { endpoint: arguments[:endpoint] || 'indices.simulate_template' }
         | 
| 41 | 
            +
             | 
| 42 | 
            +
                      defined_params = [:name].each_with_object({}) do |variable, set_variables|
         | 
| 43 | 
            +
                        set_variables[variable] = arguments[variable] if arguments.key?(variable)
         | 
| 44 | 
            +
                      end
         | 
| 45 | 
            +
                      request_opts[:defined_params] = defined_params unless defined_params.empty?
         | 
| 35 46 |  | 
| 36 47 | 
             
                      arguments = arguments.clone
         | 
| 48 | 
            +
                      headers = arguments.delete(:headers) || {}
         | 
| 49 | 
            +
             | 
| 50 | 
            +
                      body = arguments.delete(:body)
         | 
| 37 51 |  | 
| 38 52 | 
             
                      _name = arguments.delete(:name)
         | 
| 39 53 |  | 
| 40 54 | 
             
                      method = Elasticsearch::API::HTTP_POST
         | 
| 41 55 | 
             
                      path   = if _name
         | 
| 42 | 
            -
                                 "_index_template/_simulate/#{Utils. | 
| 56 | 
            +
                                 "_index_template/_simulate/#{Utils.listify(_name)}"
         | 
| 43 57 | 
             
                               else
         | 
| 44 | 
            -
                                  | 
| 58 | 
            +
                                 '_index_template/_simulate'
         | 
| 45 59 | 
             
                               end
         | 
| 46 | 
            -
                      params = Utils. | 
| 60 | 
            +
                      params = Utils.process_params(arguments)
         | 
| 47 61 |  | 
| 48 | 
            -
                       | 
| 49 | 
            -
             | 
| 62 | 
            +
                      Elasticsearch::API::Response.new(
         | 
| 63 | 
            +
                        perform_request(method, path, params, body, headers, request_opts)
         | 
| 64 | 
            +
                      )
         | 
| 50 65 | 
             
                    end
         | 
| 51 | 
            -
             | 
| 52 | 
            -
                    # Register this action with its valid params when the module is loaded.
         | 
| 53 | 
            -
                    #
         | 
| 54 | 
            -
                    # @since 6.2.0
         | 
| 55 | 
            -
                    ParamsRegistry.register(:simulate_template, [
         | 
| 56 | 
            -
                      :create,
         | 
| 57 | 
            -
                      :cause,
         | 
| 58 | 
            -
                      :master_timeout
         | 
| 59 | 
            -
                    ].freeze)
         | 
| 60 66 | 
             
                  end
         | 
| 61 67 | 
             
                end
         | 
| 62 68 | 
             
              end
         |