diff --git a/lib/opensearch/api/actions/asynchronous_search/delete.rb b/lib/opensearch/api/actions/asynchronous_search/delete.rb index 2d1ce0442..ae1b991cc 100644 --- a/lib/opensearch/api/actions/asynchronous_search/delete.rb +++ b/lib/opensearch/api/actions/asynchronous_search/delete.rb @@ -13,7 +13,7 @@ module OpenSearch module API module AsynchronousSearch module Actions - # Delete asynchronous search. + # Deletes any responses from an asynchronous search. # # @option args [String] :id *Required* # @option args [List] :ignore set to [404] to ignore server's NOT FOUND error for this request diff --git a/lib/opensearch/api/actions/asynchronous_search/get.rb b/lib/opensearch/api/actions/asynchronous_search/get.rb index 0823619e7..28fa105cc 100644 --- a/lib/opensearch/api/actions/asynchronous_search/get.rb +++ b/lib/opensearch/api/actions/asynchronous_search/get.rb @@ -13,7 +13,7 @@ module OpenSearch module API module AsynchronousSearch module Actions - # Get partial responses from asynchronous search. + # Gets partial responses from an asynchronous search. # # @option args [String] :id *Required* def get(args = {}) diff --git a/lib/opensearch/api/actions/asynchronous_search/search.rb b/lib/opensearch/api/actions/asynchronous_search/search.rb index 454366b15..8780b9a90 100644 --- a/lib/opensearch/api/actions/asynchronous_search/search.rb +++ b/lib/opensearch/api/actions/asynchronous_search/search.rb @@ -13,12 +13,12 @@ module OpenSearch module API module AsynchronousSearch module Actions - # Perform an asynchronous search. + # Performs an asynchronous search. # # @option args [String] :index The name of the index to be searched. Can be an individual name, a comma-separated list of indexes, or a wildcard expression of index names. - # @option args [String] :keep_alive The amount of time that the result is saved in the cluster. For example, `2d` means that the results are stored in the cluster for 48 hours. The saved search results are deleted after this period or if the search is canceled. Note that this includes the query execution time. If the query overruns this time, the process cancels this query automatically. - # @option args [Boolean] :keep_on_completion Whether you want to save the results in the cluster after the search is complete. - # @option args [String] :wait_for_completion_timeout The amount of time that you plan to wait for the results. You can poll the remaining results based on an ID. The maximum value is `300s`. Default is `1s`. + # @option args [String] :keep_alive The amount of time that the result is saved in the cluster. For example, `2d` means that the results are stored in the cluster for 48 hours. The saved search results are deleted after this period or if the search is canceled. Note that this includes the query execution time. If the query exceeds this amount of time, the process cancels this query automatically. + # @option args [Boolean] :keep_on_completion Whether to save the results in the cluster after the search is complete. You can examine the stored results at a later time. + # @option args [String] :wait_for_completion_timeout The amount of time to wait for the results. You can poll the remaining results based on an ID. The maximum value is 300 seconds. Default is `1s`. # @option args [Hash] :body The search definition using the Query DSL. def search(args = {}) args = Utils.clone_and_normalize_arguments(args) diff --git a/lib/opensearch/api/actions/asynchronous_search/stats.rb b/lib/opensearch/api/actions/asynchronous_search/stats.rb index 595895379..3ed9fd2fb 100644 --- a/lib/opensearch/api/actions/asynchronous_search/stats.rb +++ b/lib/opensearch/api/actions/asynchronous_search/stats.rb @@ -13,7 +13,7 @@ module OpenSearch module API module AsynchronousSearch module Actions - # Monitoring of asynchronous searches that are running, completed, and/or persisted. + # Monitors any asynchronous searches that are `running`, `completed`, or `persisted`. # def stats(args = {}) args = Utils.clone_and_normalize_arguments(args) diff --git a/lib/opensearch/api/actions/cat/aliases.rb b/lib/opensearch/api/actions/cat/aliases.rb index 32555612a..4d0e5f657 100644 --- a/lib/opensearch/api/actions/cat/aliases.rb +++ b/lib/opensearch/api/actions/cat/aliases.rb @@ -13,15 +13,15 @@ module OpenSearch module API module Cat module Actions - # Shows information about currently configured aliases to indexes including filter and routing info. + # Shows information about aliases currently configured to indexes, including filter and routing information. # - # @option args [Enumerable, String] :expand_wildcards Whether to expand wildcard expression to concrete indexes that are open, closed or both. - # @option args [String] :format A short version of the Accept header (for example, `json`, `yaml`). - # @option args [Enumerable] :h Comma-separated list of column names to display. - # @option args [Boolean] :help Return help information. - # @option args [Boolean] :local Return local information, do not retrieve the state from cluster-manager node. - # @option args [Enumerable] :s Comma-separated list of column names or column aliases to sort by. - # @option args [Boolean] :v Verbose mode. Display column headers. + # @option args [Enumerable, String] :expand_wildcards Specifies the type of index that wildcard expressions can match. Supports comma-separated values. + # @option args [String] :format A short version of the `Accept` header, such as `json` or `yaml`. + # @option args [Enumerable] :h A comma-separated list of column names to display. + # @option args [Boolean] :help Returns help information. + # @option args [Boolean] :local Whether to return information from the local node only instead of from the cluster manager node. + # @option args [Enumerable] :s A comma-separated list of column names or column aliases to sort by. + # @option args [Boolean] :v Enables verbose mode, which displays column headers. # @option args [Enumerable, String] :name A comma-separated list of aliases to retrieve. Supports wildcards (`*`). To retrieve all aliases, omit this parameter or use `*` or `_all`. def aliases(args = {}) args = Utils.clone_and_normalize_arguments(args) diff --git a/lib/opensearch/api/actions/cat/all_pit_segments.rb b/lib/opensearch/api/actions/cat/all_pit_segments.rb index efb0460ba..ccb2bf539 100644 --- a/lib/opensearch/api/actions/cat/all_pit_segments.rb +++ b/lib/opensearch/api/actions/cat/all_pit_segments.rb @@ -13,14 +13,14 @@ module OpenSearch module API module Cat module Actions - # Lists all active point-in-time segments. + # Lists all active CAT point-in-time segments. # - # @option args [String] :bytes The unit in which to display byte values. - # @option args [String] :format A short version of the Accept header (for example, `json`, `yaml`). - # @option args [Enumerable] :h Comma-separated list of column names to display. - # @option args [Boolean] :help Return help information. - # @option args [Enumerable] :s Comma-separated list of column names or column aliases to sort by. - # @option args [Boolean] :v Verbose mode. Display column headers. + # @option args [String] :bytes The units used to display byte values. + # @option args [String] :format A short version of the `Accept` header, such as `json` or `yaml`. + # @option args [Enumerable] :h A comma-separated list of column names to display. + # @option args [Boolean] :help Returns help information. + # @option args [Enumerable] :s A comma-separated list of column names or column aliases to sort by. + # @option args [Boolean] :v Enables verbose mode, which displays column headers. def all_pit_segments(args = {}) args = Utils.clone_and_normalize_arguments(args) headers = args.delete('headers') || {} diff --git a/lib/opensearch/api/actions/cat/allocation.rb b/lib/opensearch/api/actions/cat/allocation.rb index 3a88472ac..c9f1bdcdd 100644 --- a/lib/opensearch/api/actions/cat/allocation.rb +++ b/lib/opensearch/api/actions/cat/allocation.rb @@ -15,16 +15,16 @@ module Cat module Actions # Provides a snapshot of how many shards are allocated to each data node and how much disk space they are using. # - # @option args [String] :bytes The unit used to display byte values. - # @option args [String] :cluster_manager_timeout Operation timeout for connection to cluster-manager node. - # @option args [String] :format A short version of the Accept header (for example, `json`, `yaml`). - # @option args [Enumerable] :h Comma-separated list of column names to display. - # @option args [Boolean] :help Return help information. - # @option args [Boolean] :local Return local information, do not retrieve the state from cluster-manager node. - # @option args [String] :master_timeout DEPRECATED Operation timeout for connection to cluster-manager node. - # @option args [Enumerable] :s Comma-separated list of column names or column aliases to sort by. - # @option args [Boolean] :v Verbose mode. Display column headers. - # @option args [Enumerable, String] :node_id Comma-separated list of node identifiers or names used to limit the returned information. + # @option args [String] :bytes The units used to display byte values. + # @option args [String] :cluster_manager_timeout A timeout for connection to the cluster manager node. + # @option args [String] :format A short version of the HTTP `Accept` header, such as `json` or `yaml`. + # @option args [Enumerable] :h A comma-separated list of column names to display. + # @option args [Boolean] :help Returns help information. + # @option args [Boolean] :local Returns local information but does not retrieve the state from cluster-manager node. + # @option args [String] :master_timeout DEPRECATED A timeout for connection to the cluster manager node. + # @option args [Enumerable] :s A comma-separated list of column names or column aliases to sort by. + # @option args [Boolean] :v Enables verbose mode, which displays column headers. + # @option args [Enumerable, String] :node_id A comma-separated list of node IDs or names used to limit the returned information. def allocation(args = {}) args = Utils.clone_and_normalize_arguments(args) _node_id = args.delete('node_id') diff --git a/lib/opensearch/api/actions/cat/cluster_manager.rb b/lib/opensearch/api/actions/cat/cluster_manager.rb index 8cdc60292..f1c4fdf58 100644 --- a/lib/opensearch/api/actions/cat/cluster_manager.rb +++ b/lib/opensearch/api/actions/cat/cluster_manager.rb @@ -15,14 +15,14 @@ module Cat module Actions # Returns information about the cluster-manager node. # - # @option args [String] :cluster_manager_timeout Operation timeout for connection to cluster-manager node. - # @option args [String] :format A short version of the Accept header (for example, `json`, `yaml`). - # @option args [Enumerable] :h Comma-separated list of column names to display. - # @option args [Boolean] :help Return help information. - # @option args [Boolean] :local Return local information, do not retrieve the state from cluster-manager node. - # @option args [String] :master_timeout DEPRECATED Operation timeout for connection to cluster-manager node. - # @option args [Enumerable] :s Comma-separated list of column names or column aliases to sort by. - # @option args [Boolean] :v Verbose mode. Display column headers. + # @option args [String] :cluster_manager_timeout A timeout for connection to the cluster manager node. + # @option args [String] :format A short version of the HTTP `Accept` header, such as `json` or `yaml`. + # @option args [Enumerable] :h A comma-separated list of column names to display. + # @option args [Boolean] :help Returns help information. + # @option args [Boolean] :local Returns local information but does not retrieve the state from the cluster manager node. + # @option args [String] :master_timeout DEPRECATED A timeout for connection to the cluster manager node. + # @option args [Enumerable] :s A comma-separated list of column names or column aliases to sort by. + # @option args [Boolean] :v Enables verbose mode, which displays column headers. def cluster_manager(args = {}) args = Utils.clone_and_normalize_arguments(args) headers = args.delete('headers') || {} diff --git a/lib/opensearch/api/actions/cat/count.rb b/lib/opensearch/api/actions/cat/count.rb index f2675e072..bfdb198fa 100644 --- a/lib/opensearch/api/actions/cat/count.rb +++ b/lib/opensearch/api/actions/cat/count.rb @@ -13,13 +13,13 @@ module OpenSearch module API module Cat module Actions - # Provides quick access to the document count of the entire cluster, or individual indexes. + # Provides quick access to the document count of the entire cluster or of an individual index. # - # @option args [String] :format A short version of the Accept header (for example, `json`, `yaml`). - # @option args [Enumerable] :h Comma-separated list of column names to display. - # @option args [Boolean] :help Return help information. - # @option args [Enumerable] :s Comma-separated list of column names or column aliases to sort by. - # @option args [Boolean] :v Verbose mode. Display column headers. + # @option args [String] :format A short version of the `Accept` header, such as `json` or `yaml`. + # @option args [Enumerable] :h A comma-separated list of column names to display. + # @option args [Boolean] :help Returns help information. + # @option args [Enumerable] :s A comma-separated list of column names or column aliases to sort by. + # @option args [Boolean] :v Enables verbose mode, which displays column headers. # @option args [Enumerable, String] :index Comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. def count(args = {}) args = Utils.clone_and_normalize_arguments(args) diff --git a/lib/opensearch/api/actions/cat/fielddata.rb b/lib/opensearch/api/actions/cat/fielddata.rb index 2092ea6c4..c5c306be1 100644 --- a/lib/opensearch/api/actions/cat/fielddata.rb +++ b/lib/opensearch/api/actions/cat/fielddata.rb @@ -15,13 +15,13 @@ module Cat module Actions # Shows how much heap memory is currently being used by field data on every data node in the cluster. # - # @option args [String] :bytes The unit used to display byte values. - # @option args [Enumerable, String] :fields Comma-separated list of fields used to limit returned information. - # @option args [String] :format A short version of the Accept header (for example, `json`, `yaml`). - # @option args [Enumerable] :h Comma-separated list of column names to display. - # @option args [Boolean] :help Return help information. - # @option args [Enumerable] :s Comma-separated list of column names or column aliases to sort by. - # @option args [Boolean] :v Verbose mode. Display column headers. + # @option args [String] :bytes The units used to display byte values. + # @option args [Enumerable, String] :fields A comma-separated list of fields used to limit the amount of returned information. + # @option args [String] :format A short version of the `Accept` header, such as `json` or `yaml`. + # @option args [Enumerable] :h A comma-separated list of column names to display. + # @option args [Boolean] :help Returns help information. + # @option args [Enumerable] :s A comma-separated list of column names or column aliases to sort by. + # @option args [Boolean] :v Enables verbose mode, which displays column headers. def fielddata(args = {}) args = Utils.clone_and_normalize_arguments(args) _fields = args.delete('fields') diff --git a/lib/opensearch/api/actions/cat/health.rb b/lib/opensearch/api/actions/cat/health.rb index 690d49e99..3ef74646b 100644 --- a/lib/opensearch/api/actions/cat/health.rb +++ b/lib/opensearch/api/actions/cat/health.rb @@ -15,13 +15,13 @@ module Cat module Actions # Returns a concise representation of the cluster health. # - # @option args [String] :format A short version of the Accept header (for example, `json`, `yaml`). - # @option args [Enumerable] :h Comma-separated list of column names to display. - # @option args [Boolean] :help Return help information. - # @option args [Enumerable] :s Comma-separated list of column names or column aliases to sort by. + # @option args [String] :format A short version of the `Accept` header, such as `json` or `yaml`. + # @option args [Enumerable] :h A comma-separated list of column names to display. + # @option args [Boolean] :help Returns help information. + # @option args [Enumerable] :s A comma-separated list of column names or column aliases to sort by. # @option args [String] :time The unit used to display time values. - # @option args [Boolean] :ts (default: true) If `true`, returns `HH:MM:SS` and Unix epoch timestamps. - # @option args [Boolean] :v Verbose mode. Display column headers. + # @option args [Boolean] :ts (default: true) When `true`, returns `HH:MM:SS` and Unix epoch timestamps. + # @option args [Boolean] :v Enables verbose mode, which displays column headers. def health(args = {}) args = Utils.clone_and_normalize_arguments(args) headers = args.delete('headers') || {} diff --git a/lib/opensearch/api/actions/cat/indices.rb b/lib/opensearch/api/actions/cat/indices.rb index 68e537b9a..82ef70302 100644 --- a/lib/opensearch/api/actions/cat/indices.rb +++ b/lib/opensearch/api/actions/cat/indices.rb @@ -13,23 +13,23 @@ module OpenSearch module API module Cat module Actions - # Returns information about indexes: number of primaries and replicas, document counts, disk size, ... + # Lists information related to indexes, that is, how much disk space they are using, how many shards they have, their health status, and so on. # - # @option args [String] :bytes The unit used to display byte values. - # @option args [String] :cluster_manager_timeout Operation timeout for connection to cluster-manager node. - # @option args [Enumerable, String] :expand_wildcards The type of index that wildcard patterns can match. - # @option args [String] :format A short version of the Accept header (for example, `json`, `yaml`). - # @option args [Enumerable] :h Comma-separated list of column names to display. - # @option args [String] :health The health status used to limit returned indexes. By default, the response includes indexes of any health status. - # @option args [Boolean] :help Return help information. - # @option args [Boolean] :include_unloaded_segments If `true`, the response includes information from segments that are not loaded into memory. - # @option args [Boolean] :local Return local information, do not retrieve the state from cluster-manager node. - # @option args [String] :master_timeout DEPRECATED Operation timeout for connection to cluster-manager node. - # @option args [Boolean] :pri If `true`, the response only includes information from primary shards. - # @option args [Enumerable] :s Comma-separated list of column names or column aliases to sort by. - # @option args [String] :time The unit used to display time values. - # @option args [Boolean] :v Verbose mode. Display column headers. - # @option args [Enumerable, String] :index Comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. + # @option args [String] :bytes The units used to display byte values. + # @option args [String] :cluster_manager_timeout The amount of time allowed to establish a connection to the cluster manager node. + # @option args [Enumerable, String] :expand_wildcards Specifies the type of index that wildcard expressions can match. Supports comma-separated values. + # @option args [String] :format A short version of the `Accept` header, such as `json` or `yaml`. + # @option args [Enumerable] :h A comma-separated list of column names to display. + # @option args [String] :health Limits indexes based on their health status. Supported values are `green`, `yellow`, and `red`. + # @option args [Boolean] :help Returns help information. + # @option args [Boolean] :include_unloaded_segments Whether to include information from segments not loaded into memory. + # @option args [Boolean] :local Returns local information but does not retrieve the state from the cluster manager node. + # @option args [String] :master_timeout DEPRECATED The amount of time allowed to establish a connection to the cluster manager node. + # @option args [Boolean] :pri When `true`, returns information only from the primary shards. + # @option args [Enumerable] :s A comma-separated list of column names or column aliases to sort by. + # @option args [String] :time Specifies the time units. + # @option args [Boolean] :v Enables verbose mode, which displays column headers. + # @option args [Enumerable, String] :index A comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. def indices(args = {}) args = Utils.clone_and_normalize_arguments(args) _index = args.delete('index') diff --git a/lib/opensearch/api/actions/cat/master.rb b/lib/opensearch/api/actions/cat/master.rb index 88dea0cd4..9cf9b125a 100644 --- a/lib/opensearch/api/actions/cat/master.rb +++ b/lib/opensearch/api/actions/cat/master.rb @@ -15,14 +15,14 @@ module Cat module Actions # Returns information about the cluster-manager node. # - # @option args [String] :cluster_manager_timeout Operation timeout for connection to cluster-manager node. - # @option args [String] :format A short version of the Accept header (for example, `json`, `yaml`). - # @option args [Enumerable] :h Comma-separated list of column names to display. - # @option args [Boolean] :help Return help information. - # @option args [Boolean] :local Return local information, do not retrieve the state from cluster-manager node. - # @option args [String] :master_timeout DEPRECATED Operation timeout for connection to cluster-manager node. - # @option args [Enumerable] :s Comma-separated list of column names or column aliases to sort by. - # @option args [Boolean] :v Verbose mode. Display column headers. + # @option args [String] :cluster_manager_timeout The amount of time allowed to establish a connection to the cluster manager node. + # @option args [String] :format A short version of the `Accept` header, such as `json` or `yaml`. + # @option args [Enumerable] :h A comma-separated list of column names to display. + # @option args [Boolean] :help Returns help information. + # @option args [Boolean] :local Returns local information but does not retrieve the state from the cluster manager node. + # @option args [String] :master_timeout DEPRECATED The amount of time allowed to establish a connection to the cluster manager node. + # @option args [Enumerable] :s A comma-separated list of column names or column aliases to sort by. + # @option args [Boolean] :v Enables verbose mode, which displays column headers. def master(args = {}) args = Utils.clone_and_normalize_arguments(args) headers = args.delete('headers') || {} diff --git a/lib/opensearch/api/actions/cat/nodeattrs.rb b/lib/opensearch/api/actions/cat/nodeattrs.rb index d5e036e31..bc4134051 100644 --- a/lib/opensearch/api/actions/cat/nodeattrs.rb +++ b/lib/opensearch/api/actions/cat/nodeattrs.rb @@ -15,14 +15,14 @@ module Cat module Actions # Returns information about custom node attributes. # - # @option args [String] :cluster_manager_timeout Operation timeout for connection to cluster-manager node. - # @option args [String] :format A short version of the Accept header (for example, `json`, `yaml`). - # @option args [Enumerable] :h Comma-separated list of column names to display. - # @option args [Boolean] :help Return help information. - # @option args [Boolean] :local Return local information, do not retrieve the state from cluster-manager node. - # @option args [String] :master_timeout DEPRECATED Operation timeout for connection to cluster-manager node. - # @option args [Enumerable] :s Comma-separated list of column names or column aliases to sort by. - # @option args [Boolean] :v Verbose mode. Display column headers. + # @option args [String] :cluster_manager_timeout The amount of time allowed to establish a connection to the cluster manager node. + # @option args [String] :format A short version of the `Accept` header, such as `json` or `yaml`. + # @option args [Enumerable] :h A comma-separated list of column names to display. + # @option args [Boolean] :help Returns help information. + # @option args [Boolean] :local Returns local information but does not retrieve the state from the cluster manager node. + # @option args [String] :master_timeout DEPRECATED The amount of time allowed to establish a connection to the cluster manager node. + # @option args [Enumerable] :s A comma-separated list of column names or column aliases to sort by. + # @option args [Boolean] :v Enables verbose mode, which displays column headers. def nodeattrs(args = {}) args = Utils.clone_and_normalize_arguments(args) headers = args.delete('headers') || {} diff --git a/lib/opensearch/api/actions/cat/nodes.rb b/lib/opensearch/api/actions/cat/nodes.rb index a155edefa..341ca9f82 100644 --- a/lib/opensearch/api/actions/cat/nodes.rb +++ b/lib/opensearch/api/actions/cat/nodes.rb @@ -13,19 +13,19 @@ module OpenSearch module API module Cat module Actions - # Returns basic statistics about performance of cluster nodes. + # Returns basic statistics about the performance of cluster nodes. # - # @option args [String] :bytes The unit used to display byte values. - # @option args [String] :cluster_manager_timeout Operation timeout for connection to cluster-manager node. - # @option args [String] :format A short version of the Accept header (for example, `json`, `yaml`). - # @option args [Boolean, String] :full_id If `true`, return the full node ID. If `false`, return the shortened node ID. - # @option args [Enumerable] :h Comma-separated list of column names to display. - # @option args [Boolean] :help Return help information. - # @option args [Boolean] :local DEPRECATED Return local information, do not retrieve the state from cluster-manager node. - # @option args [String] :master_timeout DEPRECATED Operation timeout for connection to cluster-manager node. - # @option args [Enumerable] :s Comma-separated list of column names or column aliases to sort by. - # @option args [String] :time The unit in which to display time values. - # @option args [Boolean] :v Verbose mode. Display column headers. + # @option args [String] :bytes The units used to display byte values. + # @option args [String] :cluster_manager_timeout The amount of time allowed to establish a connection to the cluster manager node. + # @option args [String] :format A short version of the `Accept` header, such as `json` or `yaml`. + # @option args [Boolean, String] :full_id When `true`, returns the full node ID. When `false`, returns the shortened node ID. + # @option args [Enumerable] :h A comma-separated list of column names to display. + # @option args [Boolean] :help Returns help information. + # @option args [Boolean] :local DEPRECATED Returns local information but does not retrieve the state from the cluster manager node. + # @option args [String] :master_timeout DEPRECATED The amount of time allowed to establish a connection to the cluster manager node. + # @option args [Enumerable] :s A comma-separated list of column names or column aliases to sort by. + # @option args [String] :time Specifies the time units, for example, `5d` or `7h`. For more information, see [Supported units](https://opensearch.org/docs/latest/api-reference/units/). + # @option args [Boolean] :v Enables verbose mode, which displays column headers. def nodes(args = {}) args = Utils.clone_and_normalize_arguments(args) headers = args.delete('headers') || {} diff --git a/lib/opensearch/api/actions/cat/pending_tasks.rb b/lib/opensearch/api/actions/cat/pending_tasks.rb index 40efa7af9..979727a03 100644 --- a/lib/opensearch/api/actions/cat/pending_tasks.rb +++ b/lib/opensearch/api/actions/cat/pending_tasks.rb @@ -13,17 +13,17 @@ module OpenSearch module API module Cat module Actions - # Returns a concise representation of the cluster pending tasks. + # Returns a concise representation of the cluster's pending tasks. # - # @option args [String] :cluster_manager_timeout Operation timeout for connection to cluster-manager node. - # @option args [String] :format A short version of the Accept header (for example, `json`, `yaml`). - # @option args [Enumerable] :h Comma-separated list of column names to display. - # @option args [Boolean] :help Return help information. - # @option args [Boolean] :local Return local information, do not retrieve the state from cluster-manager node. - # @option args [String] :master_timeout DEPRECATED Operation timeout for connection to cluster-manager node. - # @option args [Enumerable] :s Comma-separated list of column names or column aliases to sort by. - # @option args [String] :time The unit in which to display time values. - # @option args [Boolean] :v Verbose mode. Display column headers. + # @option args [String] :cluster_manager_timeout The amount of time allowed to establish a connection to the cluster manager node. + # @option args [String] :format A short version of the `Accept` header, such as `json` or `yaml`. + # @option args [Enumerable] :h A comma-separated list of column names to display. + # @option args [Boolean] :help Returns help information. + # @option args [Boolean] :local Returns local information but does not retrieve the state from the cluster manager node. + # @option args [String] :master_timeout DEPRECATED The amount of time allowed to establish a connection to the cluster manager node. + # @option args [Enumerable] :s A comma-separated list of column names or column aliases to sort by. + # @option args [String] :time Specifies the time units, for example, `5d` or `7h`. For more information, see [Supported units](https://opensearch.org/docs/latest/api-reference/units/). + # @option args [Boolean] :v Enables verbose mode, which displays column headers. def pending_tasks(args = {}) args = Utils.clone_and_normalize_arguments(args) headers = args.delete('headers') || {} diff --git a/lib/opensearch/api/actions/cat/pit_segments.rb b/lib/opensearch/api/actions/cat/pit_segments.rb index 950bbf2eb..60571a046 100644 --- a/lib/opensearch/api/actions/cat/pit_segments.rb +++ b/lib/opensearch/api/actions/cat/pit_segments.rb @@ -13,14 +13,14 @@ module OpenSearch module API module Cat module Actions - # List segments for one or several PITs. + # Lists one or several CAT point-in-time segments. # - # @option args [String] :bytes The unit in which to display byte values. - # @option args [String] :format A short version of the Accept header (for example, `json`, `yaml`). - # @option args [Enumerable] :h Comma-separated list of column names to display. - # @option args [Boolean] :help Return help information. - # @option args [Enumerable] :s Comma-separated list of column names or column aliases to sort by. - # @option args [Boolean] :v Verbose mode. Display column headers. + # @option args [String] :bytes The units used to display byte values. + # @option args [String] :format A short version of the `Accept` header, such as `json` or `yaml`. + # @option args [Enumerable] :h A comma-separated list of column names to display. + # @option args [Boolean] :help Returns help information. + # @option args [Enumerable] :s A comma-separated list of column names or column aliases to sort by. + # @option args [Boolean] :v Enables verbose mode, which displays column headers. # @option args [Hash] :body def pit_segments(args = {}) args = Utils.clone_and_normalize_arguments(args) diff --git a/lib/opensearch/api/actions/cat/plugins.rb b/lib/opensearch/api/actions/cat/plugins.rb index ed2b40bf8..496eb2470 100644 --- a/lib/opensearch/api/actions/cat/plugins.rb +++ b/lib/opensearch/api/actions/cat/plugins.rb @@ -13,16 +13,16 @@ module OpenSearch module API module Cat module Actions - # Returns information about installed plugins across nodes node. + # Returns information about the names, components, and versions of the installed plugins. # - # @option args [String] :cluster_manager_timeout Operation timeout for connection to cluster-manager node. - # @option args [String] :format A short version of the Accept header (for example, `json`, `yaml`). - # @option args [Enumerable] :h Comma-separated list of column names to display. - # @option args [Boolean] :help Return help information. - # @option args [Boolean] :local Return local information, do not retrieve the state from cluster-manager node. - # @option args [String] :master_timeout DEPRECATED Operation timeout for connection to cluster-manager node. - # @option args [Enumerable] :s Comma-separated list of column names or column aliases to sort by. - # @option args [Boolean] :v Verbose mode. Display column headers. + # @option args [String] :cluster_manager_timeout The amount of time allowed to establish a connection to the cluster manager node. + # @option args [String] :format A short version of the `Accept` header, such as `json` or `yaml`. + # @option args [Enumerable] :h A comma-separated list of column names to display. + # @option args [Boolean] :help Returns help information. + # @option args [Boolean] :local Returns local information but does not retrieve the state from the cluster manager node. + # @option args [String] :master_timeout DEPRECATED The amount of time allowed to establish a connection to the cluster manager node. + # @option args [Enumerable] :s A comma-separated list of column names or column aliases to sort by. + # @option args [Boolean] :v Enables verbose mode, which displays column headers. def plugins(args = {}) args = Utils.clone_and_normalize_arguments(args) headers = args.delete('headers') || {} diff --git a/lib/opensearch/api/actions/cat/recovery.rb b/lib/opensearch/api/actions/cat/recovery.rb index 45339d596..8b1d07d4a 100644 --- a/lib/opensearch/api/actions/cat/recovery.rb +++ b/lib/opensearch/api/actions/cat/recovery.rb @@ -13,18 +13,18 @@ module OpenSearch module API module Cat module Actions - # Returns information about index shard recoveries, both on-going completed. + # Returns all completed and ongoing index and shard recoveries. # # @option args [Boolean] :active_only If `true`, the response only includes ongoing shard recoveries. - # @option args [String] :bytes The unit used to display byte values. - # @option args [Boolean] :detailed If `true`, the response includes detailed information about shard recoveries. - # @option args [String] :format A short version of the Accept header (for example, `json`, `yaml`). - # @option args [Enumerable] :h Comma-separated list of column names to display. - # @option args [Boolean] :help Return help information. - # @option args [Enumerable] :index Comma-separated list or wildcard expression of index names to limit the returned information. - # @option args [Enumerable] :s Comma-separated list of column names or column aliases to sort by. - # @option args [String] :time The unit in which to display time values. - # @option args [Boolean] :v Verbose mode. Display column headers. + # @option args [String] :bytes The units used to display byte values. + # @option args [Boolean] :detailed When `true`, includes detailed information about shard recoveries. + # @option args [String] :format A short version of the `Accept` header, such as `json` or `yaml`. + # @option args [Enumerable] :h A comma-separated list of column names to display. + # @option args [Boolean] :help Returns help information. + # @option args [Enumerable] :index A comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. + # @option args [Enumerable] :s A comma-separated list of column names or column aliases to sort by. + # @option args [String] :time Specifies the time units, for example, `5d` or `7h`. For more information, see [Supported units](https://opensearch.org/docs/latest/api-reference/units/). + # @option args [Boolean] :v Enables verbose mode, which displays column headers. def recovery(args = {}) args = Utils.clone_and_normalize_arguments(args) _index = args.delete('index') diff --git a/lib/opensearch/api/actions/cat/repositories.rb b/lib/opensearch/api/actions/cat/repositories.rb index 86cfc6052..f8ac1c171 100644 --- a/lib/opensearch/api/actions/cat/repositories.rb +++ b/lib/opensearch/api/actions/cat/repositories.rb @@ -13,16 +13,16 @@ module OpenSearch module API module Cat module Actions - # Returns information about snapshot repositories registered in the cluster. + # Returns information about all snapshot repositories for a cluster. # - # @option args [String] :cluster_manager_timeout Operation timeout for connection to cluster-manager node. - # @option args [String] :format A short version of the Accept header (for example, `json`, `yaml`). - # @option args [Enumerable] :h Comma-separated list of column names to display. - # @option args [Boolean] :help Return help information. - # @option args [Boolean] :local Return local information, do not retrieve the state from cluster-manager node. - # @option args [String] :master_timeout DEPRECATED Operation timeout for connection to cluster-manager node. - # @option args [Enumerable] :s Comma-separated list of column names or column aliases to sort by. - # @option args [Boolean] :v Verbose mode. Display column headers. + # @option args [String] :cluster_manager_timeout The amount of time allowed to establish a connection to the cluster manager node. + # @option args [String] :format A short version of the `Accept` header, such as `json` or `yaml`. + # @option args [Enumerable] :h A comma-separated list of column names to display. + # @option args [Boolean] :help Returns help information. + # @option args [Boolean] :local Returns local information but does not retrieve the state from the cluster manager node. + # @option args [String] :master_timeout DEPRECATED The amount of time allowed to establish a connection to the cluster manager node. + # @option args [Enumerable] :s A comma-separated list of column names or column aliases to sort by. + # @option args [Boolean] :v Enables verbose mode, which displays column headers. def repositories(args = {}) args = Utils.clone_and_normalize_arguments(args) headers = args.delete('headers') || {} diff --git a/lib/opensearch/api/actions/cat/segment_replication.rb b/lib/opensearch/api/actions/cat/segment_replication.rb index 7da9eb202..689b3fec3 100644 --- a/lib/opensearch/api/actions/cat/segment_replication.rb +++ b/lib/opensearch/api/actions/cat/segment_replication.rb @@ -13,25 +13,26 @@ module OpenSearch module API module Cat module Actions - # Returns information about both on-going and latest completed Segment Replication events. + # Returns information about active and last-completed segment replication events on each replica shard, including related shard-level metrics. + # These metrics provide information about how far behind the primary shard the replicas are lagging. # - # @option args [Boolean] :active_only If `true`, the response only includes ongoing segment replication events. - # @option args [Boolean] :allow_no_indices Whether to ignore if a wildcard indexes expression resolves into no concrete indexes. (This includes `_all` string or when no indexes have been specified). - # @option args [String] :bytes The unit in which to display byte values. - # @option args [Boolean] :completed_only If `true`, the response only includes latest completed segment replication events. - # @option args [Boolean] :detailed If `true`, the response includes detailed information about segment replications. - # @option args [Enumerable, String] :expand_wildcards Whether to expand wildcard expression to concrete indexes that are open, closed or both. - # @option args [String] :format A short version of the Accept header (for example, `json`, `yaml`). - # @option args [Enumerable] :h Comma-separated list of column names to display. - # @option args [Boolean] :help Return help information. - # @option args [Boolean] :ignore_throttled Whether specified concrete, expanded or aliased indexes should be ignored when throttled. - # @option args [Boolean] :ignore_unavailable Whether specified concrete indexes should be ignored when unavailable (missing or closed). - # @option args [Enumerable] :index Comma-separated list or wildcard expression of index names to limit the returned information. - # @option args [Enumerable] :s Comma-separated list of column names or column aliases to sort by. - # @option args [Enumerable] :shards Comma-separated list of shards to display. - # @option args [String] :time The unit in which to display time values. - # @option args [String] :timeout Operation timeout. - # @option args [Boolean] :v Verbose mode. Display column headers. + # @option args [Boolean] :active_only When `true`, the response only includes ongoing segment replication events. + # @option args [Boolean] :allow_no_indices Whether to ignore the index if a wildcard index expression resolves to no concrete indexes. This includes the `_all` string or when no indexes have been specified. + # @option args [String] :bytes The units used to display byte values. + # @option args [Boolean] :completed_only When `true`, the response only includes the last-completed segment replication events. + # @option args [Boolean] :detailed When `true`, the response includes additional metrics for each stage of a segment replication event. + # @option args [Enumerable, String] :expand_wildcards Specifies the type of index that wildcard expressions can match. Supports comma-separated values. + # @option args [String] :format A short version of the `Accept` header, such as `json` or `yaml`. + # @option args [Enumerable] :h A comma-separated list of column names to display. + # @option args [Boolean] :help Returns help information. + # @option args [Boolean] :ignore_throttled Whether specified concrete, expanded, or aliased indexes should be ignored when throttled. + # @option args [Boolean] :ignore_unavailable Whether the specified concrete indexes should be ignored when missing or closed. + # @option args [Enumerable] :index A comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. + # @option args [Enumerable] :s A comma-separated list of column names or column aliases to sort by. + # @option args [Enumerable] :shards A comma-separated list of shards to display. + # @option args [String] :time Specifies the time units, for example, `5d` or `7h`. For more information, see [Supported units](https://opensearch.org/docs/latest/api-reference/units/). + # @option args [String] :timeout The operation timeout. + # @option args [Boolean] :v Enables verbose mode, which displays column headers. def segment_replication(args = {}) args = Utils.clone_and_normalize_arguments(args) _index = args.delete('index') diff --git a/lib/opensearch/api/actions/cat/segments.rb b/lib/opensearch/api/actions/cat/segments.rb index 3b82db76d..a3bfcf707 100644 --- a/lib/opensearch/api/actions/cat/segments.rb +++ b/lib/opensearch/api/actions/cat/segments.rb @@ -15,14 +15,14 @@ module Cat module Actions # Provides low-level information about the segments in the shards of an index. # - # @option args [String] :bytes The unit used to display byte values. - # @option args [String] :cluster_manager_timeout Operation timeout for connection to cluster-manager node. - # @option args [String] :format A short version of the Accept header (for example, `json`, `yaml`). - # @option args [Enumerable] :h Comma-separated list of column names to display. - # @option args [Boolean] :help Return help information. - # @option args [String] :master_timeout DEPRECATED Operation timeout for connection to cluster-manager node. - # @option args [Enumerable] :s Comma-separated list of column names or column aliases to sort by. - # @option args [Boolean] :v Verbose mode. Display column headers. + # @option args [String] :bytes The units used to display byte values. + # @option args [String] :cluster_manager_timeout The amount of time allowed to establish a connection to the cluster manager node. + # @option args [String] :format A short version of the `Accept` header, such as `json` or `yaml`. + # @option args [Enumerable] :h A comma-separated list of column names to display. + # @option args [Boolean] :help Returns help information. + # @option args [String] :master_timeout DEPRECATED The amount of time allowed to establish a connection to the cluster manager node. + # @option args [Enumerable] :s A comma-separated list of column names or column aliases to sort by. + # @option args [Boolean] :v Enables verbose mode, which displays column headers. # @option args [Enumerable, String] :index A comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. def segments(args = {}) args = Utils.clone_and_normalize_arguments(args) diff --git a/lib/opensearch/api/actions/cat/shards.rb b/lib/opensearch/api/actions/cat/shards.rb index 496d45dd1..65d97a007 100644 --- a/lib/opensearch/api/actions/cat/shards.rb +++ b/lib/opensearch/api/actions/cat/shards.rb @@ -13,18 +13,18 @@ module OpenSearch module API module Cat module Actions - # Provides a detailed view of shard allocation on nodes. + # Lists the states of all primary and replica shards and how they are distributed. # - # @option args [String] :bytes The unit used to display byte values. - # @option args [String] :cluster_manager_timeout Operation timeout for connection to cluster-manager node. - # @option args [String] :format A short version of the Accept header (for example, `json`, `yaml`). - # @option args [Enumerable] :h Comma-separated list of column names to display. - # @option args [Boolean] :help Return help information. - # @option args [Boolean] :local Return local information, do not retrieve the state from cluster-manager node. - # @option args [String] :master_timeout DEPRECATED Operation timeout for connection to cluster-manager node. - # @option args [Enumerable] :s Comma-separated list of column names or column aliases to sort by. - # @option args [String] :time The unit in which to display time values. - # @option args [Boolean] :v Verbose mode. Display column headers. + # @option args [String] :bytes The units used to display byte values. + # @option args [String] :cluster_manager_timeout The amount of time allowed to establish a connection to the cluster manager node. + # @option args [String] :format A short version of the `Accept` header, such as `json` or `yaml`. + # @option args [Enumerable] :h A comma-separated list of column names to display. + # @option args [Boolean] :help Returns help information. + # @option args [Boolean] :local Returns local information but does not retrieve the state from the cluster manager node. + # @option args [String] :master_timeout DEPRECATED The amount of time allowed to establish a connection to the cluster manager node. + # @option args [Enumerable] :s A comma-separated list of column names or column aliases to sort by. + # @option args [String] :time Specifies the time units, for example, `5d` or `7h`. For more information, see [Supported units](https://opensearch.org/docs/latest/api-reference/units/). + # @option args [Boolean] :v Enables verbose mode, which displays column headers. # @option args [Enumerable, String] :index A comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. def shards(args = {}) args = Utils.clone_and_normalize_arguments(args) diff --git a/lib/opensearch/api/actions/cat/snapshots.rb b/lib/opensearch/api/actions/cat/snapshots.rb index e5ecdf341..183b898bb 100644 --- a/lib/opensearch/api/actions/cat/snapshots.rb +++ b/lib/opensearch/api/actions/cat/snapshots.rb @@ -13,18 +13,18 @@ module OpenSearch module API module Cat module Actions - # Returns all snapshots in a specific repository. + # Lists all of the snapshots stored in a specific repository. # - # @option args [String] :cluster_manager_timeout Operation timeout for connection to cluster-manager node. - # @option args [String] :format A short version of the Accept header (for example, `json`, `yaml`). - # @option args [Enumerable] :h Comma-separated list of column names to display. - # @option args [Boolean] :help Return help information. - # @option args [Boolean] :ignore_unavailable If `true`, the response does not include information from unavailable snapshots. - # @option args [String] :master_timeout DEPRECATED Operation timeout for connection to cluster-manager node. + # @option args [String] :cluster_manager_timeout The amount of time allowed to establish a connection to the cluster manager node. + # @option args [String] :format A short version of the `Accept` header, such as `json` or `yaml`. + # @option args [Enumerable] :h A comma-separated list of column names to display. + # @option args [Boolean] :help Returns help information. + # @option args [Boolean] :ignore_unavailable When `true`, the response does not include information from unavailable snapshots. + # @option args [String] :master_timeout DEPRECATED The amount of time allowed to establish a connection to the cluster manager node. # @option args [Enumerable, String] :repository *Required* A comma-separated list of snapshot repositories used to limit the request. Accepts wildcard expressions. `_all` returns all repositories. If any repository fails during the request, OpenSearch returns an error. - # @option args [Enumerable] :s Comma-separated list of column names or column aliases to sort by. - # @option args [String] :time The unit in which to display time values. - # @option args [Boolean] :v Verbose mode. Display column headers. + # @option args [Enumerable] :s A comma-separated list of column names or column aliases to sort by. + # @option args [String] :time Specifies the time units, for example, `5d` or `7h`. For more information, see [Supported units](https://opensearch.org/docs/latest/api-reference/units/). + # @option args [Boolean] :v Enables verbose mode, which displays column headers. def snapshots(args = {}) args = Utils.clone_and_normalize_arguments(args) raise ArgumentError, "Required argument 'repository' missing" if args['repository'].nil? diff --git a/lib/opensearch/api/actions/cat/tasks.rb b/lib/opensearch/api/actions/cat/tasks.rb index 17b30ed3f..079bbdf7a 100644 --- a/lib/opensearch/api/actions/cat/tasks.rb +++ b/lib/opensearch/api/actions/cat/tasks.rb @@ -13,18 +13,18 @@ module OpenSearch module API module Cat module Actions - # Returns information about the tasks currently executing on one or more nodes in the cluster. + # Lists the progress of all tasks currently running on the cluster. # - # @option args [Enumerable] :actions The task action names, which are used to limit the response. + # @option args [Enumerable] :actions The task action names used to limit the response. # @option args [Boolean] :detailed If `true`, the response includes detailed information about shard recoveries. - # @option args [String] :format A short version of the Accept header (for example, `json`, `yaml`). - # @option args [Enumerable] :h Comma-separated list of column names to display. - # @option args [Boolean] :help Return help information. - # @option args [Enumerable] :nodes Comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes. + # @option args [String] :format A short version of the `Accept` header, such as `json` or `yaml`. + # @option args [Enumerable] :h A comma-separated list of column names to display. + # @option args [Boolean] :help Returns help information. + # @option args [Enumerable] :nodes A comma-separated list of node IDs or names used to limit the returned information. Use `_local` to return information from the node to which you're connecting, specify a specific node from which to get information, or keep the parameter empty to get information from all nodes. # @option args [String] :parent_task_id The parent task identifier, which is used to limit the response. - # @option args [Enumerable] :s Comma-separated list of column names or column aliases to sort by. - # @option args [String] :time The unit in which to display time values. - # @option args [Boolean] :v Verbose mode. Display column headers. + # @option args [Enumerable] :s A comma-separated list of column names or column aliases to sort by. + # @option args [String] :time Specifies the time units, for example, `5d` or `7h`. For more information, see [Supported units](https://opensearch.org/docs/latest/api-reference/units/). + # @option args [Boolean] :v Enables verbose mode, which displays column headers. def tasks(args = {}) args = Utils.clone_and_normalize_arguments(args) headers = args.delete('headers') || {} diff --git a/lib/opensearch/api/actions/cat/templates.rb b/lib/opensearch/api/actions/cat/templates.rb index 6c9432928..e30fb2f0d 100644 --- a/lib/opensearch/api/actions/cat/templates.rb +++ b/lib/opensearch/api/actions/cat/templates.rb @@ -13,16 +13,16 @@ module OpenSearch module API module Cat module Actions - # Returns information about existing templates. + # Lists the names, patterns, order numbers, and version numbers of index templates. # - # @option args [String] :cluster_manager_timeout Operation timeout for connection to cluster-manager node. - # @option args [String] :format A short version of the Accept header (for example, `json`, `yaml`). - # @option args [Enumerable] :h Comma-separated list of column names to display. - # @option args [Boolean] :help Return help information. - # @option args [Boolean] :local Return local information, do not retrieve the state from cluster-manager node. - # @option args [String] :master_timeout DEPRECATED Operation timeout for connection to cluster-manager node. - # @option args [Enumerable] :s Comma-separated list of column names or column aliases to sort by. - # @option args [Boolean] :v Verbose mode. Display column headers. + # @option args [String] :cluster_manager_timeout The amount of time allowed to establish a connection to the cluster manager node. + # @option args [String] :format A short version of the `Accept` header, such as `json` or `yaml`. + # @option args [Enumerable] :h A comma-separated list of column names to display. + # @option args [Boolean] :help Returns help information. + # @option args [Boolean] :local Returns local information but does not retrieve the state from the cluster manager node. + # @option args [String] :master_timeout DEPRECATED The amount of time allowed to establish a connection to the cluster manager node. + # @option args [Enumerable] :s A comma-separated list of column names or column aliases to sort by. + # @option args [Boolean] :v Enables verbose mode, which displays column headers. # @option args [String] :name The name of the template to return. Accepts wildcard expressions. If omitted, all templates are returned. def templates(args = {}) args = Utils.clone_and_normalize_arguments(args) diff --git a/lib/opensearch/api/actions/cat/thread_pool.rb b/lib/opensearch/api/actions/cat/thread_pool.rb index 022d250b6..19b48ade6 100644 --- a/lib/opensearch/api/actions/cat/thread_pool.rb +++ b/lib/opensearch/api/actions/cat/thread_pool.rb @@ -14,17 +14,17 @@ module API module Cat module Actions # Returns cluster-wide thread pool statistics per node. - # By default the active, queue and rejected statistics are returned for all thread pools. + # By default the active, queued, and rejected statistics are returned for all thread pools. # - # @option args [String] :cluster_manager_timeout Operation timeout for connection to cluster-manager node. - # @option args [String] :format A short version of the Accept header (for example, `json`, `yaml`). - # @option args [Enumerable] :h Comma-separated list of column names to display. - # @option args [Boolean] :help Return help information. - # @option args [Boolean] :local Return local information, do not retrieve the state from cluster-manager node. - # @option args [String] :master_timeout DEPRECATED Operation timeout for connection to cluster-manager node. - # @option args [Enumerable] :s Comma-separated list of column names or column aliases to sort by. + # @option args [String] :cluster_manager_timeout A timeout for connection to the cluster manager node. + # @option args [String] :format A short version of the `Accept` header, such as `json` or `yaml`. + # @option args [Enumerable] :h A comma-separated list of column names to display. + # @option args [Boolean] :help Returns help information. + # @option args [Boolean] :local Returns local information but does not retrieve the state from the cluster manager node. + # @option args [String] :master_timeout DEPRECATED The amount of time allowed to establish a connection to the cluster manager node. + # @option args [Enumerable] :s A comma-separated list of column names or column aliases to sort by. # @option args [Integer] :size The multiplier in which to display values. - # @option args [Boolean] :v Verbose mode. Display column headers. + # @option args [Boolean] :v Enables verbose mode, which displays column headers. # @option args [Enumerable, String] :thread_pool_patterns A comma-separated list of thread pool names used to limit the request. Accepts wildcard expressions. def thread_pool(args = {}) args = Utils.clone_and_normalize_arguments(args) diff --git a/lib/opensearch/api/actions/cluster/allocation_explain.rb b/lib/opensearch/api/actions/cluster/allocation_explain.rb index 3ec993922..90db98d5b 100644 --- a/lib/opensearch/api/actions/cluster/allocation_explain.rb +++ b/lib/opensearch/api/actions/cluster/allocation_explain.rb @@ -13,11 +13,11 @@ module OpenSearch module API module Cluster module Actions - # Provides explanations for shard allocations in the cluster. + # Explains how shards are allocated in the current cluster and provides an explanation for why unassigned shards can't be allocated to a node. # - # @option args [Boolean] :include_disk_info If `true`, returns information about disk usage and shard sizes. - # @option args [Boolean] :include_yes_decisions If `true`, returns YES decisions in explanation. - # @option args [Hash] :body The index, shard, and primary flag to explain. Empty means 'explain the first unassigned shard' + # @option args [Boolean] :include_disk_info When `true`, returns information about disk usage and shard sizes. + # @option args [Boolean] :include_yes_decisions When `true`, returns any `YES` decisions in the allocation explanation. + # @option args [Hash] :body The index, shard, and primary flag for which to generate an explanation. Leave this empty to generate an explanation for the first unassigned shard. def allocation_explain(args = {}) args = Utils.clone_and_normalize_arguments(args) headers = args.delete('headers') || {} diff --git a/lib/opensearch/api/actions/cluster/delete_component_template.rb b/lib/opensearch/api/actions/cluster/delete_component_template.rb index 5a9a1641c..5ea7fc56b 100644 --- a/lib/opensearch/api/actions/cluster/delete_component_template.rb +++ b/lib/opensearch/api/actions/cluster/delete_component_template.rb @@ -15,10 +15,10 @@ module Cluster module Actions # Deletes a component template. # - # @option args [String] :name *Required* Name of the component template to delete. Wildcard (*) expressions are supported. + # @option args [String] :name *Required* The name of the component template to delete. Supports wildcard (*) expressions. # @option args [String] :cluster_manager_timeout Operation timeout for connection to cluster-manager node. - # @option args [String] :master_timeout DEPRECATED Period to wait for a connection to the cluster-manager node. If no response is received before the timeout expires, the request fails and returns an error. - # @option args [String] :timeout Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. + # @option args [String] :master_timeout DEPRECATED A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value. + # @option args [String] :timeout A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value. # @option args [List] :ignore set to [404] to ignore server's NOT FOUND error for this request def delete_component_template(args = {}) args = Utils.clone_and_normalize_arguments(args) diff --git a/lib/opensearch/api/actions/cluster/delete_decommission_awareness.rb b/lib/opensearch/api/actions/cluster/delete_decommission_awareness.rb index f7fb8a54c..b8473b9be 100644 --- a/lib/opensearch/api/actions/cluster/delete_decommission_awareness.rb +++ b/lib/opensearch/api/actions/cluster/delete_decommission_awareness.rb @@ -13,7 +13,7 @@ module OpenSearch module API module Cluster module Actions - # Delete any existing decommission. + # Recommissions a decommissioned zone. # # @option args [List] :ignore set to [404] to ignore server's NOT FOUND error for this request def delete_decommission_awareness(args = {}) diff --git a/lib/opensearch/api/actions/cluster/delete_voting_config_exclusions.rb b/lib/opensearch/api/actions/cluster/delete_voting_config_exclusions.rb index 5d36f5541..2717e0072 100644 --- a/lib/opensearch/api/actions/cluster/delete_voting_config_exclusions.rb +++ b/lib/opensearch/api/actions/cluster/delete_voting_config_exclusions.rb @@ -13,9 +13,9 @@ module OpenSearch module API module Cluster module Actions - # Clears cluster voting config exclusions. + # Clears any cluster voting configuration exclusions. # - # @option args [Boolean] :wait_for_removal (default: true) Specifies whether to wait for all excluded nodes to be removed from the cluster before clearing the voting configuration exclusions list. Defaults to true, meaning that all excluded nodes must be removed from the cluster before this API takes any action. If set to `false` then the voting configuration exclusions list is cleared even if some excluded nodes are still in the cluster. + # @option args [Boolean] :wait_for_removal (default: true) Specifies whether to wait for all excluded nodes to be removed from the cluster before clearing the voting configuration exclusions list. When `true`, all excluded nodes are removed from the cluster before this API takes any action. When `false`, the voting configuration exclusions list is cleared even if some excluded nodes are still in the cluster. # @option args [List] :ignore set to [404] to ignore server's NOT FOUND error for this request def delete_voting_config_exclusions(args = {}) args = Utils.clone_and_normalize_arguments(args) diff --git a/lib/opensearch/api/actions/cluster/exists_component_template.rb b/lib/opensearch/api/actions/cluster/exists_component_template.rb index 778a424ff..d9ac4a389 100644 --- a/lib/opensearch/api/actions/cluster/exists_component_template.rb +++ b/lib/opensearch/api/actions/cluster/exists_component_template.rb @@ -15,10 +15,10 @@ module Cluster module Actions # Returns information about whether a particular component template exist. # - # @option args [String] :name *Required* Name of the component template to check existence of. Wildcard (*) expressions are supported. - # @option args [String] :cluster_manager_timeout Operation timeout for connection to cluster-manager node. - # @option args [Boolean] :local If `true`, the request retrieves information from the local node only. Defaults to false, which means information is retrieved from the cluster-manager node. - # @option args [String] :master_timeout DEPRECATED Period to wait for a connection to the cluster-manager node. If no response is received before the timeout expires, the request fails and returns an error. + # @option args [String] :name *Required* The name of the component template. Wildcard (*) expressions are supported. + # @option args [String] :cluster_manager_timeout A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value. + # @option args [Boolean] :local When `true`, the request retrieves information from the local node only. When `false, information is retrieved from the cluster manager node. + # @option args [String] :master_timeout DEPRECATED A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value. def exists_component_template(args = {}) args = Utils.clone_and_normalize_arguments(args) raise ArgumentError, "Required argument 'name' missing" if args['name'].nil? diff --git a/lib/opensearch/api/actions/cluster/get_component_template.rb b/lib/opensearch/api/actions/cluster/get_component_template.rb index f94382a9f..aea73b50e 100644 --- a/lib/opensearch/api/actions/cluster/get_component_template.rb +++ b/lib/opensearch/api/actions/cluster/get_component_template.rb @@ -15,10 +15,11 @@ module Cluster module Actions # Returns one or more component templates. # - # @option args [String] :cluster_manager_timeout Operation timeout for connection to cluster-manager node. - # @option args [Boolean] :local If `true`, the request retrieves information from the local node only. If `false`, information is retrieved from the cluster-manager node. - # @option args [String] :master_timeout DEPRECATED Period to wait for a connection to the cluster-manager node. If no response is received before the timeout expires, the request fails and returns an error. - # @option args [String] :name Name of the component template to retrieve. Wildcard (`*`) expressions are supported. + # @option args [String] :cluster_manager_timeout A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value. + # @option args [Boolean] :flat_settings If `true`, returns settings in flat format. + # @option args [Boolean] :local When `true`, the request retrieves information from the local node only. When `false`, information is retrieved from the cluster manager node. + # @option args [String] :master_timeout DEPRECATED A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value. + # @option args [String] :name The name of the component template to retrieve. Wildcard (`*`) expressions are supported. def get_component_template(args = {}) args = Utils.clone_and_normalize_arguments(args) _name = args.delete('name') @@ -34,6 +35,7 @@ def get_component_template(args = {}) GET_COMPONENT_TEMPLATE_QUERY_PARAMS = Set.new(%w[ cluster_manager_timeout + flat_settings local master_timeout ]).freeze diff --git a/lib/opensearch/api/actions/cluster/get_decommission_awareness.rb b/lib/opensearch/api/actions/cluster/get_decommission_awareness.rb index c86dab28b..9791a94dd 100644 --- a/lib/opensearch/api/actions/cluster/get_decommission_awareness.rb +++ b/lib/opensearch/api/actions/cluster/get_decommission_awareness.rb @@ -13,9 +13,9 @@ module OpenSearch module API module Cluster module Actions - # Get details and status of decommissioned attribute. + # Retrieves the decommission status for all zones. # - # @option args [String] :awareness_attribute_name *Required* Awareness attribute name. + # @option args [String] :awareness_attribute_name *Required* The name of the awareness attribute. def get_decommission_awareness(args = {}) args = Utils.clone_and_normalize_arguments(args) raise ArgumentError, "Required argument 'awareness_attribute_name' missing" if args['awareness_attribute_name'].nil? diff --git a/lib/opensearch/api/actions/cluster/get_settings.rb b/lib/opensearch/api/actions/cluster/get_settings.rb index 18e2a5777..d1daef438 100644 --- a/lib/opensearch/api/actions/cluster/get_settings.rb +++ b/lib/opensearch/api/actions/cluster/get_settings.rb @@ -15,11 +15,11 @@ module Cluster module Actions # Returns cluster settings. # - # @option args [String] :cluster_manager_timeout Operation timeout for connection to cluster-manager node. - # @option args [Boolean] :flat_settings If `true`, returns settings in flat format. - # @option args [Boolean] :include_defaults If `true`, returns default cluster settings from the local node. - # @option args [String] :master_timeout DEPRECATED Period to wait for a connection to the cluster-manager node. If no response is received before the timeout expires, the request fails and returns an error. - # @option args [String] :timeout Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. + # @option args [String] :cluster_manager_timeout A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value. + # @option args [Boolean] :flat_settings When `true`, returns cluster settings in a flat format. + # @option args [Boolean] :include_defaults When `true`, returns default cluster settings from the local node. + # @option args [String] :master_timeout DEPRECATED A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value. + # @option args [String] :timeout A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value. def get_settings(args = {}) args = Utils.clone_and_normalize_arguments(args) headers = args.delete('headers') || {} diff --git a/lib/opensearch/api/actions/cluster/get_weighted_routing.rb b/lib/opensearch/api/actions/cluster/get_weighted_routing.rb index e813eed96..1bfae0081 100644 --- a/lib/opensearch/api/actions/cluster/get_weighted_routing.rb +++ b/lib/opensearch/api/actions/cluster/get_weighted_routing.rb @@ -15,7 +15,7 @@ module Cluster module Actions # Fetches weighted shard routing weights. # - # @option args [String] :attribute *Required* Awareness attribute name. + # @option args [String] :attribute *Required* The name of the awareness attribute. def get_weighted_routing(args = {}) args = Utils.clone_and_normalize_arguments(args) raise ArgumentError, "Required argument 'attribute' missing" if args['attribute'].nil? diff --git a/lib/opensearch/api/actions/cluster/health.rb b/lib/opensearch/api/actions/cluster/health.rb index 1d6713f8b..63085e59d 100644 --- a/lib/opensearch/api/actions/cluster/health.rb +++ b/lib/opensearch/api/actions/cluster/health.rb @@ -15,20 +15,20 @@ module Cluster module Actions # Returns basic information about the health of the cluster. # - # @option args [String] :awareness_attribute The awareness attribute for which the health is required. - # @option args [String] :cluster_manager_timeout Operation timeout for connection to cluster-manager node. - # @option args [Enumerable, String] :expand_wildcards Whether to expand wildcard expression to concrete indexes that are open, closed or both. - # @option args [String] :level Can be one of cluster, indexes or shards. Controls the details level of the health information returned. - # @option args [Boolean] :local If `true`, the request retrieves information from the local node only. Defaults to false, which means information is retrieved from the cluster-manager node. - # @option args [String] :master_timeout DEPRECATED Period to wait for a connection to the cluster-manager node. If no response is received before the timeout expires, the request fails and returns an error. - # @option args [String] :timeout Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. - # @option args [Integer, String] :wait_for_active_shards A number controlling to how many active shards to wait for, all to wait for all shards in the cluster to be active, or 0 to not wait. - # @option args [String] :wait_for_events Can be one of immediate, urgent, high, normal, low, languid. Wait until all currently queued events with the given priority are processed. - # @option args [Boolean] :wait_for_no_initializing_shards A Boolean value which controls whether to wait (until the timeout provided) for the cluster to have no shard initializations. Defaults to false, which means it will not wait for initializing shards. - # @option args [Boolean] :wait_for_no_relocating_shards A Boolean value which controls whether to wait (until the timeout provided) for the cluster to have no shard relocations. Defaults to false, which means it will not wait for relocating shards. - # @option args [Float, String] :wait_for_nodes The request waits until the specified number N of nodes is available. It also accepts >=N, <=N, >N and yellow > red. By default, will not wait for any status. - # @option args [Enumerable, String] :index Comma-separated list of data streams, indexes, and index aliases used to limit the request. Wildcard expressions (*) are supported. To target all data streams and indexes in a cluster, omit this parameter or use `_all` or `*`. + # @option args [String] :awareness_attribute The name of the awareness attribute for which to return the cluster health status (for example, `zone`). Applicable only if `level` is set to `awareness_attributes`. + # @option args [String] :cluster_manager_timeout A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value. + # @option args [Enumerable, String] :expand_wildcards Specifies the type of index that wildcard expressions can match. Supports comma-separated values. + # @option args [String] :level (default: cluster) + # @option args [Boolean] :local Whether to return information from the local node only instead of from the cluster manager node. + # @option args [String] :master_timeout DEPRECATED A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value. + # @option args [String] :timeout A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value. + # @option args [Integer, String] :wait_for_active_shards Waits until the specified number of shards is active before returning a response. Use `all` for all shards. + # @option args [String] :wait_for_events Waits until all currently queued events with the given priority are processed. + # @option args [Boolean] :wait_for_no_initializing_shards Whether to wait until there are no initializing shards in the cluster. + # @option args [Boolean] :wait_for_no_relocating_shards Whether to wait until there are no relocating shards in the cluster. + # @option args [Float, String] :wait_for_nodes Waits until the specified number of nodes (`N`) is available. Accepts `>=N`, `<=N`, `>N`, and `, String] :index A comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. def health(args = {}) args = Utils.clone_and_normalize_arguments(args) _index = args.delete('index') diff --git a/lib/opensearch/api/actions/cluster/pending_tasks.rb b/lib/opensearch/api/actions/cluster/pending_tasks.rb index 8032be229..a5d8c00cb 100644 --- a/lib/opensearch/api/actions/cluster/pending_tasks.rb +++ b/lib/opensearch/api/actions/cluster/pending_tasks.rb @@ -13,12 +13,12 @@ module OpenSearch module API module Cluster module Actions - # Returns a list of any cluster-level changes (e.g. create index, update mapping, - # allocate or fail shard) which have not yet been executed. + # Returns a list of pending cluster-level tasks, such as index creation, mapping updates, + # or new allocations. # - # @option args [String] :cluster_manager_timeout Operation timeout for connection to cluster-manager node. - # @option args [Boolean] :local If `true`, the request retrieves information from the local node only. If `false`, information is retrieved from the cluster-manager node. - # @option args [String] :master_timeout DEPRECATED Period to wait for a connection to the cluster-manager node. If no response is received before the timeout expires, the request fails and returns an error. + # @option args [String] :cluster_manager_timeout A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value. + # @option args [Boolean] :local When `true`, the request retrieves information from the local node only. When `false`, information is retrieved from the cluster manager node. + # @option args [String] :master_timeout DEPRECATED A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value. def pending_tasks(args = {}) args = Utils.clone_and_normalize_arguments(args) headers = args.delete('headers') || {} diff --git a/lib/opensearch/api/actions/cluster/post_voting_config_exclusions.rb b/lib/opensearch/api/actions/cluster/post_voting_config_exclusions.rb index d2478260e..2512bcc4a 100644 --- a/lib/opensearch/api/actions/cluster/post_voting_config_exclusions.rb +++ b/lib/opensearch/api/actions/cluster/post_voting_config_exclusions.rb @@ -13,11 +13,11 @@ module OpenSearch module API module Cluster module Actions - # Updates the cluster voting config exclusions by node ids or node names. + # Updates the cluster voting configuration by excluding certain node IDs or names. # - # @option args [Enumerable, String] :node_ids A comma-separated list of the persistent ids of the nodes to exclude from the voting configuration. If specified, you may not also specify `node_names`. - # @option args [Enumerable, String] :node_names A comma-separated list of the names of the nodes to exclude from the voting configuration. If specified, you may not also specify `node_ids`. - # @option args [String] :timeout When adding a voting configuration exclusion, the API waits for the specified nodes to be excluded from the voting configuration before returning. If the timeout expires before the appropriate condition is satisfied, the request fails and returns an error. + # @option args [Enumerable, String] :node_ids A comma-separated list of node IDs to exclude from the voting configuration. When using this setting, you cannot also specify `node_names`. + # @option args [Enumerable, String] :node_names A comma-separated list of node names to exclude from the voting configuration. When using this setting, you cannot also specify `node_ids`. + # @option args [String] :timeout When adding a voting configuration exclusion, the API waits for the specified nodes to be excluded from the voting configuration before returning a response. If the timeout expires before the appropriate condition is satisfied, the request fails and returns an error. def post_voting_config_exclusions(args = {}) args = Utils.clone_and_normalize_arguments(args) headers = args.delete('headers') || {} diff --git a/lib/opensearch/api/actions/cluster/put_component_template.rb b/lib/opensearch/api/actions/cluster/put_component_template.rb index 24e52295f..1163c7d65 100644 --- a/lib/opensearch/api/actions/cluster/put_component_template.rb +++ b/lib/opensearch/api/actions/cluster/put_component_template.rb @@ -15,12 +15,12 @@ module Cluster module Actions # Creates or updates a component template. # - # @option args [String] :name *Required* Name of the component template to create. OpenSearch includes the following built-in component templates: `logs-mappings`; 'logs-settings`; `metrics-mappings`; `metrics-settings`;`synthetics-mapping`; `synthetics-settings`. OpenSearch Agent uses these templates to configure backing indexes for its data streams. If you use OpenSearch Agent and want to overwrite one of these templates, set the `version` for your replacement template higher than the current version. If you don't use OpenSearch Agent and want to disable all built-in component and index templates, set `stack.templates.enabled` to `false` using the cluster update settings API. - # @option args [String] :cluster_manager_timeout Operation timeout for connection to cluster-manager node. - # @option args [Boolean] :create If `true`, this request cannot replace or update existing component templates. - # @option args [String] :master_timeout DEPRECATED Period to wait for a connection to the cluster-manager node. If no response is received before the timeout expires, the request fails and returns an error. - # @option args [String] :timeout Operation timeout. - # @option args [Hash] :body *Required* The template definition + # @option args [String] :name *Required* The name of the component template to create. OpenSearch includes the following built-in component templates: `logs-mappings`; 'logs-settings`; `metrics-mappings`; `metrics-settings`;`synthetics-mapping`; `synthetics-settings`. OpenSearch uses these templates to configure backing indexes for its data streams. If you want to overwrite one of these templates, set the replacement template `version` to a higher value than the current version. If you want to disable all built-in component and index templates, set `stack.templates.enabled` to `false` using the Cluster Update Settings API. + # @option args [String] :cluster_manager_timeout A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value. + # @option args [Boolean] :create When `true`, this request cannot replace or update existing component templates. + # @option args [String] :master_timeout DEPRECATED A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value. + # @option args [String] :timeout A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value. + # @option args [Hash] :body *Required* The template definition. def put_component_template(args = {}) args = Utils.clone_and_normalize_arguments(args) raise ArgumentError, "Required argument 'name' missing" if args['name'].nil? diff --git a/lib/opensearch/api/actions/cluster/put_decommission_awareness.rb b/lib/opensearch/api/actions/cluster/put_decommission_awareness.rb index a1640b669..6754b76fd 100644 --- a/lib/opensearch/api/actions/cluster/put_decommission_awareness.rb +++ b/lib/opensearch/api/actions/cluster/put_decommission_awareness.rb @@ -13,10 +13,10 @@ module OpenSearch module API module Cluster module Actions - # Decommissions an awareness attribute. + # Decommissions a cluster zone based on awareness. This can greatly benefit multi-zone deployments, where awareness attributes can aid in applying new upgrades to a cluster in a controlled fashion. # - # @option args [String] :awareness_attribute_name *Required* Awareness attribute name. - # @option args [String] :awareness_attribute_value *Required* Awareness attribute value. + # @option args [String] :awareness_attribute_name *Required* The name of the awareness attribute. + # @option args [String] :awareness_attribute_value *Required* The value of the awareness attribute. def put_decommission_awareness(args = {}) args = Utils.clone_and_normalize_arguments(args) raise ArgumentError, "Required argument 'awareness_attribute_name' missing" if args['awareness_attribute_name'].nil? diff --git a/lib/opensearch/api/actions/cluster/put_settings.rb b/lib/opensearch/api/actions/cluster/put_settings.rb index cc057985a..eb3e0cc0e 100644 --- a/lib/opensearch/api/actions/cluster/put_settings.rb +++ b/lib/opensearch/api/actions/cluster/put_settings.rb @@ -15,11 +15,11 @@ module Cluster module Actions # Updates the cluster settings. # - # @option args [String] :cluster_manager_timeout Operation timeout for connection to cluster-manager node. - # @option args [Boolean] :flat_settings Return settings in flat format. - # @option args [String] :master_timeout DEPRECATED Explicit operation timeout for connection to cluster-manager node - # @option args [String] :timeout Explicit operation timeout - # @option args [Hash] :body *Required* The settings to be updated. Can be either `transient` or `persistent` (survives cluster restart). + # @option args [String] :cluster_manager_timeout A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value. + # @option args [Boolean] :flat_settings Returns settings in a flat format. + # @option args [String] :master_timeout DEPRECATED A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value. + # @option args [String] :timeout A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value. + # @option args [Hash] :body *Required* The cluster settings to update. def put_settings(args = {}) args = Utils.clone_and_normalize_arguments(args) raise ArgumentError, "Required argument 'body' missing" if args['body'].nil? diff --git a/lib/opensearch/api/actions/cluster/put_weighted_routing.rb b/lib/opensearch/api/actions/cluster/put_weighted_routing.rb index f436ca491..5bfdbcd33 100644 --- a/lib/opensearch/api/actions/cluster/put_weighted_routing.rb +++ b/lib/opensearch/api/actions/cluster/put_weighted_routing.rb @@ -15,7 +15,7 @@ module Cluster module Actions # Updates weighted shard routing weights. # - # @option args [String] :attribute *Required* Awareness attribute name. + # @option args [String] :attribute *Required* The name of the awareness attribute. # @option args [Hash] :body def put_weighted_routing(args = {}) args = Utils.clone_and_normalize_arguments(args) diff --git a/lib/opensearch/api/actions/cluster/reroute.rb b/lib/opensearch/api/actions/cluster/reroute.rb index dfb8b53bf..f3776a3b7 100644 --- a/lib/opensearch/api/actions/cluster/reroute.rb +++ b/lib/opensearch/api/actions/cluster/reroute.rb @@ -15,13 +15,13 @@ module Cluster module Actions # Allows to manually change the allocation of individual shards in the cluster. # - # @option args [String] :cluster_manager_timeout Operation timeout for connection to cluster-manager node. - # @option args [Boolean] :dry_run If `true`, then the request simulates the operation only and returns the resulting state. - # @option args [Boolean] :explain If `true`, then the response contains an explanation of why the commands can or cannot be executed. - # @option args [String] :master_timeout DEPRECATED Period to wait for a connection to the cluster-manager node. If no response is received before the timeout expires, the request fails and returns an error. + # @option args [String] :cluster_manager_timeout A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value. + # @option args [Boolean] :dry_run When `true`, the request simulates the operation and returns the resulting state. + # @option args [Boolean] :explain When `true`, the response contains an explanation of why certain commands can or cannot be executed. + # @option args [String] :master_timeout DEPRECATED A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value. # @option args [Enumerable, String] :metric Limits the information returned to the specified metrics. - # @option args [Boolean] :retry_failed If `true`, then retries allocation of shards that are blocked due to too many subsequent allocation failures. - # @option args [String] :timeout Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. + # @option args [Boolean] :retry_failed When `true`, retries shard allocation if it was blocked because of too many subsequent failures. + # @option args [String] :timeout A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value. # @option args [Hash] :body The definition of `commands` to perform (`move`, `cancel`, `allocate`) def reroute(args = {}) args = Utils.clone_and_normalize_arguments(args) diff --git a/lib/opensearch/api/actions/cluster/state.rb b/lib/opensearch/api/actions/cluster/state.rb index fd45b9234..560c1db19 100644 --- a/lib/opensearch/api/actions/cluster/state.rb +++ b/lib/opensearch/api/actions/cluster/state.rb @@ -13,19 +13,19 @@ module OpenSearch module API module Cluster module Actions - # Returns a comprehensive information about the state of the cluster. + # Returns comprehensive information about the state of the cluster. # - # @option args [Boolean] :allow_no_indices Whether to ignore if a wildcard indexes expression resolves into no concrete indexes. (This includes `_all` string or when no indexes have been specified) - # @option args [String] :cluster_manager_timeout Operation timeout for connection to cluster-manager node. - # @option args [Enumerable, String] :expand_wildcards Whether to expand wildcard expression to concrete indexes that are open, closed or both. - # @option args [Boolean] :flat_settings Return settings in flat format. - # @option args [Boolean] :ignore_unavailable Whether specified concrete indexes should be ignored when unavailable (missing or closed) - # @option args [Boolean] :local Return local information, do not retrieve the state from cluster-manager node. - # @option args [String] :master_timeout DEPRECATED Specify timeout for connection to cluster manager. + # @option args [Boolean] :allow_no_indices Whether to ignore a wildcard index expression that resolves into no concrete indexes. This includes the `_all` string or when no indexes have been specified. + # @option args [String] :cluster_manager_timeout A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value. + # @option args [Enumerable, String] :expand_wildcards Specifies the type of index that wildcard expressions can match. Supports comma-separated values. + # @option args [Boolean] :flat_settings Returns settings in a flat format. + # @option args [Boolean] :ignore_unavailable Whether the specified concrete indexes should be ignored when unavailable (missing or closed). + # @option args [Boolean] :local Whether to return information from the local node only instead of from the cluster manager node. + # @option args [String] :master_timeout DEPRECATED A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value. # @option args [Integer] :wait_for_metadata_version Wait for the metadata version to be equal or greater than the specified metadata version. # @option args [String] :wait_for_timeout The maximum time to wait for `wait_for_metadata_version` before timing out. - # @option args [Enumerable] :metric Limit the information returned to the specified metrics - # @option args [Enumerable, String] :index A comma-separated list of index names; use `_all` or empty string to perform the operation on all indexes + # @option args [Enumerable] :metric Limits the information returned to only the specified metrics. + # @option args [Enumerable, String] :index A comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. def state(args = {}) args = Utils.clone_and_normalize_arguments(args) _metric = args.delete('metric') diff --git a/lib/opensearch/api/actions/cluster/stats.rb b/lib/opensearch/api/actions/cluster/stats.rb index 3fcc63bdd..69393d767 100644 --- a/lib/opensearch/api/actions/cluster/stats.rb +++ b/lib/opensearch/api/actions/cluster/stats.rb @@ -13,13 +13,13 @@ module OpenSearch module API module Cluster module Actions - # Returns high-level overview of cluster statistics. + # Returns a high-level overview of cluster statistics. # - # @option args [Boolean] :flat_settings If `true`, returns settings in flat format. - # @option args [String] :timeout Period to wait for each node to respond. If a node does not respond before its timeout expires, the response does not include its stats. However, timed out nodes are included in the response's `_nodes.failed` property. Defaults to no timeout. - # @option args [Enumerable] :index_metric Limit the information returned for indexes metric to the specific index metrics. It can be used only if indexes (or all) metric is specified. + # @option args [Boolean] :flat_settings When `true`, returns settings in a flat format. + # @option args [String] :timeout The amount of time to wait for each node to respond. If a node does not respond before its timeout expires, the response does not include its stats. However, timed out nodes are included in the response's `_nodes.failed` property. Defaults to no timeout. + # @option args [Enumerable] :index_metric A comma-separated list of index metric groups, for example, `docs,store`. # @option args [Enumerable] :metric Limit the information returned to the specified metrics. - # @option args [Enumerable, String] :node_id Comma-separated list of node filters used to limit returned information. Defaults to all nodes in the cluster. + # @option args [Enumerable, String] :node_id A comma-separated list of node IDs used to filter results. Supports [node filters](https://opensearch.org/docs/latest/api-reference/nodes-apis/index/#node-filters). def stats(args = {}) args = Utils.clone_and_normalize_arguments(args) _index_metric = args.delete('index_metric') diff --git a/lib/opensearch/api/actions/count.rb b/lib/opensearch/api/actions/count.rb index 34efc8c44..9bd9b85a3 100644 --- a/lib/opensearch/api/actions/count.rb +++ b/lib/opensearch/api/actions/count.rb @@ -20,7 +20,7 @@ module Actions # @option args [String] :analyzer Analyzer to use for the query string. This parameter can only be used when the `q` query string parameter is specified. # @option args [String] :default_operator The default operator for query string query: `AND` or `OR`. This parameter can only be used when the `q` query string parameter is specified. # @option args [String] :df Field to use as default where no field prefix is given in the query string. This parameter can only be used when the `q` query string parameter is specified. - # @option args [Enumerable, String] :expand_wildcards Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. + # @option args [Enumerable, String] :expand_wildcards Specifies the type of index that wildcard expressions can match. Supports comma-separated values. # @option args [Boolean] :ignore_throttled If `true`, concrete, expanded or aliased indexes are ignored when frozen. # @option args [Boolean] :ignore_unavailable If `false`, the request returns an error if it targets a missing or closed index. # @option args [Boolean] :lenient If `true`, format-based query failures (such as providing text to a numeric field) in the query string will be ignored. diff --git a/lib/opensearch/api/actions/delete_by_query.rb b/lib/opensearch/api/actions/delete_by_query.rb index cd6ca4ced..2816d2507 100644 --- a/lib/opensearch/api/actions/delete_by_query.rb +++ b/lib/opensearch/api/actions/delete_by_query.rb @@ -16,7 +16,7 @@ module Actions # Deletes documents matching the provided query. # # @option args [Enumerable, String] :index *Required* Comma-separated list of data streams, indexes, and aliases to search. Supports wildcards (`*`). To search all data streams or indexes, omit this parameter or use `*` or `_all`. - # @option args [Enumerable] :_source Set to `true` or `false` to return the `_source` field or not, or a list of fields to return. + # @option args [Boolean, Enumerable, String] :_source Set to `true` or `false` to return the `_source` field or not, or a list of fields to return. # @option args [Enumerable] :_source_excludes List of fields to exclude from the returned `_source` field. # @option args [Enumerable] :_source_includes List of fields to extract and return from the `_source` field. # @option args [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 indexes. This behavior applies even if the request targets other open indexes. For example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`. @@ -41,7 +41,7 @@ module Actions # @option args [String] :search_timeout Explicit timeout for each search request. Defaults to no timeout. # @option args [String] :search_type The type of the search operation. Available options: `query_then_fetch`, `dfs_query_then_fetch`. # @option args [Integer] :size Deprecated, use `max_docs` instead. - # @option args [Float, String] :slices The number of slices this task should be divided into. + # @option args [Integer, String] :slices The number of slices this task should be divided into. # @option args [Enumerable] :sort A comma-separated list of : pairs. # @option args [Enumerable] :stats Specific `tag` of the request for logging and statistical purposes. # @option args [Integer] :terminate_after Maximum number of documents to collect for each shard. If a query reaches this limit, OpenSearch terminates the query early. OpenSearch collects documents before sorting. Use with caution. OpenSearch applies this parameter to each shard handling the request. When possible, let OpenSearch perform early termination automatically. Avoid specifying this parameter for requests that target data streams with backing indexes across multiple data tiers. diff --git a/lib/opensearch/api/actions/indices/forcemerge.rb b/lib/opensearch/api/actions/indices/forcemerge.rb index af4283db0..87ce095f4 100644 --- a/lib/opensearch/api/actions/indices/forcemerge.rb +++ b/lib/opensearch/api/actions/indices/forcemerge.rb @@ -19,7 +19,7 @@ module Actions # @option args [Enumerable, String] :expand_wildcards Whether to expand wildcard expression to concrete indexes that are open, closed or both. # @option args [Boolean] :flush (default: true) Specify whether the index should be flushed after performing the operation. # @option args [Boolean] :ignore_unavailable Whether specified concrete indexes should be ignored when unavailable (missing or closed) - # @option args [Float] :max_num_segments The number of larger segments into which smaller segments are merged. Set this parameter to 1 to merge all segments into one segment. The default behavior is to perform the merge as necessary. + # @option args [Integer] :max_num_segments The number of larger segments into which smaller segments are merged. Set this parameter to 1 to merge all segments into one segment. The default behavior is to perform the merge as necessary. # @option args [Boolean] :only_expunge_deletes Specify whether the operation should only expunge deleted documents # @option args [Boolean] :primary_only Specify whether the operation should only perform on primary shards. Defaults to false. # @option args [Boolean] :wait_for_completion (default: true) Should the request wait until the force merge is completed. diff --git a/lib/opensearch/api/actions/indices/put_template.rb b/lib/opensearch/api/actions/indices/put_template.rb index de080486d..5b3f86098 100644 --- a/lib/opensearch/api/actions/indices/put_template.rb +++ b/lib/opensearch/api/actions/indices/put_template.rb @@ -19,7 +19,7 @@ module Actions # @option args [String] :cluster_manager_timeout Operation timeout for connection to cluster-manager node. # @option args [Boolean] :create If `true`, this request cannot replace or update existing index templates. # @option args [String] :master_timeout DEPRECATED Period to wait for a connection to the cluster-manager node. If no response is received before the timeout expires, the request fails and returns an error. - # @option args [Float] :order Order in which OpenSearch applies this template if index matches multiple templates. Templates with lower 'order' values are merged first. Templates with higher 'order' values are merged later, overriding templates with lower values. + # @option args [Integer] :order Order in which OpenSearch applies this template if index matches multiple templates. Templates with lower 'order' values are merged first. Templates with higher 'order' values are merged later, overriding templates with lower values. # @option args [Hash] :body *Required* The template definition def put_template(args = {}) args = Utils.clone_and_normalize_arguments(args) diff --git a/lib/opensearch/api/actions/indices/upgrade.rb b/lib/opensearch/api/actions/indices/upgrade.rb index 9e03ada46..06b19f18f 100644 --- a/lib/opensearch/api/actions/indices/upgrade.rb +++ b/lib/opensearch/api/actions/indices/upgrade.rb @@ -21,7 +21,6 @@ module Actions # @option args [Boolean] :only_ancient_segments If `true`, only ancient (an older Lucene major release) segments will be upgraded. # @option args [Boolean] :wait_for_completion Should this request wait until the operation has completed before returning. # @option args [Enumerable] :index Comma-separated list of indexes; use `_all` or empty string to perform the operation on all indexes. - # @option args [Hash] :body def upgrade(args = {}) args = Utils.clone_and_normalize_arguments(args) _index = args.delete('index') diff --git a/lib/opensearch/api/actions/ml/chunk_model.rb b/lib/opensearch/api/actions/ml/chunk_model.rb new file mode 100644 index 000000000..be971ce0f --- /dev/null +++ b/lib/opensearch/api/actions/ml/chunk_model.rb @@ -0,0 +1,40 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# The OpenSearch Contributors require contributions made to +# this file be licensed under the Apache-2.0 license or a +# compatible open source license. + +# This file is generated from the OpenSearch REST API spec. +# Do not modify it by hand. Instead, modify the generator or the spec. + +# frozen_string_literal: true + +module OpenSearch + module API + module Ml + module Actions + # Uploads model chunk. + # + # @option args [Integer] :chunk_number *Required* + # @option args [String] :model_id *Required* + # @option args [Hash] :body + def chunk_model(args = {}) + args = Utils.clone_and_normalize_arguments(args) + raise ArgumentError, "Required argument 'chunk_number' missing" if args['chunk_number'].nil? + raise ArgumentError, "Required argument 'model_id' missing" if args['model_id'].nil? + + _chunk_number = args.delete('chunk_number') + _model_id = args.delete('model_id') + + headers = args.delete('headers') || {} + body = args.delete('body') + method = 'POST' + url = Utils.build_url('_plugins/_ml/models', _model_id, 'chunk', _chunk_number) + + Utils.validate_query_params! args + transport.perform_request(method, url, args, body, headers).body + end + end + end + end +end diff --git a/lib/opensearch/api/actions/ml/create_controller.rb b/lib/opensearch/api/actions/ml/create_controller.rb new file mode 100644 index 000000000..4e1206160 --- /dev/null +++ b/lib/opensearch/api/actions/ml/create_controller.rb @@ -0,0 +1,37 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# The OpenSearch Contributors require contributions made to +# this file be licensed under the Apache-2.0 license or a +# compatible open source license. + +# This file is generated from the OpenSearch REST API spec. +# Do not modify it by hand. Instead, modify the generator or the spec. + +# frozen_string_literal: true + +module OpenSearch + module API + module Ml + module Actions + # Creates a controller. + # + # @option args [String] :model_id *Required* + # @option args [Hash] :body + def create_controller(args = {}) + args = Utils.clone_and_normalize_arguments(args) + raise ArgumentError, "Required argument 'model_id' missing" if args['model_id'].nil? + + _model_id = args.delete('model_id') + + headers = args.delete('headers') || {} + body = args.delete('body') + method = 'POST' + url = Utils.build_url('_plugins/_ml/controllers', _model_id) + + Utils.validate_query_params! args + transport.perform_request(method, url, args, body, headers).body + end + end + end + end +end diff --git a/lib/opensearch/api/actions/ml/create_memory.rb b/lib/opensearch/api/actions/ml/create_memory.rb new file mode 100644 index 000000000..7445c9d09 --- /dev/null +++ b/lib/opensearch/api/actions/ml/create_memory.rb @@ -0,0 +1,32 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# The OpenSearch Contributors require contributions made to +# this file be licensed under the Apache-2.0 license or a +# compatible open source license. + +# This file is generated from the OpenSearch REST API spec. +# Do not modify it by hand. Instead, modify the generator or the spec. + +# frozen_string_literal: true + +module OpenSearch + module API + module Ml + module Actions + # Create a memory. + # + # @option args [Hash] :body + def create_memory(args = {}) + args = Utils.clone_and_normalize_arguments(args) + headers = args.delete('headers') || {} + body = args.delete('body') + method = 'POST' + url = '_plugins/_ml/memory' + + Utils.validate_query_params! args + transport.perform_request(method, url, args, body, headers).body + end + end + end + end +end diff --git a/lib/opensearch/api/actions/ml/create_message.rb b/lib/opensearch/api/actions/ml/create_message.rb new file mode 100644 index 000000000..34a51c5d0 --- /dev/null +++ b/lib/opensearch/api/actions/ml/create_message.rb @@ -0,0 +1,37 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# The OpenSearch Contributors require contributions made to +# this file be licensed under the Apache-2.0 license or a +# compatible open source license. + +# This file is generated from the OpenSearch REST API spec. +# Do not modify it by hand. Instead, modify the generator or the spec. + +# frozen_string_literal: true + +module OpenSearch + module API + module Ml + module Actions + # Create a message. + # + # @option args [String] :memory_id *Required* + # @option args [Hash] :body + def create_message(args = {}) + args = Utils.clone_and_normalize_arguments(args) + raise ArgumentError, "Required argument 'memory_id' missing" if args['memory_id'].nil? + + _memory_id = args.delete('memory_id') + + headers = args.delete('headers') || {} + body = args.delete('body') + method = 'POST' + url = Utils.build_url('_plugins/_ml/memory', _memory_id, 'messages') + + Utils.validate_query_params! args + transport.perform_request(method, url, args, body, headers).body + end + end + end + end +end diff --git a/lib/opensearch/api/actions/ml/create_model_meta.rb b/lib/opensearch/api/actions/ml/create_model_meta.rb new file mode 100644 index 000000000..61981a581 --- /dev/null +++ b/lib/opensearch/api/actions/ml/create_model_meta.rb @@ -0,0 +1,32 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# The OpenSearch Contributors require contributions made to +# this file be licensed under the Apache-2.0 license or a +# compatible open source license. + +# This file is generated from the OpenSearch REST API spec. +# Do not modify it by hand. Instead, modify the generator or the spec. + +# frozen_string_literal: true + +module OpenSearch + module API + module Ml + module Actions + # Registers model metadata. + # + # @option args [Hash] :body + def create_model_meta(args = {}) + args = Utils.clone_and_normalize_arguments(args) + headers = args.delete('headers') || {} + body = args.delete('body') + method = 'POST' + url = '_plugins/_ml/models/meta' + + Utils.validate_query_params! args + transport.perform_request(method, url, args, body, headers).body + end + end + end + end +end diff --git a/lib/opensearch/api/actions/ml/delete_controller.rb b/lib/opensearch/api/actions/ml/delete_controller.rb new file mode 100644 index 000000000..9ea544dcb --- /dev/null +++ b/lib/opensearch/api/actions/ml/delete_controller.rb @@ -0,0 +1,38 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# The OpenSearch Contributors require contributions made to +# this file be licensed under the Apache-2.0 license or a +# compatible open source license. + +# This file is generated from the OpenSearch REST API spec. +# Do not modify it by hand. Instead, modify the generator or the spec. + +# frozen_string_literal: true + +module OpenSearch + module API + module Ml + module Actions + # Deletes a controller. + # + # @option args [String] :model_id *Required* + # @option args [List] :ignore set to [404] to ignore server's NOT FOUND error for this request + def delete_controller(args = {}) + args = Utils.clone_and_normalize_arguments(args) + raise ArgumentError, "Required argument 'model_id' missing" if args['model_id'].nil? + + _model_id = args.delete('model_id') + + ignore = args.delete('ignore') || [] + headers = args.delete('headers') || {} + body = args.delete('body') + method = 'DELETE' + url = Utils.build_url('_plugins/_ml/controllers', _model_id) + + Utils.validate_query_params! args + transport.perform_delete_request method, url, args, body, headers, ignore.include?(404) + end + end + end + end +end diff --git a/lib/opensearch/api/actions/ml/delete_memory.rb b/lib/opensearch/api/actions/ml/delete_memory.rb new file mode 100644 index 000000000..ec83382a9 --- /dev/null +++ b/lib/opensearch/api/actions/ml/delete_memory.rb @@ -0,0 +1,38 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# The OpenSearch Contributors require contributions made to +# this file be licensed under the Apache-2.0 license or a +# compatible open source license. + +# This file is generated from the OpenSearch REST API spec. +# Do not modify it by hand. Instead, modify the generator or the spec. + +# frozen_string_literal: true + +module OpenSearch + module API + module Ml + module Actions + # Delete a memory. + # + # @option args [String] :memory_id *Required* + # @option args [List] :ignore set to [404] to ignore server's NOT FOUND error for this request + def delete_memory(args = {}) + args = Utils.clone_and_normalize_arguments(args) + raise ArgumentError, "Required argument 'memory_id' missing" if args['memory_id'].nil? + + _memory_id = args.delete('memory_id') + + ignore = args.delete('ignore') || [] + headers = args.delete('headers') || {} + body = args.delete('body') + method = 'DELETE' + url = Utils.build_url('_plugins/_ml/memory', _memory_id) + + Utils.validate_query_params! args + transport.perform_delete_request method, url, args, body, headers, ignore.include?(404) + end + end + end + end +end diff --git a/lib/opensearch/api/actions/ml/execute_agent.rb b/lib/opensearch/api/actions/ml/execute_agent.rb new file mode 100644 index 000000000..403231b5f --- /dev/null +++ b/lib/opensearch/api/actions/ml/execute_agent.rb @@ -0,0 +1,37 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# The OpenSearch Contributors require contributions made to +# this file be licensed under the Apache-2.0 license or a +# compatible open source license. + +# This file is generated from the OpenSearch REST API spec. +# Do not modify it by hand. Instead, modify the generator or the spec. + +# frozen_string_literal: true + +module OpenSearch + module API + module Ml + module Actions + # Execute an agent. + # + # @option args [String] :agent_id *Required* + # @option args [Hash] :body + def execute_agent(args = {}) + args = Utils.clone_and_normalize_arguments(args) + raise ArgumentError, "Required argument 'agent_id' missing" if args['agent_id'].nil? + + _agent_id = args.delete('agent_id') + + headers = args.delete('headers') || {} + body = args.delete('body') + method = 'POST' + url = Utils.build_url('_plugins/_ml/agents', _agent_id, '_execute') + + Utils.validate_query_params! args + transport.perform_request(method, url, args, body, headers).body + end + end + end + end +end diff --git a/lib/opensearch/api/actions/ml/execute_algorithm.rb b/lib/opensearch/api/actions/ml/execute_algorithm.rb new file mode 100644 index 000000000..acea678a3 --- /dev/null +++ b/lib/opensearch/api/actions/ml/execute_algorithm.rb @@ -0,0 +1,37 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# The OpenSearch Contributors require contributions made to +# this file be licensed under the Apache-2.0 license or a +# compatible open source license. + +# This file is generated from the OpenSearch REST API spec. +# Do not modify it by hand. Instead, modify the generator or the spec. + +# frozen_string_literal: true + +module OpenSearch + module API + module Ml + module Actions + # Execute an algorithm. + # + # @option args [String] :algorithm_name *Required* + # @option args [Hash] :body + def execute_algorithm(args = {}) + args = Utils.clone_and_normalize_arguments(args) + raise ArgumentError, "Required argument 'algorithm_name' missing" if args['algorithm_name'].nil? + + _algorithm_name = args.delete('algorithm_name') + + headers = args.delete('headers') || {} + body = args.delete('body') + method = 'POST' + url = Utils.build_url('_plugins/_ml/_execute', _algorithm_name) + + Utils.validate_query_params! args + transport.perform_request(method, url, args, body, headers).body + end + end + end + end +end diff --git a/lib/opensearch/api/actions/ml/get_agent.rb b/lib/opensearch/api/actions/ml/get_agent.rb new file mode 100644 index 000000000..8119bb31e --- /dev/null +++ b/lib/opensearch/api/actions/ml/get_agent.rb @@ -0,0 +1,36 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# The OpenSearch Contributors require contributions made to +# this file be licensed under the Apache-2.0 license or a +# compatible open source license. + +# This file is generated from the OpenSearch REST API spec. +# Do not modify it by hand. Instead, modify the generator or the spec. + +# frozen_string_literal: true + +module OpenSearch + module API + module Ml + module Actions + # Get an agent. + # + # @option args [String] :agent_id *Required* + def get_agent(args = {}) + args = Utils.clone_and_normalize_arguments(args) + raise ArgumentError, "Required argument 'agent_id' missing" if args['agent_id'].nil? + + _agent_id = args.delete('agent_id') + + headers = args.delete('headers') || {} + body = args.delete('body') + method = 'GET' + url = Utils.build_url('_plugins/_ml/agents', _agent_id) + + Utils.validate_query_params! args + transport.perform_request(method, url, args, body, headers).body + end + end + end + end +end diff --git a/lib/opensearch/api/actions/ml/get_all_memories.rb b/lib/opensearch/api/actions/ml/get_all_memories.rb new file mode 100644 index 000000000..44ee1d0e5 --- /dev/null +++ b/lib/opensearch/api/actions/ml/get_all_memories.rb @@ -0,0 +1,38 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# The OpenSearch Contributors require contributions made to +# this file be licensed under the Apache-2.0 license or a +# compatible open source license. + +# This file is generated from the OpenSearch REST API spec. +# Do not modify it by hand. Instead, modify the generator or the spec. + +# frozen_string_literal: true + +module OpenSearch + module API + module Ml + module Actions + # Get all memories. + # + # @option args [Integer] :max_results The maximum number of results to return. If there are fewer memories than the number set in `max_results`, the response returns only the number of memories that exist. Default is `10`. + # @option args [Integer] :next_token The index of the first memory in the sorted list of memories to return. Memories are ordered by `create_time`. For example, if memories `A`, `B`, and `C` exist, `next_token=1` returns memories `B` and `C`. Default is `0` (return all memories). + def get_all_memories(args = {}) + args = Utils.clone_and_normalize_arguments(args) + headers = args.delete('headers') || {} + body = args.delete('body') + method = 'GET' + url = '_plugins/_ml/memory' + + Utils.validate_query_params! args, GET_ALL_MEMORIES_QUERY_PARAMS + transport.perform_request(method, url, args, body, headers).body + end + + GET_ALL_MEMORIES_QUERY_PARAMS = Set.new(%w[ + max_results + next_token + ]).freeze + end + end + end +end diff --git a/lib/opensearch/api/actions/ml/get_all_messages.rb b/lib/opensearch/api/actions/ml/get_all_messages.rb new file mode 100644 index 000000000..fccbdd9d0 --- /dev/null +++ b/lib/opensearch/api/actions/ml/get_all_messages.rb @@ -0,0 +1,43 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# The OpenSearch Contributors require contributions made to +# this file be licensed under the Apache-2.0 license or a +# compatible open source license. + +# This file is generated from the OpenSearch REST API spec. +# Do not modify it by hand. Instead, modify the generator or the spec. + +# frozen_string_literal: true + +module OpenSearch + module API + module Ml + module Actions + # Get all messages in a memory. + # + # @option args [String] :memory_id *Required* + # @option args [Integer] :max_results + # @option args [Integer] :next_token + def get_all_messages(args = {}) + args = Utils.clone_and_normalize_arguments(args) + raise ArgumentError, "Required argument 'memory_id' missing" if args['memory_id'].nil? + + _memory_id = args.delete('memory_id') + + headers = args.delete('headers') || {} + body = args.delete('body') + method = 'GET' + url = Utils.build_url('_plugins/_ml/memory', _memory_id, 'messages') + + Utils.validate_query_params! args, GET_ALL_MESSAGES_QUERY_PARAMS + transport.perform_request(method, url, args, body, headers).body + end + + GET_ALL_MESSAGES_QUERY_PARAMS = Set.new(%w[ + max_results + next_token + ]).freeze + end + end + end +end diff --git a/lib/opensearch/api/actions/ml/get_all_tools.rb b/lib/opensearch/api/actions/ml/get_all_tools.rb new file mode 100644 index 000000000..6a31fa80b --- /dev/null +++ b/lib/opensearch/api/actions/ml/get_all_tools.rb @@ -0,0 +1,31 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# The OpenSearch Contributors require contributions made to +# this file be licensed under the Apache-2.0 license or a +# compatible open source license. + +# This file is generated from the OpenSearch REST API spec. +# Do not modify it by hand. Instead, modify the generator or the spec. + +# frozen_string_literal: true + +module OpenSearch + module API + module Ml + module Actions + # Get tools. + # + def get_all_tools(args = {}) + args = Utils.clone_and_normalize_arguments(args) + headers = args.delete('headers') || {} + body = args.delete('body') + method = 'GET' + url = '_plugins/_ml/tools' + + Utils.validate_query_params! args + transport.perform_request(method, url, args, body, headers).body + end + end + end + end +end diff --git a/lib/opensearch/api/actions/ml/get_connector.rb b/lib/opensearch/api/actions/ml/get_connector.rb new file mode 100644 index 000000000..7ae8faa9b --- /dev/null +++ b/lib/opensearch/api/actions/ml/get_connector.rb @@ -0,0 +1,36 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# The OpenSearch Contributors require contributions made to +# this file be licensed under the Apache-2.0 license or a +# compatible open source license. + +# This file is generated from the OpenSearch REST API spec. +# Do not modify it by hand. Instead, modify the generator or the spec. + +# frozen_string_literal: true + +module OpenSearch + module API + module Ml + module Actions + # Retrieves a standalone connector. + # + # @option args [String] :connector_id *Required* + def get_connector(args = {}) + args = Utils.clone_and_normalize_arguments(args) + raise ArgumentError, "Required argument 'connector_id' missing" if args['connector_id'].nil? + + _connector_id = args.delete('connector_id') + + headers = args.delete('headers') || {} + body = args.delete('body') + method = 'GET' + url = Utils.build_url('_plugins/_ml/connectors', _connector_id) + + Utils.validate_query_params! args + transport.perform_request(method, url, args, body, headers).body + end + end + end + end +end diff --git a/lib/opensearch/api/actions/ml/get_controller.rb b/lib/opensearch/api/actions/ml/get_controller.rb new file mode 100644 index 000000000..8f2da8e4b --- /dev/null +++ b/lib/opensearch/api/actions/ml/get_controller.rb @@ -0,0 +1,36 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# The OpenSearch Contributors require contributions made to +# this file be licensed under the Apache-2.0 license or a +# compatible open source license. + +# This file is generated from the OpenSearch REST API spec. +# Do not modify it by hand. Instead, modify the generator or the spec. + +# frozen_string_literal: true + +module OpenSearch + module API + module Ml + module Actions + # Retrieves a controller. + # + # @option args [String] :model_id *Required* + def get_controller(args = {}) + args = Utils.clone_and_normalize_arguments(args) + raise ArgumentError, "Required argument 'model_id' missing" if args['model_id'].nil? + + _model_id = args.delete('model_id') + + headers = args.delete('headers') || {} + body = args.delete('body') + method = 'GET' + url = Utils.build_url('_plugins/_ml/controllers', _model_id) + + Utils.validate_query_params! args + transport.perform_request(method, url, args, body, headers).body + end + end + end + end +end diff --git a/lib/opensearch/api/actions/ml/get_memory.rb b/lib/opensearch/api/actions/ml/get_memory.rb new file mode 100644 index 000000000..7c2f841bf --- /dev/null +++ b/lib/opensearch/api/actions/ml/get_memory.rb @@ -0,0 +1,36 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# The OpenSearch Contributors require contributions made to +# this file be licensed under the Apache-2.0 license or a +# compatible open source license. + +# This file is generated from the OpenSearch REST API spec. +# Do not modify it by hand. Instead, modify the generator or the spec. + +# frozen_string_literal: true + +module OpenSearch + module API + module Ml + module Actions + # Get a memory. + # + # @option args [String] :memory_id *Required* + def get_memory(args = {}) + args = Utils.clone_and_normalize_arguments(args) + raise ArgumentError, "Required argument 'memory_id' missing" if args['memory_id'].nil? + + _memory_id = args.delete('memory_id') + + headers = args.delete('headers') || {} + body = args.delete('body') + method = 'GET' + url = Utils.build_url('_plugins/_ml/memory', _memory_id) + + Utils.validate_query_params! args + transport.perform_request(method, url, args, body, headers).body + end + end + end + end +end diff --git a/lib/opensearch/api/actions/ml/get_message.rb b/lib/opensearch/api/actions/ml/get_message.rb new file mode 100644 index 000000000..4cd0a563f --- /dev/null +++ b/lib/opensearch/api/actions/ml/get_message.rb @@ -0,0 +1,36 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# The OpenSearch Contributors require contributions made to +# this file be licensed under the Apache-2.0 license or a +# compatible open source license. + +# This file is generated from the OpenSearch REST API spec. +# Do not modify it by hand. Instead, modify the generator or the spec. + +# frozen_string_literal: true + +module OpenSearch + module API + module Ml + module Actions + # Get a message. + # + # @option args [String] :message_id *Required* + def get_message(args = {}) + args = Utils.clone_and_normalize_arguments(args) + raise ArgumentError, "Required argument 'message_id' missing" if args['message_id'].nil? + + _message_id = args.delete('message_id') + + headers = args.delete('headers') || {} + body = args.delete('body') + method = 'GET' + url = Utils.build_url('_plugins/_ml/memory/message', _message_id) + + Utils.validate_query_params! args + transport.perform_request(method, url, args, body, headers).body + end + end + end + end +end diff --git a/lib/opensearch/api/actions/ml/get_message_traces.rb b/lib/opensearch/api/actions/ml/get_message_traces.rb new file mode 100644 index 000000000..9f31df6b7 --- /dev/null +++ b/lib/opensearch/api/actions/ml/get_message_traces.rb @@ -0,0 +1,43 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# The OpenSearch Contributors require contributions made to +# this file be licensed under the Apache-2.0 license or a +# compatible open source license. + +# This file is generated from the OpenSearch REST API spec. +# Do not modify it by hand. Instead, modify the generator or the spec. + +# frozen_string_literal: true + +module OpenSearch + module API + module Ml + module Actions + # Get a message traces. + # + # @option args [String] :message_id *Required* + # @option args [Integer] :max_results + # @option args [Integer] :next_token + def get_message_traces(args = {}) + args = Utils.clone_and_normalize_arguments(args) + raise ArgumentError, "Required argument 'message_id' missing" if args['message_id'].nil? + + _message_id = args.delete('message_id') + + headers = args.delete('headers') || {} + body = args.delete('body') + method = 'GET' + url = Utils.build_url('_plugins/_ml/memory/message', _message_id, 'traces') + + Utils.validate_query_params! args, GET_MESSAGE_TRACES_QUERY_PARAMS + transport.perform_request(method, url, args, body, headers).body + end + + GET_MESSAGE_TRACES_QUERY_PARAMS = Set.new(%w[ + max_results + next_token + ]).freeze + end + end + end +end diff --git a/lib/opensearch/api/actions/ml/get_model.rb b/lib/opensearch/api/actions/ml/get_model.rb new file mode 100644 index 000000000..d88977800 --- /dev/null +++ b/lib/opensearch/api/actions/ml/get_model.rb @@ -0,0 +1,36 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# The OpenSearch Contributors require contributions made to +# this file be licensed under the Apache-2.0 license or a +# compatible open source license. + +# This file is generated from the OpenSearch REST API spec. +# Do not modify it by hand. Instead, modify the generator or the spec. + +# frozen_string_literal: true + +module OpenSearch + module API + module Ml + module Actions + # Retrieves a model. + # + # @option args [String] :model_id *Required* + def get_model(args = {}) + args = Utils.clone_and_normalize_arguments(args) + raise ArgumentError, "Required argument 'model_id' missing" if args['model_id'].nil? + + _model_id = args.delete('model_id') + + headers = args.delete('headers') || {} + body = args.delete('body') + method = 'GET' + url = Utils.build_url('_plugins/_ml/models', _model_id) + + Utils.validate_query_params! args + transport.perform_request(method, url, args, body, headers).body + end + end + end + end +end diff --git a/lib/opensearch/api/actions/ml/get_profile.rb b/lib/opensearch/api/actions/ml/get_profile.rb new file mode 100644 index 000000000..478ce42f5 --- /dev/null +++ b/lib/opensearch/api/actions/ml/get_profile.rb @@ -0,0 +1,32 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# The OpenSearch Contributors require contributions made to +# this file be licensed under the Apache-2.0 license or a +# compatible open source license. + +# This file is generated from the OpenSearch REST API spec. +# Do not modify it by hand. Instead, modify the generator or the spec. + +# frozen_string_literal: true + +module OpenSearch + module API + module Ml + module Actions + # Get a profile. + # + # @option args [Hash] :body + def get_profile(args = {}) + args = Utils.clone_and_normalize_arguments(args) + headers = args.delete('headers') || {} + body = args.delete('body') + method = 'GET' + url = '_plugins/_ml/profile' + + Utils.validate_query_params! args + transport.perform_request(method, url, args, body, headers).body + end + end + end + end +end diff --git a/lib/opensearch/api/actions/ml/get_profile_models.rb b/lib/opensearch/api/actions/ml/get_profile_models.rb new file mode 100644 index 000000000..94d759908 --- /dev/null +++ b/lib/opensearch/api/actions/ml/get_profile_models.rb @@ -0,0 +1,35 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# The OpenSearch Contributors require contributions made to +# this file be licensed under the Apache-2.0 license or a +# compatible open source license. + +# This file is generated from the OpenSearch REST API spec. +# Do not modify it by hand. Instead, modify the generator or the spec. + +# frozen_string_literal: true + +module OpenSearch + module API + module Ml + module Actions + # Get a profile models. + # + # @option args [String] :model_id + # @option args [Hash] :body + def get_profile_models(args = {}) + args = Utils.clone_and_normalize_arguments(args) + _model_id = args.delete('model_id') + + headers = args.delete('headers') || {} + body = args.delete('body') + method = 'GET' + url = Utils.build_url('_plugins/_ml/profile/models', _model_id) + + Utils.validate_query_params! args + transport.perform_request(method, url, args, body, headers).body + end + end + end + end +end diff --git a/lib/opensearch/api/actions/ml/get_profile_tasks.rb b/lib/opensearch/api/actions/ml/get_profile_tasks.rb new file mode 100644 index 000000000..023bab6f4 --- /dev/null +++ b/lib/opensearch/api/actions/ml/get_profile_tasks.rb @@ -0,0 +1,35 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# The OpenSearch Contributors require contributions made to +# this file be licensed under the Apache-2.0 license or a +# compatible open source license. + +# This file is generated from the OpenSearch REST API spec. +# Do not modify it by hand. Instead, modify the generator or the spec. + +# frozen_string_literal: true + +module OpenSearch + module API + module Ml + module Actions + # Get a profile tasks. + # + # @option args [String] :task_id + # @option args [Hash] :body + def get_profile_tasks(args = {}) + args = Utils.clone_and_normalize_arguments(args) + _task_id = args.delete('task_id') + + headers = args.delete('headers') || {} + body = args.delete('body') + method = 'GET' + url = Utils.build_url('_plugins/_ml/profile/tasks', _task_id) + + Utils.validate_query_params! args + transport.perform_request(method, url, args, body, headers).body + end + end + end + end +end diff --git a/lib/opensearch/api/actions/ml/get_stats.rb b/lib/opensearch/api/actions/ml/get_stats.rb new file mode 100644 index 000000000..3b753c393 --- /dev/null +++ b/lib/opensearch/api/actions/ml/get_stats.rb @@ -0,0 +1,36 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# The OpenSearch Contributors require contributions made to +# this file be licensed under the Apache-2.0 license or a +# compatible open source license. + +# This file is generated from the OpenSearch REST API spec. +# Do not modify it by hand. Instead, modify the generator or the spec. + +# frozen_string_literal: true + +module OpenSearch + module API + module Ml + module Actions + # Get stats. + # + # @option args [String] :node_id + # @option args [String] :stat + def get_stats(args = {}) + args = Utils.clone_and_normalize_arguments(args) + _node_id = args.delete('node_id') + _stat = args.delete('stat') + + headers = args.delete('headers') || {} + body = args.delete('body') + method = 'GET' + url = Utils.build_url('_plugins/_ml', _node_id, 'stats', _stat) + + Utils.validate_query_params! args + transport.perform_request(method, url, args, body, headers).body + end + end + end + end +end diff --git a/lib/opensearch/api/actions/ml/get_tool.rb b/lib/opensearch/api/actions/ml/get_tool.rb new file mode 100644 index 000000000..5eeb715d5 --- /dev/null +++ b/lib/opensearch/api/actions/ml/get_tool.rb @@ -0,0 +1,36 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# The OpenSearch Contributors require contributions made to +# this file be licensed under the Apache-2.0 license or a +# compatible open source license. + +# This file is generated from the OpenSearch REST API spec. +# Do not modify it by hand. Instead, modify the generator or the spec. + +# frozen_string_literal: true + +module OpenSearch + module API + module Ml + module Actions + # Get tools. + # + # @option args [String] :tool_name *Required* + def get_tool(args = {}) + args = Utils.clone_and_normalize_arguments(args) + raise ArgumentError, "Required argument 'tool_name' missing" if args['tool_name'].nil? + + _tool_name = args.delete('tool_name') + + headers = args.delete('headers') || {} + body = args.delete('body') + method = 'GET' + url = Utils.build_url('_plugins/_ml/tools', _tool_name) + + Utils.validate_query_params! args + transport.perform_request(method, url, args, body, headers).body + end + end + end + end +end diff --git a/lib/opensearch/api/actions/ml/load_model.rb b/lib/opensearch/api/actions/ml/load_model.rb new file mode 100644 index 000000000..7dc84c09e --- /dev/null +++ b/lib/opensearch/api/actions/ml/load_model.rb @@ -0,0 +1,36 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# The OpenSearch Contributors require contributions made to +# this file be licensed under the Apache-2.0 license or a +# compatible open source license. + +# This file is generated from the OpenSearch REST API spec. +# Do not modify it by hand. Instead, modify the generator or the spec. + +# frozen_string_literal: true + +module OpenSearch + module API + module Ml + module Actions + # Deploys a model. + # + # @option args [String] :model_id *Required* + def load_model(args = {}) + args = Utils.clone_and_normalize_arguments(args) + raise ArgumentError, "Required argument 'model_id' missing" if args['model_id'].nil? + + _model_id = args.delete('model_id') + + headers = args.delete('headers') || {} + body = args.delete('body') + method = 'POST' + url = Utils.build_url('_plugins/_ml/models', _model_id, '_load') + + Utils.validate_query_params! args + transport.perform_request(method, url, args, body, headers).body + end + end + end + end +end diff --git a/lib/opensearch/api/actions/ml/predict.rb b/lib/opensearch/api/actions/ml/predict.rb new file mode 100644 index 000000000..7d9999517 --- /dev/null +++ b/lib/opensearch/api/actions/ml/predict.rb @@ -0,0 +1,40 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# The OpenSearch Contributors require contributions made to +# this file be licensed under the Apache-2.0 license or a +# compatible open source license. + +# This file is generated from the OpenSearch REST API spec. +# Do not modify it by hand. Instead, modify the generator or the spec. + +# frozen_string_literal: true + +module OpenSearch + module API + module Ml + module Actions + # Predicts new data with trained model. + # + # @option args [String] :algorithm_name *Required* + # @option args [String] :model_id *Required* + # @option args [Hash] :body + def predict(args = {}) + args = Utils.clone_and_normalize_arguments(args) + raise ArgumentError, "Required argument 'algorithm_name' missing" if args['algorithm_name'].nil? + raise ArgumentError, "Required argument 'model_id' missing" if args['model_id'].nil? + + _algorithm_name = args.delete('algorithm_name') + _model_id = args.delete('model_id') + + headers = args.delete('headers') || {} + body = args.delete('body') + method = 'POST' + url = Utils.build_url('_plugins/_ml/_predict', _algorithm_name, _model_id) + + Utils.validate_query_params! args + transport.perform_request(method, url, args, body, headers).body + end + end + end + end +end diff --git a/lib/opensearch/api/actions/ml/predict_model.rb b/lib/opensearch/api/actions/ml/predict_model.rb new file mode 100644 index 000000000..88aff35d8 --- /dev/null +++ b/lib/opensearch/api/actions/ml/predict_model.rb @@ -0,0 +1,37 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# The OpenSearch Contributors require contributions made to +# this file be licensed under the Apache-2.0 license or a +# compatible open source license. + +# This file is generated from the OpenSearch REST API spec. +# Do not modify it by hand. Instead, modify the generator or the spec. + +# frozen_string_literal: true + +module OpenSearch + module API + module Ml + module Actions + # Predicts a model. + # + # @option args [String] :model_id *Required* + # @option args [Hash] :body + def predict_model(args = {}) + args = Utils.clone_and_normalize_arguments(args) + raise ArgumentError, "Required argument 'model_id' missing" if args['model_id'].nil? + + _model_id = args.delete('model_id') + + headers = args.delete('headers') || {} + body = args.delete('body') + method = 'POST' + url = Utils.build_url('_plugins/_ml/models', _model_id, '_predict') + + Utils.validate_query_params! args + transport.perform_request(method, url, args, body, headers).body + end + end + end + end +end diff --git a/lib/opensearch/api/actions/ml/register_model_meta.rb b/lib/opensearch/api/actions/ml/register_model_meta.rb new file mode 100644 index 000000000..f4fc4a4e7 --- /dev/null +++ b/lib/opensearch/api/actions/ml/register_model_meta.rb @@ -0,0 +1,32 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# The OpenSearch Contributors require contributions made to +# this file be licensed under the Apache-2.0 license or a +# compatible open source license. + +# This file is generated from the OpenSearch REST API spec. +# Do not modify it by hand. Instead, modify the generator or the spec. + +# frozen_string_literal: true + +module OpenSearch + module API + module Ml + module Actions + # Registers model metadata. + # + # @option args [Hash] :body + def register_model_meta(args = {}) + args = Utils.clone_and_normalize_arguments(args) + headers = args.delete('headers') || {} + body = args.delete('body') + method = 'POST' + url = '_plugins/_ml/models/_register_meta' + + Utils.validate_query_params! args + transport.perform_request(method, url, args, body, headers).body + end + end + end + end +end diff --git a/lib/opensearch/api/actions/ml/search_agents.rb b/lib/opensearch/api/actions/ml/search_agents.rb new file mode 100644 index 000000000..61b3b098a --- /dev/null +++ b/lib/opensearch/api/actions/ml/search_agents.rb @@ -0,0 +1,32 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# The OpenSearch Contributors require contributions made to +# this file be licensed under the Apache-2.0 license or a +# compatible open source license. + +# This file is generated from the OpenSearch REST API spec. +# Do not modify it by hand. Instead, modify the generator or the spec. + +# frozen_string_literal: true + +module OpenSearch + module API + module Ml + module Actions + # Search agents. + # + # @option args [Hash] :body + def search_agents(args = {}) + args = Utils.clone_and_normalize_arguments(args) + headers = args.delete('headers') || {} + body = args.delete('body') + method = body ? 'POST' : 'GET' + url = '_plugins/_ml/agents/_search' + + Utils.validate_query_params! args + transport.perform_request(method, url, args, body, headers).body + end + end + end + end +end diff --git a/lib/opensearch/api/actions/ml/search_connectors.rb b/lib/opensearch/api/actions/ml/search_connectors.rb new file mode 100644 index 000000000..a81fac071 --- /dev/null +++ b/lib/opensearch/api/actions/ml/search_connectors.rb @@ -0,0 +1,32 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# The OpenSearch Contributors require contributions made to +# this file be licensed under the Apache-2.0 license or a +# compatible open source license. + +# This file is generated from the OpenSearch REST API spec. +# Do not modify it by hand. Instead, modify the generator or the spec. + +# frozen_string_literal: true + +module OpenSearch + module API + module Ml + module Actions + # Searches for standalone connectors. + # + # @option args [Hash] :body + def search_connectors(args = {}) + args = Utils.clone_and_normalize_arguments(args) + headers = args.delete('headers') || {} + body = args.delete('body') + method = body ? 'POST' : 'GET' + url = '_plugins/_ml/connectors/_search' + + Utils.validate_query_params! args + transport.perform_request(method, url, args, body, headers).body + end + end + end + end +end diff --git a/lib/opensearch/api/actions/ml/search_memory.rb b/lib/opensearch/api/actions/ml/search_memory.rb new file mode 100644 index 000000000..ac0e05708 --- /dev/null +++ b/lib/opensearch/api/actions/ml/search_memory.rb @@ -0,0 +1,32 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# The OpenSearch Contributors require contributions made to +# this file be licensed under the Apache-2.0 license or a +# compatible open source license. + +# This file is generated from the OpenSearch REST API spec. +# Do not modify it by hand. Instead, modify the generator or the spec. + +# frozen_string_literal: true + +module OpenSearch + module API + module Ml + module Actions + # Search memory. + # + # @option args [Hash] :body + def search_memory(args = {}) + args = Utils.clone_and_normalize_arguments(args) + headers = args.delete('headers') || {} + body = args.delete('body') + method = body ? 'POST' : 'GET' + url = '_plugins/_ml/memory/_search' + + Utils.validate_query_params! args + transport.perform_request(method, url, args, body, headers).body + end + end + end + end +end diff --git a/lib/opensearch/api/actions/ml/search_message.rb b/lib/opensearch/api/actions/ml/search_message.rb new file mode 100644 index 000000000..61e59ff5e --- /dev/null +++ b/lib/opensearch/api/actions/ml/search_message.rb @@ -0,0 +1,37 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# The OpenSearch Contributors require contributions made to +# this file be licensed under the Apache-2.0 license or a +# compatible open source license. + +# This file is generated from the OpenSearch REST API spec. +# Do not modify it by hand. Instead, modify the generator or the spec. + +# frozen_string_literal: true + +module OpenSearch + module API + module Ml + module Actions + # Search messages. + # + # @option args [String] :memory_id *Required* + # @option args [Hash] :body + def search_message(args = {}) + args = Utils.clone_and_normalize_arguments(args) + raise ArgumentError, "Required argument 'memory_id' missing" if args['memory_id'].nil? + + _memory_id = args.delete('memory_id') + + headers = args.delete('headers') || {} + body = args.delete('body') + method = body ? 'POST' : 'GET' + url = Utils.build_url('_plugins/_ml/memory', _memory_id, '_search') + + Utils.validate_query_params! args + transport.perform_request(method, url, args, body, headers).body + end + end + end + end +end diff --git a/lib/opensearch/api/actions/ml/search_model_group.rb b/lib/opensearch/api/actions/ml/search_model_group.rb new file mode 100644 index 000000000..9e683108b --- /dev/null +++ b/lib/opensearch/api/actions/ml/search_model_group.rb @@ -0,0 +1,32 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# The OpenSearch Contributors require contributions made to +# this file be licensed under the Apache-2.0 license or a +# compatible open source license. + +# This file is generated from the OpenSearch REST API spec. +# Do not modify it by hand. Instead, modify the generator or the spec. + +# frozen_string_literal: true + +module OpenSearch + module API + module Ml + module Actions + # Searches for model groups. + # + # @option args [Hash] :body + def search_model_group(args = {}) + args = Utils.clone_and_normalize_arguments(args) + headers = args.delete('headers') || {} + body = args.delete('body') + method = body ? 'POST' : 'GET' + url = '_plugins/_ml/model_groups/_search' + + Utils.validate_query_params! args + transport.perform_request(method, url, args, body, headers).body + end + end + end + end +end diff --git a/lib/opensearch/api/actions/ml/search_models.rb b/lib/opensearch/api/actions/ml/search_models.rb index 3bf8b76be..ee6fda6d4 100644 --- a/lib/opensearch/api/actions/ml/search_models.rb +++ b/lib/opensearch/api/actions/ml/search_models.rb @@ -20,7 +20,7 @@ def search_models(args = {}) args = Utils.clone_and_normalize_arguments(args) headers = args.delete('headers') || {} body = args.delete('body') - method = 'GET' + method = body ? 'POST' : 'GET' url = '_plugins/_ml/models/_search' Utils.validate_query_params! args diff --git a/lib/opensearch/api/actions/ml/search_tasks.rb b/lib/opensearch/api/actions/ml/search_tasks.rb new file mode 100644 index 000000000..c38da26a8 --- /dev/null +++ b/lib/opensearch/api/actions/ml/search_tasks.rb @@ -0,0 +1,32 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# The OpenSearch Contributors require contributions made to +# this file be licensed under the Apache-2.0 license or a +# compatible open source license. + +# This file is generated from the OpenSearch REST API spec. +# Do not modify it by hand. Instead, modify the generator or the spec. + +# frozen_string_literal: true + +module OpenSearch + module API + module Ml + module Actions + # Searches for tasks. + # + # @option args [Hash] :body + def search_tasks(args = {}) + args = Utils.clone_and_normalize_arguments(args) + headers = args.delete('headers') || {} + body = args.delete('body') + method = body ? 'POST' : 'GET' + url = '_plugins/_ml/tasks/_search' + + Utils.validate_query_params! args + transport.perform_request(method, url, args, body, headers).body + end + end + end + end +end diff --git a/lib/opensearch/api/actions/ml/train.rb b/lib/opensearch/api/actions/ml/train.rb new file mode 100644 index 000000000..0c96c3500 --- /dev/null +++ b/lib/opensearch/api/actions/ml/train.rb @@ -0,0 +1,37 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# The OpenSearch Contributors require contributions made to +# this file be licensed under the Apache-2.0 license or a +# compatible open source license. + +# This file is generated from the OpenSearch REST API spec. +# Do not modify it by hand. Instead, modify the generator or the spec. + +# frozen_string_literal: true + +module OpenSearch + module API + module Ml + module Actions + # Trains a model synchronously. + # + # @option args [String] :algorithm_name *Required* + # @option args [Hash] :body + def train(args = {}) + args = Utils.clone_and_normalize_arguments(args) + raise ArgumentError, "Required argument 'algorithm_name' missing" if args['algorithm_name'].nil? + + _algorithm_name = args.delete('algorithm_name') + + headers = args.delete('headers') || {} + body = args.delete('body') + method = 'POST' + url = Utils.build_url('_plugins/_ml/_train', _algorithm_name) + + Utils.validate_query_params! args + transport.perform_request(method, url, args, body, headers).body + end + end + end + end +end diff --git a/lib/opensearch/api/actions/ml/train_predict.rb b/lib/opensearch/api/actions/ml/train_predict.rb new file mode 100644 index 000000000..e54160f8d --- /dev/null +++ b/lib/opensearch/api/actions/ml/train_predict.rb @@ -0,0 +1,37 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# The OpenSearch Contributors require contributions made to +# this file be licensed under the Apache-2.0 license or a +# compatible open source license. + +# This file is generated from the OpenSearch REST API spec. +# Do not modify it by hand. Instead, modify the generator or the spec. + +# frozen_string_literal: true + +module OpenSearch + module API + module Ml + module Actions + # Trains a model and predicts against the same training dataset. + # + # @option args [String] :algorithm_name *Required* + # @option args [Hash] :body + def train_predict(args = {}) + args = Utils.clone_and_normalize_arguments(args) + raise ArgumentError, "Required argument 'algorithm_name' missing" if args['algorithm_name'].nil? + + _algorithm_name = args.delete('algorithm_name') + + headers = args.delete('headers') || {} + body = args.delete('body') + method = 'POST' + url = Utils.build_url('_plugins/_ml/_train_predict', _algorithm_name) + + Utils.validate_query_params! args + transport.perform_request(method, url, args, body, headers).body + end + end + end + end +end diff --git a/lib/opensearch/api/actions/ml/undeploy_model.rb b/lib/opensearch/api/actions/ml/undeploy_model.rb index 93b25228b..a8965f059 100644 --- a/lib/opensearch/api/actions/ml/undeploy_model.rb +++ b/lib/opensearch/api/actions/ml/undeploy_model.rb @@ -15,11 +15,10 @@ module Ml module Actions # Undeploys a model. # - # @option args [String] :model_id *Required* + # @option args [String] :model_id + # @option args [Hash] :body def undeploy_model(args = {}) args = Utils.clone_and_normalize_arguments(args) - raise ArgumentError, "Required argument 'model_id' missing" if args['model_id'].nil? - _model_id = args.delete('model_id') headers = args.delete('headers') || {} diff --git a/lib/opensearch/api/actions/ml/unload_model.rb b/lib/opensearch/api/actions/ml/unload_model.rb new file mode 100644 index 000000000..4cc12414a --- /dev/null +++ b/lib/opensearch/api/actions/ml/unload_model.rb @@ -0,0 +1,35 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# The OpenSearch Contributors require contributions made to +# this file be licensed under the Apache-2.0 license or a +# compatible open source license. + +# This file is generated from the OpenSearch REST API spec. +# Do not modify it by hand. Instead, modify the generator or the spec. + +# frozen_string_literal: true + +module OpenSearch + module API + module Ml + module Actions + # Unloads a model. + # + # @option args [String] :model_id + # @option args [Hash] :body + def unload_model(args = {}) + args = Utils.clone_and_normalize_arguments(args) + _model_id = args.delete('model_id') + + headers = args.delete('headers') || {} + body = args.delete('body') + method = 'POST' + url = Utils.build_url('_plugins/_ml/models', _model_id, '_unload') + + Utils.validate_query_params! args + transport.perform_request(method, url, args, body, headers).body + end + end + end + end +end diff --git a/lib/opensearch/api/actions/ml/update_connector.rb b/lib/opensearch/api/actions/ml/update_connector.rb new file mode 100644 index 000000000..904cecda0 --- /dev/null +++ b/lib/opensearch/api/actions/ml/update_connector.rb @@ -0,0 +1,37 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# The OpenSearch Contributors require contributions made to +# this file be licensed under the Apache-2.0 license or a +# compatible open source license. + +# This file is generated from the OpenSearch REST API spec. +# Do not modify it by hand. Instead, modify the generator or the spec. + +# frozen_string_literal: true + +module OpenSearch + module API + module Ml + module Actions + # Updates a standalone connector. + # + # @option args [String] :connector_id *Required* + # @option args [Hash] :body + def update_connector(args = {}) + args = Utils.clone_and_normalize_arguments(args) + raise ArgumentError, "Required argument 'connector_id' missing" if args['connector_id'].nil? + + _connector_id = args.delete('connector_id') + + headers = args.delete('headers') || {} + body = args.delete('body') + method = 'PUT' + url = Utils.build_url('_plugins/_ml/connectors', _connector_id) + + Utils.validate_query_params! args + transport.perform_request(method, url, args, body, headers).body + end + end + end + end +end diff --git a/lib/opensearch/api/actions/ml/update_controller.rb b/lib/opensearch/api/actions/ml/update_controller.rb new file mode 100644 index 000000000..dbddc01f3 --- /dev/null +++ b/lib/opensearch/api/actions/ml/update_controller.rb @@ -0,0 +1,37 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# The OpenSearch Contributors require contributions made to +# this file be licensed under the Apache-2.0 license or a +# compatible open source license. + +# This file is generated from the OpenSearch REST API spec. +# Do not modify it by hand. Instead, modify the generator or the spec. + +# frozen_string_literal: true + +module OpenSearch + module API + module Ml + module Actions + # Updates a controller. + # + # @option args [String] :model_id *Required* + # @option args [Hash] :body + def update_controller(args = {}) + args = Utils.clone_and_normalize_arguments(args) + raise ArgumentError, "Required argument 'model_id' missing" if args['model_id'].nil? + + _model_id = args.delete('model_id') + + headers = args.delete('headers') || {} + body = args.delete('body') + method = 'PUT' + url = Utils.build_url('_plugins/_ml/controllers', _model_id) + + Utils.validate_query_params! args + transport.perform_request(method, url, args, body, headers).body + end + end + end + end +end diff --git a/lib/opensearch/api/actions/ml/update_memory.rb b/lib/opensearch/api/actions/ml/update_memory.rb new file mode 100644 index 000000000..354c38947 --- /dev/null +++ b/lib/opensearch/api/actions/ml/update_memory.rb @@ -0,0 +1,37 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# The OpenSearch Contributors require contributions made to +# this file be licensed under the Apache-2.0 license or a +# compatible open source license. + +# This file is generated from the OpenSearch REST API spec. +# Do not modify it by hand. Instead, modify the generator or the spec. + +# frozen_string_literal: true + +module OpenSearch + module API + module Ml + module Actions + # Update a memory. + # + # @option args [String] :memory_id *Required* + # @option args [Hash] :body + def update_memory(args = {}) + args = Utils.clone_and_normalize_arguments(args) + raise ArgumentError, "Required argument 'memory_id' missing" if args['memory_id'].nil? + + _memory_id = args.delete('memory_id') + + headers = args.delete('headers') || {} + body = args.delete('body') + method = 'PUT' + url = Utils.build_url('_plugins/_ml/memory', _memory_id) + + Utils.validate_query_params! args + transport.perform_request(method, url, args, body, headers).body + end + end + end + end +end diff --git a/lib/opensearch/api/actions/ml/update_message.rb b/lib/opensearch/api/actions/ml/update_message.rb new file mode 100644 index 000000000..378b45299 --- /dev/null +++ b/lib/opensearch/api/actions/ml/update_message.rb @@ -0,0 +1,37 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# The OpenSearch Contributors require contributions made to +# this file be licensed under the Apache-2.0 license or a +# compatible open source license. + +# This file is generated from the OpenSearch REST API spec. +# Do not modify it by hand. Instead, modify the generator or the spec. + +# frozen_string_literal: true + +module OpenSearch + module API + module Ml + module Actions + # Update a message. + # + # @option args [String] :message_id *Required* + # @option args [Hash] :body + def update_message(args = {}) + args = Utils.clone_and_normalize_arguments(args) + raise ArgumentError, "Required argument 'message_id' missing" if args['message_id'].nil? + + _message_id = args.delete('message_id') + + headers = args.delete('headers') || {} + body = args.delete('body') + method = 'PUT' + url = Utils.build_url('_plugins/_ml/memory/message', _message_id) + + Utils.validate_query_params! args + transport.perform_request(method, url, args, body, headers).body + end + end + end + end +end diff --git a/lib/opensearch/api/actions/ml/update_model.rb b/lib/opensearch/api/actions/ml/update_model.rb new file mode 100644 index 000000000..89a6a8aab --- /dev/null +++ b/lib/opensearch/api/actions/ml/update_model.rb @@ -0,0 +1,37 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# The OpenSearch Contributors require contributions made to +# this file be licensed under the Apache-2.0 license or a +# compatible open source license. + +# This file is generated from the OpenSearch REST API spec. +# Do not modify it by hand. Instead, modify the generator or the spec. + +# frozen_string_literal: true + +module OpenSearch + module API + module Ml + module Actions + # Updates a model. + # + # @option args [String] :model_id *Required* + # @option args [Hash] :body + def update_model(args = {}) + args = Utils.clone_and_normalize_arguments(args) + raise ArgumentError, "Required argument 'model_id' missing" if args['model_id'].nil? + + _model_id = args.delete('model_id') + + headers = args.delete('headers') || {} + body = args.delete('body') + method = 'PUT' + url = Utils.build_url('_plugins/_ml/models', _model_id) + + Utils.validate_query_params! args + transport.perform_request(method, url, args, body, headers).body + end + end + end + end +end diff --git a/lib/opensearch/api/actions/ml/update_model_group.rb b/lib/opensearch/api/actions/ml/update_model_group.rb new file mode 100644 index 000000000..58cea154d --- /dev/null +++ b/lib/opensearch/api/actions/ml/update_model_group.rb @@ -0,0 +1,37 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# The OpenSearch Contributors require contributions made to +# this file be licensed under the Apache-2.0 license or a +# compatible open source license. + +# This file is generated from the OpenSearch REST API spec. +# Do not modify it by hand. Instead, modify the generator or the spec. + +# frozen_string_literal: true + +module OpenSearch + module API + module Ml + module Actions + # Updates a model group. + # + # @option args [String] :model_group_id *Required* + # @option args [Hash] :body + def update_model_group(args = {}) + args = Utils.clone_and_normalize_arguments(args) + raise ArgumentError, "Required argument 'model_group_id' missing" if args['model_group_id'].nil? + + _model_group_id = args.delete('model_group_id') + + headers = args.delete('headers') || {} + body = args.delete('body') + method = 'PUT' + url = Utils.build_url('_plugins/_ml/model_groups', _model_group_id) + + Utils.validate_query_params! args + transport.perform_request(method, url, args, body, headers).body + end + end + end + end +end diff --git a/lib/opensearch/api/actions/ml/upload_chunk.rb b/lib/opensearch/api/actions/ml/upload_chunk.rb new file mode 100644 index 000000000..d631dd8ae --- /dev/null +++ b/lib/opensearch/api/actions/ml/upload_chunk.rb @@ -0,0 +1,40 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# The OpenSearch Contributors require contributions made to +# this file be licensed under the Apache-2.0 license or a +# compatible open source license. + +# This file is generated from the OpenSearch REST API spec. +# Do not modify it by hand. Instead, modify the generator or the spec. + +# frozen_string_literal: true + +module OpenSearch + module API + module Ml + module Actions + # Uploads model chunk. + # + # @option args [Integer] :chunk_number *Required* + # @option args [String] :model_id *Required* + # @option args [Hash] :body + def upload_chunk(args = {}) + args = Utils.clone_and_normalize_arguments(args) + raise ArgumentError, "Required argument 'chunk_number' missing" if args['chunk_number'].nil? + raise ArgumentError, "Required argument 'model_id' missing" if args['model_id'].nil? + + _chunk_number = args.delete('chunk_number') + _model_id = args.delete('model_id') + + headers = args.delete('headers') || {} + body = args.delete('body') + method = 'POST' + url = Utils.build_url('_plugins/_ml/models', _model_id, 'upload_chunk', _chunk_number) + + Utils.validate_query_params! args + transport.perform_request(method, url, args, body, headers).body + end + end + end + end +end diff --git a/lib/opensearch/api/actions/ml/upload_model.rb b/lib/opensearch/api/actions/ml/upload_model.rb new file mode 100644 index 000000000..8048ea14c --- /dev/null +++ b/lib/opensearch/api/actions/ml/upload_model.rb @@ -0,0 +1,32 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# The OpenSearch Contributors require contributions made to +# this file be licensed under the Apache-2.0 license or a +# compatible open source license. + +# This file is generated from the OpenSearch REST API spec. +# Do not modify it by hand. Instead, modify the generator or the spec. + +# frozen_string_literal: true + +module OpenSearch + module API + module Ml + module Actions + # Registers a model. + # + # @option args [Hash] :body + def upload_model(args = {}) + args = Utils.clone_and_normalize_arguments(args) + headers = args.delete('headers') || {} + body = args.delete('body') + method = 'POST' + url = '_plugins/_ml/models/_upload' + + Utils.validate_query_params! args + transport.perform_request(method, url, args, body, headers).body + end + end + end + end +end diff --git a/lib/opensearch/api/actions/reindex.rb b/lib/opensearch/api/actions/reindex.rb index c45c59a72..05f06f586 100644 --- a/lib/opensearch/api/actions/reindex.rb +++ b/lib/opensearch/api/actions/reindex.rb @@ -20,8 +20,9 @@ module Actions # @option args [Integer] :max_docs Maximum number of documents to process. By default, all documents. # @option args [Boolean, String] :refresh If `true`, the request refreshes affected shards to make this operation visible to search. # @option args [Float] :requests_per_second (default: 0) The throttle for this request in sub-requests per second. Defaults to no throttle. + # @option args [Boolean] :require_alias # @option args [String] :scroll Specifies how long a consistent view of the index should be maintained for scrolled search. - # @option args [Float, String] :slices The number of slices this task should be divided into. Defaults to 1 slice, meaning the task isn't sliced into subtasks. + # @option args [Integer, String] :slices The number of slices this task should be divided into. Defaults to 1 slice, meaning the task isn't sliced into subtasks. # @option args [String] :timeout Period each indexing waits for automatic index creation, dynamic mapping updates, and waiting for active shards. # @option args [Integer, String] :wait_for_active_shards The number of shard copies that must be active before proceeding with the operation. Set to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`). # @option args [Boolean] :wait_for_completion (default: true) If `true`, the request blocks until the operation is complete. @@ -43,6 +44,7 @@ def reindex(args = {}) max_docs refresh requests_per_second + require_alias scroll slices timeout diff --git a/lib/opensearch/api/actions/reindex_rethrottle.rb b/lib/opensearch/api/actions/reindex_rethrottle.rb index 6b4572c8f..dad7002f9 100644 --- a/lib/opensearch/api/actions/reindex_rethrottle.rb +++ b/lib/opensearch/api/actions/reindex_rethrottle.rb @@ -13,7 +13,7 @@ module OpenSearch module API module Root module Actions - # Changes the number of requests per second for a particular Reindex operation. + # Changes the number of requests per second for a particular reindex operation. # # @option args [String] :task_id *Required* Identifier for the task. # @option args [Float] :requests_per_second The throttle for this request in sub-requests per second. diff --git a/lib/opensearch/api/actions/scroll.rb b/lib/opensearch/api/actions/scroll.rb index 5e2ed45fb..fecf892c5 100644 --- a/lib/opensearch/api/actions/scroll.rb +++ b/lib/opensearch/api/actions/scroll.rb @@ -18,7 +18,7 @@ module Actions # @option args [Boolean] :rest_total_hits_as_int If `true`, the API response's `hit.total` property is returned as an integer. If `false`, the API response's `hit.total` property is returned as an object. # @option args [String] :scroll Period to retain the search context for scrolling. # @option args [String] :scroll_id DEPRECATED The scroll ID for scrolled search - # @option args [Hash] :body The scroll ID if not passed by URL or query parameter. + # @option args [Hash] :body def scroll(args = {}) args = Utils.clone_and_normalize_arguments(args) _scroll_id = args.delete('scroll_id') diff --git a/lib/opensearch/api/actions/search_shards.rb b/lib/opensearch/api/actions/search_shards.rb index a006c5654..df3b09155 100644 --- a/lib/opensearch/api/actions/search_shards.rb +++ b/lib/opensearch/api/actions/search_shards.rb @@ -22,7 +22,6 @@ module Actions # @option args [String] :preference (default: random) Specifies the node or shard the operation should be performed on. Random by default. # @option args [Enumerable, String] :routing Custom value used to route operations to a specific shard. # @option args [Enumerable, String] :index Returns the indexes and shards that a search request would be executed against. - # @option args [Hash] :body Defines the parameters that can be used in the `search_shards` endpoint request. See documentation for supported query syntax. def search_shards(args = {}) args = Utils.clone_and_normalize_arguments(args) _index = args.delete('index') diff --git a/lib/opensearch/api/actions/security/patch_distinguished_name.rb b/lib/opensearch/api/actions/security/patch_distinguished_name.rb index a89e8c332..0341f88ac 100644 --- a/lib/opensearch/api/actions/security/patch_distinguished_name.rb +++ b/lib/opensearch/api/actions/security/patch_distinguished_name.rb @@ -16,15 +16,15 @@ module Actions # Updates a distinguished cluster name for a specific cluster. Only accessible to super-admins and with rest-api permissions when enabled. # # @option args [String] :cluster_name *Required* The cluster name to update `nodesDn` value. - # @option args [Hash] :body + # @option args [Enumerable] :body def patch_distinguished_name(args = {}) args = Utils.clone_and_normalize_arguments(args) raise ArgumentError, "Required argument 'cluster_name' missing" if args['cluster_name'].nil? _cluster_name = args.delete('cluster_name') - headers = args.delete('headers') || {} - body = args.delete('body') + headers = (args.delete('headers') || {}).merge('Content-Type' => 'application/x-ndjson') + body = Utils.bulkify(args.delete('body')) method = 'PATCH' url = Utils.build_url('_plugins/_security/api/nodesdn', _cluster_name) diff --git a/lib/opensearch/api/actions/update_by_query.rb b/lib/opensearch/api/actions/update_by_query.rb index 1c160120d..1f89849ce 100644 --- a/lib/opensearch/api/actions/update_by_query.rb +++ b/lib/opensearch/api/actions/update_by_query.rb @@ -17,7 +17,7 @@ module Actions # for example to pick up a mapping change. # # @option args [Enumerable, String] :index *Required* Comma-separated list of data streams, indexes, and aliases to search. Supports wildcards (`*`). To search all data streams or indexes, omit this parameter or use `*` or `_all`. - # @option args [Enumerable] :_source Set to `true` or `false` to return the `_source` field or not, or a list of fields to return. + # @option args [Boolean, Enumerable, String] :_source Set to `true` or `false` to return the `_source` field or not, or a list of fields to return. # @option args [Enumerable] :_source_excludes List of fields to exclude from the returned `_source` field. # @option args [Enumerable] :_source_includes List of fields to extract and return from the `_source` field. # @option args [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 indexes. This behavior applies even if the request targets other open indexes. For example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`. @@ -43,7 +43,7 @@ module Actions # @option args [String] :search_timeout Explicit timeout for each search request. # @option args [String] :search_type The type of the search operation. Available options: `query_then_fetch`, `dfs_query_then_fetch`. # @option args [Integer] :size Deprecated, use `max_docs` instead. - # @option args [Float, String] :slices The number of slices this task should be divided into. + # @option args [Integer, String] :slices The number of slices this task should be divided into. # @option args [Enumerable] :sort A comma-separated list of : pairs. # @option args [Enumerable] :stats Specific `tag` of the request for logging and statistical purposes. # @option args [Integer] :terminate_after Maximum number of documents to collect for each shard. If a query reaches this limit, OpenSearch terminates the query early. OpenSearch collects documents before sorting. Use with caution. OpenSearch applies this parameter to each shard handling the request. When possible, let OpenSearch perform early termination automatically. Avoid specifying this parameter for requests that target data streams with backing indexes across multiple data tiers.