Skip to content

Commit

Permalink
Updated opensearch-ruby to reflect the latest OpenSearch API spec (20…
Browse files Browse the repository at this point in the history
…25-02-25) (#276)

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: nhtruong <644650+nhtruong@users.noreply.github.com>
  • Loading branch information
opensearch-trigger-bot[bot] and nhtruong authored Feb 25, 2025
1 parent bf7540f commit 0c25b91
Show file tree
Hide file tree
Showing 65 changed files with 82 additions and 82 deletions.
2 changes: 1 addition & 1 deletion lib/opensearch/api/actions/cluster/health.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module Actions
# @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>, 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 [String] :level (default: cluster) Controls the amount of detail included in the cluster health response.
# @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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module Cluster
module Actions
# Creates or updates a component template.
#
# @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] :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.
Expand Down
2 changes: 1 addition & 1 deletion lib/opensearch/api/actions/delete_by_query_rethrottle.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module Root
module Actions
# Changes the number of requests per second for a particular Delete By Query operation.
#
# @option args [Float, String] :task_id *Required* The ID for the task.
# @option args [String] :task_id *Required* The ID for the task.
# @option args [Float] :requests_per_second The throttle for this request in sub-requests per second.
def delete_by_query_rethrottle(args = {})
args = Utils.clone_and_normalize_arguments(args)
Expand Down
6 changes: 3 additions & 3 deletions lib/opensearch/api/actions/security/authinfo.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ module OpenSearch
module API
module Security
module Actions
# Returns the authentication information.
# Returns or updates authentication information for the currently authenticated user.
#
# @option args [String] :auth_type The type of current authentication request.
# @option args [Boolean] :verbose Indicates whether a verbose response should be returned.
# @option args [String] :auth_type The type of the current authentication request.
# @option args [Boolean] :verbose Whether to return a verbose response.
def authinfo(args = {})
args = Utils.clone_and_normalize_arguments(args)
headers = args.delete('headers') || {}
Expand Down
2 changes: 1 addition & 1 deletion lib/opensearch/api/actions/security/authtoken.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module OpenSearch
module API
module Security
module Actions
# Returns the authorization token.
# Returns the authorization token for the current user.
#
def authtoken(args = {})
args = Utils.clone_and_normalize_arguments(args)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module OpenSearch
module API
module Security
module Actions
# Check whether or not an upgrade can be performed and what resources can be updated.
# Checks whether or not an upgrade can be performed and which security resources can be updated.
#
def config_upgrade_check(args = {})
args = Utils.clone_and_normalize_arguments(args)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module OpenSearch
module API
module Security
module Actions
# Helps cluster operator upgrade missing defaults and stale default definitions.
# Assists the cluster operator with upgrading missing default values and stale default definitions.
#
# @option args [Hash] :body
def config_upgrade_perform(args = {})
Expand Down
2 changes: 1 addition & 1 deletion lib/opensearch/api/actions/security/create_allowlist.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module OpenSearch
module API
module Security
module Actions
# Creates or replaces the permitted APIs. Accessible using Super Admin certificate or REST API permission.
# Creates or replaces APIs permitted for users on the allow list. Requires a super admin certificate or REST API permissions.
#
# @option args [Hash] :body *Required*
def create_allowlist(args = {})
Expand Down
2 changes: 1 addition & 1 deletion lib/opensearch/api/actions/security/create_role.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module Security
module Actions
# Creates or replaces the specified role.
#
# @option args [String] :role *Required* The name of the role to be created.
# @option args [String] :role *Required* The name of the role to create.
# @option args [Hash] :body *Required*
def create_role(args = {})
args = Utils.clone_and_normalize_arguments(args)
Expand Down
2 changes: 1 addition & 1 deletion lib/opensearch/api/actions/security/create_role_mapping.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module Security
module Actions
# Creates or replaces the specified role mapping.
#
# @option args [String] :role *Required* The name of the role to create a role mapping for.
# @option args [String] :role *Required* The name of the role for which to create a role mapping.
# @option args [Hash] :body *Required*
def create_role_mapping(args = {})
args = Utils.clone_and_normalize_arguments(args)
Expand Down
2 changes: 1 addition & 1 deletion lib/opensearch/api/actions/security/create_tenant.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module Security
module Actions
# Creates or replaces the specified tenant.
#
# @option args [String] :tenant *Required* The name of the tenant to be created.
# @option args [String] :tenant *Required* The name of the tenant to create.
# @option args [Hash] :body *Required*
def create_tenant(args = {})
args = Utils.clone_and_normalize_arguments(args)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module OpenSearch
module API
module Security
module Actions
# Creates or replaces the multi-tenancy configuration. Only accessible to admins and users with REST API permissions.
# Creates or replaces the multi-tenancy configuration. Requires super admin or REST API permissions.
#
# @option args [Hash] :body *Required*
def create_update_tenancy_config(args = {})
Expand Down
2 changes: 1 addition & 1 deletion lib/opensearch/api/actions/security/create_user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module Security
module Actions
# Creates or replaces the specified user.
#
# @option args [String] :username *Required* The name of the user to be created.
# @option args [String] :username *Required* The name of the user to create.
# @option args [Hash] :body *Required*
def create_user(args = {})
args = Utils.clone_and_normalize_arguments(args)
Expand Down
2 changes: 1 addition & 1 deletion lib/opensearch/api/actions/security/create_user_legacy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module Security
module Actions
# Creates or replaces the specified user. Legacy API.
#
# @option args [String] :username *Required* The name of the user to be created.
# @option args [String] :username *Required* The name of the user to create.
# @option args [Hash] :body *Required*
def create_user_legacy(args = {})
args = Utils.clone_and_normalize_arguments(args)
Expand Down
2 changes: 1 addition & 1 deletion lib/opensearch/api/actions/security/delete_action_group.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module OpenSearch
module API
module Security
module Actions
# Delete a specified action group.
# Deletes the specified action group.
#
# @option args [String] :action_group *Required* The name of the action group to delete.
# @option args [List] :ignore set to [404] to ignore server's NOT FOUND error for this request
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ module OpenSearch
module API
module Security
module Actions
# Deletes all distinguished names in the specified cluster or node allow list. Only accessible to super-admins and with rest-api permissions when enabled.
# Deletes all distinguished names in the specified cluster or node allowlist. Requires super admin or REST API permissions.
#
# @option args [String] :cluster_name *Required* The cluster-name to delete from list of distinguished names.
# @option args [String] :cluster_name *Required* The cluster name to delete from list of distinguished names.
# @option args [List] :ignore set to [404] to ignore server's NOT FOUND error for this request
def delete_distinguished_name(args = {})
args = Utils.clone_and_normalize_arguments(args)
Expand Down
2 changes: 1 addition & 1 deletion lib/opensearch/api/actions/security/delete_role.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module OpenSearch
module API
module Security
module Actions
# Delete the specified role.
# Deletes the specified role.
#
# @option args [String] :role *Required* The name of the role to delete.
# @option args [List] :ignore set to [404] to ignore server's NOT FOUND error for this request
Expand Down
2 changes: 1 addition & 1 deletion lib/opensearch/api/actions/security/delete_role_mapping.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module Security
module Actions
# Deletes the specified role mapping.
#
# @option args [String] :role *Required* The name of the role whose mapping needs to delete.
# @option args [String] :role *Required* The name of the role for which to delete the role's mappings.
# @option args [List] :ignore set to [404] to ignore server's NOT FOUND error for this request
def delete_role_mapping(args = {})
args = Utils.clone_and_normalize_arguments(args)
Expand Down
2 changes: 1 addition & 1 deletion lib/opensearch/api/actions/security/delete_tenant.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module OpenSearch
module API
module Security
module Actions
# Delete the specified tenant.
# Deletes the specified tenant.
#
# @option args [String] :tenant *Required* The name of the tenant to delete.
# @option args [List] :ignore set to [404] to ignore server's NOT FOUND error for this request
Expand Down
2 changes: 1 addition & 1 deletion lib/opensearch/api/actions/security/delete_user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module OpenSearch
module API
module Security
module Actions
# Delete the specified user.
# Deletes the specified internal user.
#
# @option args [String] :username *Required* The name of the user to delete.
# @option args [List] :ignore set to [404] to ignore server's NOT FOUND error for this request
Expand Down
2 changes: 1 addition & 1 deletion lib/opensearch/api/actions/security/flush_cache.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module OpenSearch
module API
module Security
module Actions
# Flushes the Security plugin user, authentication, and authorization cache.
# Flushes the Security plugin's user, authentication, and authorization cache.
#
# @option args [List] :ignore set to [404] to ignore server's NOT FOUND error for this request
def flush_cache(args = {})
Expand Down
2 changes: 1 addition & 1 deletion lib/opensearch/api/actions/security/generate_obo_token.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module OpenSearch
module API
module Security
module Actions
# Generates On-Behalf-Of token for the current user.
# Generates a `On-Behalf-Of` token for the current user.
#
# @option args [Hash] :body *Required*
def generate_obo_token(args = {})
Expand Down
4 changes: 2 additions & 2 deletions lib/opensearch/api/actions/security/generate_user_token.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ module OpenSearch
module API
module Security
module Actions
# Generates authorization token for the given user.
# Generates an authorization token for the specified user.
#
# @option args [String] :username *Required* The name of the user for whom an auth token is to be vended.
# @option args [String] :username *Required* The name of the user for whom to issue an authorization token.
def generate_user_token(args = {})
args = Utils.clone_and_normalize_arguments(args)
raise ArgumentError, "Required argument 'username' missing" if args['username'].nil?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module Security
module Actions
# Generates authorization token for the given user. Legacy API. Not Implemented.
#
# @option args [String] :username *Required* The name of the user for whom an auth token is to be vended.
# @option args [String] :username *Required* The name of the user for whom to issue an authorization token.
def generate_user_token_legacy(args = {})
args = Utils.clone_and_normalize_arguments(args)
raise ArgumentError, "Required argument 'username' missing" if args['username'].nil?
Expand Down
2 changes: 1 addition & 1 deletion lib/opensearch/api/actions/security/get_account_details.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module OpenSearch
module API
module Security
module Actions
# Returns account details for the current user.
# Returns account information for the current user.
#
def get_account_details(args = {})
args = Utils.clone_and_normalize_arguments(args)
Expand Down
4 changes: 2 additions & 2 deletions lib/opensearch/api/actions/security/get_all_certificates.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ module Security
module Actions
# Retrieves the cluster security certificates.
#
# @option args [String] :cert_type The type of certificates (HTTP, TRANSPORT, ALL) to retrieve from all nodes.
# @option args [String] :timeout The maximum duration, in seconds, to be spent to retrieve certificates from all nodes.
# @option args [String] :cert_type The type of certificates (`HTTP`, `TRANSPORT`, or `ALL`) to retrieve from all nodes.
# @option args [String] :timeout The maximum duration, in seconds, to spend retrieving certificates from all nodes before a timeout.
def get_all_certificates(args = {})
args = Utils.clone_and_normalize_arguments(args)
headers = args.delete('headers') || {}
Expand Down
2 changes: 1 addition & 1 deletion lib/opensearch/api/actions/security/get_allowlist.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module OpenSearch
module API
module Security
module Actions
# Retrieves the current list of allowed API accessible to normal user.
# Retrieves the current list of allowed APIs accessible to a normal user.
#
def get_allowlist(args = {})
args = Utils.clone_and_normalize_arguments(args)
Expand Down
2 changes: 1 addition & 1 deletion lib/opensearch/api/actions/security/get_configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module OpenSearch
module API
module Security
module Actions
# Returns the current Security plugin configuration in JSON format.
# Returns the current Security plugin configuration in a JSON format.
#
def get_configuration(args = {})
args = Utils.clone_and_normalize_arguments(args)
Expand Down
2 changes: 1 addition & 1 deletion lib/opensearch/api/actions/security/get_dashboards_info.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module OpenSearch
module API
module Security
module Actions
# Retrieves the current security-dashboards plugin configuration.
# Retrieves the current values for dynamic security settings for OpenSearch Dashboards.
#
def get_dashboards_info(args = {})
args = Utils.clone_and_normalize_arguments(args)
Expand Down
6 changes: 3 additions & 3 deletions lib/opensearch/api/actions/security/get_distinguished_name.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ module OpenSearch
module API
module Security
module Actions
# Retrieves distinguished names. Only accessible to super-admins and with rest-api permissions when enabled.
# Retrieves all node distinguished names. Requires super admin or REST API permissions.
#
# @option args [String] :cluster_name *Required* The cluster-name to retrieve nodes DN setting for.
# @option args [Boolean] :show_all A Boolean flag to include/exclude static nodes DN from final result.
# @option args [String] :cluster_name *Required* The name of the cluster to retrieve that cluster's nodes DN settings.
# @option args [Boolean] :show_all Whether to include or exclude any static node's DN settings from the final result.
def get_distinguished_name(args = {})
args = Utils.clone_and_normalize_arguments(args)
raise ArgumentError, "Required argument 'cluster_name' missing" if args['cluster_name'].nil?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ module OpenSearch
module API
module Security
module Actions
# Retrieves distinguished names. Only accessible to super-admins and with rest-api permissions when enabled.
# Retrieves all node distinguished names. Requires super admin or REST API permissions.
#
# @option args [Boolean] :show_all A Boolean flag to include/exclude static nodes DN from final result.
# @option args [Boolean] :show_all Whether to include or exclude any static node's DN settings from the final result.
def get_distinguished_names(args = {})
args = Utils.clone_and_normalize_arguments(args)
headers = args.delete('headers') || {}
Expand Down
8 changes: 4 additions & 4 deletions lib/opensearch/api/actions/security/get_node_certificates.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ module OpenSearch
module API
module Security
module Actions
# Retrieves the given node's security certificates.
# Retrieves the specified node's security certificates.
#
# @option args [String] :node_id *Required* The full-id of the node to retrieve certificates.
# @option args [String] :cert_type The type of certificates (HTTP, TRANSPORT, ALL) to retrieve for a node.
# @option args [String] :timeout The maximum duration, in seconds, to be spent to retrieve a node's certificates.
# @option args [String] :node_id *Required* The node ID to retrieve certificates for.
# @option args [String] :cert_type The type of certificates (`HTTP`, `TRANSPORT`, or `ALL`) to retrieve from a node.
# @option args [String] :timeout The maximum duration, in seconds, to spend retrieving certificates from all nodes before a timeout.
def get_node_certificates(args = {})
args = Utils.clone_and_normalize_arguments(args)
raise ArgumentError, "Required argument 'node_id' missing" if args['node_id'].nil?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module OpenSearch
module API
module Security
module Actions
# Gets the evaluated REST API permissions for the currently logged in user.
# Retrieves the evaluated REST API permissions for the currently logged in user.
#
def get_permissions_info(args = {})
args = Utils.clone_and_normalize_arguments(args)
Expand Down
2 changes: 1 addition & 1 deletion lib/opensearch/api/actions/security/get_role.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module Security
module Actions
# Retrieves one role.
#
# @option args [String] :role *Required*
# @option args [String] :role *Required* The name of the role to retrieve.
def get_role(args = {})
args = Utils.clone_and_normalize_arguments(args)
raise ArgumentError, "Required argument 'role' missing" if args['role'].nil?
Expand Down
4 changes: 2 additions & 2 deletions lib/opensearch/api/actions/security/get_role_mapping.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ module OpenSearch
module API
module Security
module Actions
# Retrieves one role mapping.
# Retrieves the specified role mapping.
#
# @option args [String] :role *Required*
# @option args [String] :role *Required* The name of the role mapping to retrieve.
def get_role_mapping(args = {})
args = Utils.clone_and_normalize_arguments(args)
raise ArgumentError, "Required argument 'role' missing" if args['role'].nil?
Expand Down
Loading

0 comments on commit 0c25b91

Please sign in to comment.