Module: OpenSearch::API::Security::Actions

Included in:
SecurityClient
Defined in:
lib/opensearch/api/namespace/security.rb,
lib/opensearch/api/actions/security/health.rb,
lib/opensearch/api/actions/security/get_role.rb,
lib/opensearch/api/actions/security/get_user.rb,
lib/opensearch/api/actions/security/get_roles.rb,
lib/opensearch/api/actions/security/get_users.rb,
lib/opensearch/api/actions/security/get_tenant.rb,
lib/opensearch/api/actions/security/patch_role.rb,
lib/opensearch/api/actions/security/patch_user.rb,
lib/opensearch/api/actions/security/create_role.rb,
lib/opensearch/api/actions/security/create_user.rb,
lib/opensearch/api/actions/security/delete_role.rb,
lib/opensearch/api/actions/security/delete_user.rb,
lib/opensearch/api/actions/security/flush_cache.rb,
lib/opensearch/api/actions/security/get_tenants.rb,
lib/opensearch/api/actions/security/patch_roles.rb,
lib/opensearch/api/actions/security/patch_users.rb,
lib/opensearch/api/actions/security/patch_tenant.rb,
lib/opensearch/api/actions/security/create_tenant.rb,
lib/opensearch/api/actions/security/delete_tenant.rb,
lib/opensearch/api/actions/security/patch_tenants.rb,
lib/opensearch/api/actions/security/change_password.rb,
lib/opensearch/api/actions/security/get_action_group.rb,
lib/opensearch/api/actions/security/get_certificates.rb,
lib/opensearch/api/actions/security/get_role_mapping.rb,
lib/opensearch/api/actions/security/get_action_groups.rb,
lib/opensearch/api/actions/security/get_configuration.rb,
lib/opensearch/api/actions/security/get_role_mappings.rb,
lib/opensearch/api/actions/security/patch_action_group.rb,
lib/opensearch/api/actions/security/patch_role_mapping.rb,
lib/opensearch/api/actions/security/create_action_group.rb,
lib/opensearch/api/actions/security/create_role_mapping.rb,
lib/opensearch/api/actions/security/delete_action_group.rb,
lib/opensearch/api/actions/security/delete_role_mapping.rb,
lib/opensearch/api/actions/security/get_account_details.rb,
lib/opensearch/api/actions/security/patch_action_groups.rb,
lib/opensearch/api/actions/security/patch_configuration.rb,
lib/opensearch/api/actions/security/patch_role_mappings.rb,
lib/opensearch/api/actions/security/update_configuration.rb,
lib/opensearch/api/actions/security/get_audit_configuration.rb,
lib/opensearch/api/actions/security/get_distinguished_names.rb,
lib/opensearch/api/actions/security/reload_http_certificates.rb,
lib/opensearch/api/actions/security/patch_audit_configuration.rb,
lib/opensearch/api/actions/security/patch_distinguished_names.rb,
lib/opensearch/api/actions/security/delete_distinguished_names.rb,
lib/opensearch/api/actions/security/update_audit_configuration.rb,
lib/opensearch/api/actions/security/update_distinguished_names.rb,
lib/opensearch/api/actions/security/reload_transport_certificates.rb

Constant Summary collapse

HEALTH_QUERY_PARAMS =
Set.new(%i[
]).freeze
GET_ROLE_QUERY_PARAMS =
Set.new(%i[
]).freeze
GET_USER_QUERY_PARAMS =
Set.new(%i[
]).freeze
GET_ROLES_QUERY_PARAMS =
Set.new(%i[
]).freeze
GET_USERS_QUERY_PARAMS =
Set.new(%i[
]).freeze
GET_TENANT_QUERY_PARAMS =
Set.new(%i[
]).freeze
PATCH_ROLE_QUERY_PARAMS =
Set.new(%i[
]).freeze
PATCH_USER_QUERY_PARAMS =
Set.new(%i[
]).freeze
CREATE_ROLE_QUERY_PARAMS =
Set.new(%i[
]).freeze
CREATE_USER_QUERY_PARAMS =
Set.new(%i[
]).freeze
DELETE_ROLE_QUERY_PARAMS =
Set.new(%i[
]).freeze
DELETE_USER_QUERY_PARAMS =
Set.new(%i[
]).freeze
FLUSH_CACHE_QUERY_PARAMS =
Set.new(%i[
]).freeze
GET_TENANTS_QUERY_PARAMS =
Set.new(%i[
]).freeze
PATCH_ROLES_QUERY_PARAMS =
Set.new(%i[
]).freeze
PATCH_USERS_QUERY_PARAMS =
Set.new(%i[
]).freeze
PATCH_TENANT_QUERY_PARAMS =
Set.new(%i[
]).freeze
CREATE_TENANT_QUERY_PARAMS =
Set.new(%i[
]).freeze
DELETE_TENANT_QUERY_PARAMS =
Set.new(%i[
]).freeze
PATCH_TENANTS_QUERY_PARAMS =
Set.new(%i[
]).freeze
CHANGE_PASSWORD_QUERY_PARAMS =
Set.new(%i[
]).freeze
GET_ACTION_GROUP_QUERY_PARAMS =
Set.new(%i[
]).freeze
GET_CERTIFICATES_QUERY_PARAMS =
Set.new(%i[
]).freeze
GET_ROLE_MAPPING_QUERY_PARAMS =
Set.new(%i[
]).freeze
GET_ACTION_GROUPS_QUERY_PARAMS =
Set.new(%i[
]).freeze
GET_CONFIGURATION_QUERY_PARAMS =
Set.new(%i[
]).freeze
GET_ROLE_MAPPINGS_QUERY_PARAMS =
Set.new(%i[
]).freeze
PATCH_ACTION_GROUP_QUERY_PARAMS =
Set.new(%i[
]).freeze
PATCH_ROLE_MAPPING_QUERY_PARAMS =
Set.new(%i[
]).freeze
CREATE_ACTION_GROUP_QUERY_PARAMS =
Set.new(%i[
]).freeze
CREATE_ROLE_MAPPING_QUERY_PARAMS =
Set.new(%i[
]).freeze
DELETE_ACTION_GROUP_QUERY_PARAMS =
Set.new(%i[
]).freeze
DELETE_ROLE_MAPPING_QUERY_PARAMS =
Set.new(%i[
]).freeze
GET_ACCOUNT_DETAILS_QUERY_PARAMS =
Set.new(%i[
]).freeze
PATCH_ACTION_GROUPS_QUERY_PARAMS =
Set.new(%i[
]).freeze
PATCH_CONFIGURATION_QUERY_PARAMS =
Set.new(%i[
]).freeze
PATCH_ROLE_MAPPINGS_QUERY_PARAMS =
Set.new(%i[
]).freeze
UPDATE_CONFIGURATION_QUERY_PARAMS =
Set.new(%i[
]).freeze
GET_AUDIT_CONFIGURATION_QUERY_PARAMS =
Set.new(%i[
]).freeze
GET_DISTINGUISHED_NAMES_QUERY_PARAMS =
Set.new(%i[
]).freeze
RELOAD_HTTP_CERTIFICATES_QUERY_PARAMS =
Set.new(%i[
]).freeze
PATCH_AUDIT_CONFIGURATION_QUERY_PARAMS =
Set.new(%i[
]).freeze
PATCH_DISTINGUISHED_NAMES_QUERY_PARAMS =
Set.new(%i[
]).freeze
DELETE_DISTINGUISHED_NAMES_QUERY_PARAMS =
Set.new(%i[
]).freeze
UPDATE_AUDIT_CONFIGURATION_QUERY_PARAMS =
Set.new(%i[
]).freeze
UPDATE_DISTINGUISHED_NAMES_QUERY_PARAMS =
Set.new(%i[
]).freeze
RELOAD_TRANSPORT_CERTIFICATES_QUERY_PARAMS =
Set.new(%i[
]).freeze

Instance Method Summary collapse

Instance Method Details

#change_password(arguments = {}) ⇒ Object

Changes the password for the current user.

API Reference

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :body (Hash)

    Required

Raises:

  • (ArgumentError)


24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/opensearch/api/actions/security/change_password.rb', line 24

def change_password(arguments = {})
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}
  body    = arguments.delete(:body)
  url     = Utils.__pathify '_plugins', '_security', 'api', 'account'
  method  = OpenSearch::API::HTTP_PUT
  params  = Utils.__validate_and_extract_params arguments, CHANGE_PASSWORD_QUERY_PARAMS

  perform_request(method, url, params, body, headers).body
end

#create_action_group(arguments = {}) ⇒ Object

Creates or replaces the specified action group.

API Reference

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :action_group (String)

    Required The name of the action group to create or replace

  • :body (Hash)

Raises:

  • (ArgumentError)


25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/opensearch/api/actions/security/create_action_group.rb', line 25

def create_action_group(arguments = {})
  raise ArgumentError, "Required argument 'action_group' missing" unless arguments[:action_group]

  arguments = arguments.clone
  _action_group = arguments.delete(:action_group)

  headers = arguments.delete(:headers) || {}
  body    = arguments.delete(:body)
  url     = Utils.__pathify '_plugins', '_security', 'api', 'actiongroups', _action_group
  method  = OpenSearch::API::HTTP_PUT
  params  = Utils.__validate_and_extract_params arguments, CREATE_ACTION_GROUP_QUERY_PARAMS

  perform_request(method, url, params, body, headers).body
end

#create_role(arguments = {}) ⇒ Object

Creates or replaces the specified role.

API Reference

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :role (String)

    Required

  • :body (Hash)

    Required

Raises:

  • (ArgumentError)


25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/opensearch/api/actions/security/create_role.rb', line 25

def create_role(arguments = {})
  raise ArgumentError, "Required argument 'role' missing" unless arguments[:role]
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]

  arguments = arguments.clone
  _role = arguments.delete(:role)

  headers = arguments.delete(:headers) || {}
  body    = arguments.delete(:body)
  url     = Utils.__pathify '_plugins', '_security', 'api', 'roles', _role
  method  = OpenSearch::API::HTTP_PUT
  params  = Utils.__validate_and_extract_params arguments, CREATE_ROLE_QUERY_PARAMS

  perform_request(method, url, params, body, headers).body
end

#create_role_mapping(arguments = {}) ⇒ Object

Creates or replaces the specified role mapping.

API Reference

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :role (String)

    Required

  • :body (Hash)

    Required

Raises:

  • (ArgumentError)


25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/opensearch/api/actions/security/create_role_mapping.rb', line 25

def create_role_mapping(arguments = {})
  raise ArgumentError, "Required argument 'role' missing" unless arguments[:role]
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]

  arguments = arguments.clone
  _role = arguments.delete(:role)

  headers = arguments.delete(:headers) || {}
  body    = arguments.delete(:body)
  url     = Utils.__pathify '_plugins', '_security', 'api', 'rolesmapping', _role
  method  = OpenSearch::API::HTTP_PUT
  params  = Utils.__validate_and_extract_params arguments, CREATE_ROLE_MAPPING_QUERY_PARAMS

  perform_request(method, url, params, body, headers).body
end

#create_tenant(arguments = {}) ⇒ Object

Creates or replaces the specified tenant.

API Reference

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :tenant (String)

    Required

  • :body (Hash)

Raises:

  • (ArgumentError)


25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/opensearch/api/actions/security/create_tenant.rb', line 25

def create_tenant(arguments = {})
  raise ArgumentError, "Required argument 'tenant' missing" unless arguments[:tenant]

  arguments = arguments.clone
  _tenant = arguments.delete(:tenant)

  headers = arguments.delete(:headers) || {}
  body    = arguments.delete(:body)
  url     = Utils.__pathify '_plugins', '_security', 'api', 'tenants', _tenant
  method  = OpenSearch::API::HTTP_PUT
  params  = Utils.__validate_and_extract_params arguments, CREATE_TENANT_QUERY_PARAMS

  perform_request(method, url, params, body, headers).body
end

#create_user(arguments = {}) ⇒ Object

Creates or replaces the specified user.

API Reference

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :username (String)

    Required

  • :body (Hash)

    Required

Raises:

  • (ArgumentError)


25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/opensearch/api/actions/security/create_user.rb', line 25

def create_user(arguments = {})
  raise ArgumentError, "Required argument 'username' missing" unless arguments[:username]
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]

  arguments = arguments.clone
  _username = arguments.delete(:username)

  headers = arguments.delete(:headers) || {}
  body    = arguments.delete(:body)
  url     = Utils.__pathify '_plugins', '_security', 'api', 'internalusers', _username
  method  = OpenSearch::API::HTTP_PUT
  params  = Utils.__validate_and_extract_params arguments, CREATE_USER_QUERY_PARAMS

  perform_request(method, url, params, body, headers).body
end

#delete_action_group(arguments = {}) ⇒ Object

Delete a specified action group.

API Reference

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :action_group (String)

    Required Action group to delete.

Raises:

  • (ArgumentError)


24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/opensearch/api/actions/security/delete_action_group.rb', line 24

def delete_action_group(arguments = {})
  raise ArgumentError, "Required argument 'action_group' missing" unless arguments[:action_group]

  arguments = arguments.clone
  _action_group = arguments.delete(:action_group)

  headers = arguments.delete(:headers) || {}
  body    = arguments.delete(:body)
  url     = Utils.__pathify '_plugins', '_security', 'api', 'actiongroups', _action_group
  method  = OpenSearch::API::HTTP_DELETE
  params  = Utils.__validate_and_extract_params arguments, DELETE_ACTION_GROUP_QUERY_PARAMS

  perform_request(method, url, params, body, headers).body
end

#delete_distinguished_names(arguments = {}) ⇒ Object

Deletes all distinguished names in the specified cluster’s or node’s allow list.

API Reference

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :cluster_name (String)

    Required

Raises:

  • (ArgumentError)


24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/opensearch/api/actions/security/delete_distinguished_names.rb', line 24

def delete_distinguished_names(arguments = {})
  raise ArgumentError, "Required argument 'cluster_name' missing" unless arguments[:cluster_name]

  arguments = arguments.clone
  _cluster_name = arguments.delete(:cluster_name)

  headers = arguments.delete(:headers) || {}
  body    = arguments.delete(:body)
  url     = Utils.__pathify '_plugins', '_security', 'api', 'nodesdn', _cluster_name
  method  = OpenSearch::API::HTTP_DELETE
  params  = Utils.__validate_and_extract_params arguments, DELETE_DISTINGUISHED_NAMES_QUERY_PARAMS

  perform_request(method, url, params, body, headers).body
end

#delete_role(arguments = {}) ⇒ Object

Delete the specified role.

API Reference

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :role (String)

    Required

Raises:

  • (ArgumentError)


24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/opensearch/api/actions/security/delete_role.rb', line 24

def delete_role(arguments = {})
  raise ArgumentError, "Required argument 'role' missing" unless arguments[:role]

  arguments = arguments.clone
  _role = arguments.delete(:role)

  headers = arguments.delete(:headers) || {}
  body    = arguments.delete(:body)
  url     = Utils.__pathify '_plugins', '_security', 'api', 'roles', _role
  method  = OpenSearch::API::HTTP_DELETE
  params  = Utils.__validate_and_extract_params arguments, DELETE_ROLE_QUERY_PARAMS

  perform_request(method, url, params, body, headers).body
end

#delete_role_mapping(arguments = {}) ⇒ Object

Deletes the specified role mapping.

API Reference

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :role (String)

    Required

Raises:

  • (ArgumentError)


24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/opensearch/api/actions/security/delete_role_mapping.rb', line 24

def delete_role_mapping(arguments = {})
  raise ArgumentError, "Required argument 'role' missing" unless arguments[:role]

  arguments = arguments.clone
  _role = arguments.delete(:role)

  headers = arguments.delete(:headers) || {}
  body    = arguments.delete(:body)
  url     = Utils.__pathify '_plugins', '_security', 'api', 'rolesmapping', _role
  method  = OpenSearch::API::HTTP_DELETE
  params  = Utils.__validate_and_extract_params arguments, DELETE_ROLE_MAPPING_QUERY_PARAMS

  perform_request(method, url, params, body, headers).body
end

#delete_tenant(arguments = {}) ⇒ Object

Delete the specified tenant.

API Reference

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :tenant (String)

    Required

Raises:

  • (ArgumentError)


24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/opensearch/api/actions/security/delete_tenant.rb', line 24

def delete_tenant(arguments = {})
  raise ArgumentError, "Required argument 'tenant' missing" unless arguments[:tenant]

  arguments = arguments.clone
  _tenant = arguments.delete(:tenant)

  headers = arguments.delete(:headers) || {}
  body    = arguments.delete(:body)
  url     = Utils.__pathify '_plugins', '_security', 'api', 'tenants', _tenant
  method  = OpenSearch::API::HTTP_DELETE
  params  = Utils.__validate_and_extract_params arguments, DELETE_TENANT_QUERY_PARAMS

  perform_request(method, url, params, body, headers).body
end

#delete_user(arguments = {}) ⇒ Object

Delete the specified user.

API Reference

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :username (String)

    Required

Raises:

  • (ArgumentError)


24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/opensearch/api/actions/security/delete_user.rb', line 24

def delete_user(arguments = {})
  raise ArgumentError, "Required argument 'username' missing" unless arguments[:username]

  arguments = arguments.clone
  _username = arguments.delete(:username)

  headers = arguments.delete(:headers) || {}
  body    = arguments.delete(:body)
  url     = Utils.__pathify '_plugins', '_security', 'api', 'internalusers', _username
  method  = OpenSearch::API::HTTP_DELETE
  params  = Utils.__validate_and_extract_params arguments, DELETE_USER_QUERY_PARAMS

  perform_request(method, url, params, body, headers).body
end

#flush_cache(arguments = {}) ⇒ Object

Flushes the Security plugin user, authentication, and authorization cache.

API Reference



23
24
25
26
27
28
29
30
31
32
# File 'lib/opensearch/api/actions/security/flush_cache.rb', line 23

def flush_cache(arguments = {})
  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}
  body    = arguments.delete(:body)
  url     = Utils.__pathify '_plugins', '_security', 'api', 'cache'
  method  = OpenSearch::API::HTTP_DELETE
  params  = Utils.__validate_and_extract_params arguments, FLUSH_CACHE_QUERY_PARAMS

  perform_request(method, url, params, body, headers).body
end

#get_account_details(arguments = {}) ⇒ Object

Returns account details for the current user.

API Reference



23
24
25
26
27
28
29
30
31
32
# File 'lib/opensearch/api/actions/security/get_account_details.rb', line 23

def (arguments = {})
  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}
  body    = arguments.delete(:body)
  url     = Utils.__pathify '_plugins', '_security', 'api', 'account'
  method  = OpenSearch::API::HTTP_GET
  params  = Utils.__validate_and_extract_params arguments, GET_ACCOUNT_DETAILS_QUERY_PARAMS

  perform_request(method, url, params, body, headers).body
end

#get_action_group(arguments = {}) ⇒ Object

Retrieves one action group.

API Reference

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :action_group (String)

    Required Action group to retrieve.

Raises:

  • (ArgumentError)


24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/opensearch/api/actions/security/get_action_group.rb', line 24

def get_action_group(arguments = {})
  raise ArgumentError, "Required argument 'action_group' missing" unless arguments[:action_group]

  arguments = arguments.clone
  _action_group = arguments.delete(:action_group)

  headers = arguments.delete(:headers) || {}
  body    = arguments.delete(:body)
  url     = Utils.__pathify '_plugins', '_security', 'api', 'actiongroups', _action_group
  method  = OpenSearch::API::HTTP_GET
  params  = Utils.__validate_and_extract_params arguments, GET_ACTION_GROUP_QUERY_PARAMS

  perform_request(method, url, params, body, headers).body
end

#get_action_groups(arguments = {}) ⇒ Object

Retrieves all action groups.

API Reference



23
24
25
26
27
28
29
30
31
32
# File 'lib/opensearch/api/actions/security/get_action_groups.rb', line 23

def get_action_groups(arguments = {})
  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}
  body    = arguments.delete(:body)
  url     = Utils.__pathify '_plugins', '_security', 'api', 'actiongroups'
  method  = OpenSearch::API::HTTP_GET
  params  = Utils.__validate_and_extract_params arguments, GET_ACTION_GROUPS_QUERY_PARAMS

  perform_request(method, url, params, body, headers).body
end

#get_audit_configuration(arguments = {}) ⇒ Object

Retrieves the audit configuration.

API Reference



23
24
25
26
27
28
29
30
31
32
# File 'lib/opensearch/api/actions/security/get_audit_configuration.rb', line 23

def get_audit_configuration(arguments = {})
  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}
  body    = arguments.delete(:body)
  url     = Utils.__pathify '_plugins', '_security', 'api', 'audit'
  method  = OpenSearch::API::HTTP_GET
  params  = Utils.__validate_and_extract_params arguments, GET_AUDIT_CONFIGURATION_QUERY_PARAMS

  perform_request(method, url, params, body, headers).body
end

#get_certificates(arguments = {}) ⇒ Object

Retrieves the cluster’s security certificates.

API Reference



23
24
25
26
27
28
29
30
31
32
# File 'lib/opensearch/api/actions/security/get_certificates.rb', line 23

def get_certificates(arguments = {})
  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}
  body    = arguments.delete(:body)
  url     = Utils.__pathify '_plugins', '_security', 'api', 'ssl', 'certs'
  method  = OpenSearch::API::HTTP_GET
  params  = Utils.__validate_and_extract_params arguments, GET_CERTIFICATES_QUERY_PARAMS

  perform_request(method, url, params, body, headers).body
end

#get_configuration(arguments = {}) ⇒ Object

Returns the current Security plugin configuration in JSON format.

API Reference



23
24
25
26
27
28
29
30
31
32
# File 'lib/opensearch/api/actions/security/get_configuration.rb', line 23

def get_configuration(arguments = {})
  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}
  body    = arguments.delete(:body)
  url     = Utils.__pathify '_plugins', '_security', 'api', 'securityconfig'
  method  = OpenSearch::API::HTTP_GET
  params  = Utils.__validate_and_extract_params arguments, GET_CONFIGURATION_QUERY_PARAMS

  perform_request(method, url, params, body, headers).body
end

#get_distinguished_names(arguments = {}) ⇒ Object

Retrieves all distinguished names in the allow list.

API Reference

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :cluster_name (String)


24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/opensearch/api/actions/security/get_distinguished_names.rb', line 24

def get_distinguished_names(arguments = {})
  arguments = arguments.clone
  _cluster_name = arguments.delete(:cluster_name)

  headers = arguments.delete(:headers) || {}
  body    = arguments.delete(:body)
  url     = Utils.__pathify '_plugins', '_security', 'api', 'nodesdn', _cluster_name
  method  = OpenSearch::API::HTTP_GET
  params  = Utils.__validate_and_extract_params arguments, GET_DISTINGUISHED_NAMES_QUERY_PARAMS

  perform_request(method, url, params, body, headers).body
end

#get_role(arguments = {}) ⇒ Object

Retrieves one role.

API Reference

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :role (String)

    Required

Raises:

  • (ArgumentError)


24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/opensearch/api/actions/security/get_role.rb', line 24

def get_role(arguments = {})
  raise ArgumentError, "Required argument 'role' missing" unless arguments[:role]

  arguments = arguments.clone
  _role = arguments.delete(:role)

  headers = arguments.delete(:headers) || {}
  body    = arguments.delete(:body)
  url     = Utils.__pathify '_plugins', '_security', 'api', 'roles', _role
  method  = OpenSearch::API::HTTP_GET
  params  = Utils.__validate_and_extract_params arguments, GET_ROLE_QUERY_PARAMS

  perform_request_complex_ignore404(method, url, params, body, headers, arguments)
end

#get_role_mapping(arguments = {}) ⇒ Object

Retrieves one role mapping.

API Reference

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :role (String)

    Required

Raises:

  • (ArgumentError)


24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/opensearch/api/actions/security/get_role_mapping.rb', line 24

def get_role_mapping(arguments = {})
  raise ArgumentError, "Required argument 'role' missing" unless arguments[:role]

  arguments = arguments.clone
  _role = arguments.delete(:role)

  headers = arguments.delete(:headers) || {}
  body    = arguments.delete(:body)
  url     = Utils.__pathify '_plugins', '_security', 'api', 'rolesmapping', _role
  method  = OpenSearch::API::HTTP_GET
  params  = Utils.__validate_and_extract_params arguments, GET_ROLE_MAPPING_QUERY_PARAMS

  perform_request(method, url, params, body, headers).body
end

#get_role_mappings(arguments = {}) ⇒ Object

Retrieves all role mappings.

API Reference



23
24
25
26
27
28
29
30
31
32
# File 'lib/opensearch/api/actions/security/get_role_mappings.rb', line 23

def get_role_mappings(arguments = {})
  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}
  body    = arguments.delete(:body)
  url     = Utils.__pathify '_plugins', '_security', 'api', 'rolesmapping'
  method  = OpenSearch::API::HTTP_GET
  params  = Utils.__validate_and_extract_params arguments, GET_ROLE_MAPPINGS_QUERY_PARAMS

  perform_request(method, url, params, body, headers).body
end

#get_roles(arguments = {}) ⇒ Object

Retrieves all roles.

API Reference



23
24
25
26
27
28
29
30
31
32
# File 'lib/opensearch/api/actions/security/get_roles.rb', line 23

def get_roles(arguments = {})
  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}
  body    = arguments.delete(:body)
  url     = Utils.__pathify '_plugins', '_security', 'api', 'roles'
  method  = OpenSearch::API::HTTP_GET
  params  = Utils.__validate_and_extract_params arguments, GET_ROLES_QUERY_PARAMS

  perform_request(method, url, params, body, headers).body
end

#get_tenant(arguments = {}) ⇒ Object

Retrieves one tenant.

API Reference

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :tenant (String)

    Required

Raises:

  • (ArgumentError)


24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/opensearch/api/actions/security/get_tenant.rb', line 24

def get_tenant(arguments = {})
  raise ArgumentError, "Required argument 'tenant' missing" unless arguments[:tenant]

  arguments = arguments.clone
  _tenant = arguments.delete(:tenant)

  headers = arguments.delete(:headers) || {}
  body    = arguments.delete(:body)
  url     = Utils.__pathify '_plugins', '_security', 'api', 'tenants', _tenant
  method  = OpenSearch::API::HTTP_GET
  params  = Utils.__validate_and_extract_params arguments, GET_TENANT_QUERY_PARAMS

  perform_request(method, url, params, body, headers).body
end

#get_tenants(arguments = {}) ⇒ Object

Retrieves all tenants.

API Reference



23
24
25
26
27
28
29
30
31
32
# File 'lib/opensearch/api/actions/security/get_tenants.rb', line 23

def get_tenants(arguments = {})
  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}
  body    = arguments.delete(:body)
  url     = Utils.__pathify '_plugins', '_security', 'api', 'tenants'
  method  = OpenSearch::API::HTTP_GET
  params  = Utils.__validate_and_extract_params arguments, GET_TENANTS_QUERY_PARAMS

  perform_request(method, url, params, body, headers).body
end

#get_user(arguments = {}) ⇒ Object

Retrieve one internal user.

API Reference

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :username (String)

    Required

Raises:

  • (ArgumentError)


24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/opensearch/api/actions/security/get_user.rb', line 24

def get_user(arguments = {})
  raise ArgumentError, "Required argument 'username' missing" unless arguments[:username]

  arguments = arguments.clone
  _username = arguments.delete(:username)

  headers = arguments.delete(:headers) || {}
  body    = arguments.delete(:body)
  url     = Utils.__pathify '_plugins', '_security', 'api', 'internalusers', _username
  method  = OpenSearch::API::HTTP_GET
  params  = Utils.__validate_and_extract_params arguments, GET_USER_QUERY_PARAMS

  perform_request_complex_ignore404(method, url, params, body, headers, arguments)
end

#get_users(arguments = {}) ⇒ Object

Retrieve all internal users.

API Reference



23
24
25
26
27
28
29
30
31
32
# File 'lib/opensearch/api/actions/security/get_users.rb', line 23

def get_users(arguments = {})
  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}
  body    = arguments.delete(:body)
  url     = Utils.__pathify '_plugins', '_security', 'api', 'internalusers'
  method  = OpenSearch::API::HTTP_GET
  params  = Utils.__validate_and_extract_params arguments, GET_USERS_QUERY_PARAMS

  perform_request(method, url, params, body, headers).body
end

#health(arguments = {}) ⇒ Object

Checks to see if the Security plugin is up and running.

API Reference



23
24
25
26
27
28
29
30
31
32
# File 'lib/opensearch/api/actions/security/health.rb', line 23

def health(arguments = {})
  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}
  body    = arguments.delete(:body)
  url     = Utils.__pathify '_plugins', '_security', 'health'
  method  = OpenSearch::API::HTTP_GET
  params  = Utils.__validate_and_extract_params arguments, HEALTH_QUERY_PARAMS

  perform_request(method, url, params, body, headers).body
end

#patch_action_group(arguments = {}) ⇒ Object

Updates individual attributes of an action group.

API Reference

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :action_group (String)

    Required

  • :body (Hash)

Raises:

  • (ArgumentError)


25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/opensearch/api/actions/security/patch_action_group.rb', line 25

def patch_action_group(arguments = {})
  raise ArgumentError, "Required argument 'action_group' missing" unless arguments[:action_group]

  arguments = arguments.clone
  _action_group = arguments.delete(:action_group)

  headers = arguments.delete(:headers) || {}
  body    = arguments.delete(:body)
  url     = Utils.__pathify '_plugins', '_security', 'api', 'actiongroups', _action_group
  method  = OpenSearch::API::HTTP_PATCH
  params  = Utils.__validate_and_extract_params arguments, PATCH_ACTION_GROUP_QUERY_PARAMS

  perform_request(method, url, params, body, headers).body
end

#patch_action_groups(arguments = {}) ⇒ Object

Creates, updates, or deletes multiple action groups in a single call.

API Reference

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :body (Hash)


24
25
26
27
28
29
30
31
32
33
# File 'lib/opensearch/api/actions/security/patch_action_groups.rb', line 24

def patch_action_groups(arguments = {})
  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}
  body    = arguments.delete(:body)
  url     = Utils.__pathify '_plugins', '_security', 'api', 'actiongroups'
  method  = OpenSearch::API::HTTP_PATCH
  params  = Utils.__validate_and_extract_params arguments, PATCH_ACTION_GROUPS_QUERY_PARAMS

  perform_request(method, url, params, body, headers).body
end

#patch_audit_configuration(arguments = {}) ⇒ Object

A PATCH call is used to update specified fields in the audit configuration.

API Reference

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :body (Hash)

    Required

Raises:

  • (ArgumentError)


24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/opensearch/api/actions/security/patch_audit_configuration.rb', line 24

def patch_audit_configuration(arguments = {})
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}
  body    = arguments.delete(:body)
  url     = Utils.__pathify '_plugins', '_security', 'api', 'audit'
  method  = OpenSearch::API::HTTP_PATCH
  params  = Utils.__validate_and_extract_params arguments, PATCH_AUDIT_CONFIGURATION_QUERY_PARAMS

  perform_request(method, url, params, body, headers).body
end

#patch_configuration(arguments = {}) ⇒ Object

A PATCH call is used to update the existing configuration using the REST API.

API Reference

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :body (Hash)

    Required

Raises:

  • (ArgumentError)


24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/opensearch/api/actions/security/patch_configuration.rb', line 24

def patch_configuration(arguments = {})
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}
  body    = arguments.delete(:body)
  url     = Utils.__pathify '_plugins', '_security', 'api', 'securityconfig'
  method  = OpenSearch::API::HTTP_PATCH
  params  = Utils.__validate_and_extract_params arguments, PATCH_CONFIGURATION_QUERY_PARAMS

  perform_request(method, url, params, body, headers).body
end

#patch_distinguished_names(arguments = {}) ⇒ Object

Bulk update of distinguished names.

API Reference

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :body (Hash)

    Required

Raises:

  • (ArgumentError)


24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/opensearch/api/actions/security/patch_distinguished_names.rb', line 24

def patch_distinguished_names(arguments = {})
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}
  body    = arguments.delete(:body)
  url     = Utils.__pathify '_plugins', '_security', 'api', 'nodesdn'
  method  = OpenSearch::API::HTTP_PATCH
  params  = Utils.__validate_and_extract_params arguments, PATCH_DISTINGUISHED_NAMES_QUERY_PARAMS

  perform_request(method, url, params, body, headers).body
end

#patch_role(arguments = {}) ⇒ Object

Updates individual attributes of a role.

API Reference

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :role (String)

    Required

  • :body (Hash)

    Required

Raises:

  • (ArgumentError)


25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/opensearch/api/actions/security/patch_role.rb', line 25

def patch_role(arguments = {})
  raise ArgumentError, "Required argument 'role' missing" unless arguments[:role]
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]

  arguments = arguments.clone
  _role = arguments.delete(:role)

  headers = arguments.delete(:headers) || {}
  body    = arguments.delete(:body)
  url     = Utils.__pathify '_plugins', '_security', 'api', 'roles', _role
  method  = OpenSearch::API::HTTP_PATCH
  params  = Utils.__validate_and_extract_params arguments, PATCH_ROLE_QUERY_PARAMS

  perform_request(method, url, params, body, headers).body
end

#patch_role_mapping(arguments = {}) ⇒ Object

Updates individual attributes of a role mapping.

API Reference

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :role (String)

    Required

  • :body (Hash)

    Required

Raises:

  • (ArgumentError)


25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/opensearch/api/actions/security/patch_role_mapping.rb', line 25

def patch_role_mapping(arguments = {})
  raise ArgumentError, "Required argument 'role' missing" unless arguments[:role]
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]

  arguments = arguments.clone
  _role = arguments.delete(:role)

  headers = arguments.delete(:headers) || {}
  body    = arguments.delete(:body)
  url     = Utils.__pathify '_plugins', '_security', 'api', 'rolesmapping', _role
  method  = OpenSearch::API::HTTP_PATCH
  params  = Utils.__validate_and_extract_params arguments, PATCH_ROLE_MAPPING_QUERY_PARAMS

  perform_request(method, url, params, body, headers).body
end

#patch_role_mappings(arguments = {}) ⇒ Object

Creates or updates multiple role mappings in a single call.

API Reference

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :body (Hash)

    Required

Raises:

  • (ArgumentError)


24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/opensearch/api/actions/security/patch_role_mappings.rb', line 24

def patch_role_mappings(arguments = {})
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}
  body    = arguments.delete(:body)
  url     = Utils.__pathify '_plugins', '_security', 'api', 'rolesmapping'
  method  = OpenSearch::API::HTTP_PATCH
  params  = Utils.__validate_and_extract_params arguments, PATCH_ROLE_MAPPINGS_QUERY_PARAMS

  perform_request(method, url, params, body, headers).body
end

#patch_roles(arguments = {}) ⇒ Object

Creates, updates, or deletes multiple roles in a single call.

API Reference

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :body (Hash)

    Required

Raises:

  • (ArgumentError)


24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/opensearch/api/actions/security/patch_roles.rb', line 24

def patch_roles(arguments = {})
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}
  body    = arguments.delete(:body)
  url     = Utils.__pathify '_plugins', '_security', 'api', 'roles'
  method  = OpenSearch::API::HTTP_PATCH
  params  = Utils.__validate_and_extract_params arguments, PATCH_ROLES_QUERY_PARAMS

  perform_request(method, url, params, body, headers).body
end

#patch_tenant(arguments = {}) ⇒ Object

Add, delete, or modify a single tenant.

API Reference

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :tenant (String)

    Required

  • :body (Hash)

    Required

Raises:

  • (ArgumentError)


25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/opensearch/api/actions/security/patch_tenant.rb', line 25

def patch_tenant(arguments = {})
  raise ArgumentError, "Required argument 'tenant' missing" unless arguments[:tenant]
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]

  arguments = arguments.clone
  _tenant = arguments.delete(:tenant)

  headers = arguments.delete(:headers) || {}
  body    = arguments.delete(:body)
  url     = Utils.__pathify '_plugins', '_security', 'api', 'tenants', _tenant
  method  = OpenSearch::API::HTTP_PATCH
  params  = Utils.__validate_and_extract_params arguments, PATCH_TENANT_QUERY_PARAMS

  perform_request(method, url, params, body, headers).body
end

#patch_tenants(arguments = {}) ⇒ Object

Add, delete, or modify multiple tenants in a single call.

API Reference

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :body (Hash)

    Required

Raises:

  • (ArgumentError)


24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/opensearch/api/actions/security/patch_tenants.rb', line 24

def patch_tenants(arguments = {})
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}
  body    = arguments.delete(:body)
  url     = Utils.__pathify '_plugins', '_security', 'api', 'tenants'
  method  = OpenSearch::API::HTTP_PATCH
  params  = Utils.__validate_and_extract_params arguments, PATCH_TENANTS_QUERY_PARAMS

  perform_request(method, url, params, body, headers).body
end

#patch_user(arguments = {}) ⇒ Object

Updates individual attributes of an internal user.

API Reference

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :username (String)

    Required

  • :body (Hash)

    Required

Raises:

  • (ArgumentError)


25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/opensearch/api/actions/security/patch_user.rb', line 25

def patch_user(arguments = {})
  raise ArgumentError, "Required argument 'username' missing" unless arguments[:username]
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]

  arguments = arguments.clone
  _username = arguments.delete(:username)

  headers = arguments.delete(:headers) || {}
  body    = arguments.delete(:body)
  url     = Utils.__pathify '_plugins', '_security', 'api', 'internalusers', _username
  method  = OpenSearch::API::HTTP_PATCH
  params  = Utils.__validate_and_extract_params arguments, PATCH_USER_QUERY_PARAMS

  perform_request(method, url, params, body, headers).body
end

#patch_users(arguments = {}) ⇒ Object

Creates, updates, or deletes multiple internal users in a single call.

API Reference

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :body (Hash)

    Required

Raises:

  • (ArgumentError)


24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/opensearch/api/actions/security/patch_users.rb', line 24

def patch_users(arguments = {})
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}
  body    = arguments.delete(:body)
  url     = Utils.__pathify '_plugins', '_security', 'api', 'internalusers'
  method  = OpenSearch::API::HTTP_PATCH
  params  = Utils.__validate_and_extract_params arguments, PATCH_USERS_QUERY_PARAMS

  perform_request(method, url, params, body, headers).body
end

#reload_http_certificates(arguments = {}) ⇒ Object

Reload HTTP layer communication certificates.

API Reference



23
24
25
26
27
28
29
30
31
32
# File 'lib/opensearch/api/actions/security/reload_http_certificates.rb', line 23

def reload_http_certificates(arguments = {})
  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}
  body    = arguments.delete(:body)
  url     = Utils.__pathify '_plugins', '_security', 'api', 'ssl', 'http', 'reloadcerts'
  method  = OpenSearch::API::HTTP_PUT
  params  = Utils.__validate_and_extract_params arguments, RELOAD_HTTP_CERTIFICATES_QUERY_PARAMS

  perform_request(method, url, params, body, headers).body
end

#reload_transport_certificates(arguments = {}) ⇒ Object

Reload transport layer communication certificates.

API Reference



23
24
25
26
27
28
29
30
31
32
# File 'lib/opensearch/api/actions/security/reload_transport_certificates.rb', line 23

def reload_transport_certificates(arguments = {})
  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}
  body    = arguments.delete(:body)
  url     = Utils.__pathify '_plugins', '_security', 'api', 'ssl', 'transport', 'reloadcerts'
  method  = OpenSearch::API::HTTP_PUT
  params  = Utils.__validate_and_extract_params arguments, RELOAD_TRANSPORT_CERTIFICATES_QUERY_PARAMS

  perform_request(method, url, params, body, headers).body
end

#update_audit_configuration(arguments = {}) ⇒ Object

Updates the audit configuration.

API Reference

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :body (Hash)

    Required

Raises:

  • (ArgumentError)


24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/opensearch/api/actions/security/update_audit_configuration.rb', line 24

def update_audit_configuration(arguments = {})
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}
  body    = arguments.delete(:body)
  url     = Utils.__pathify '_plugins', '_security', 'api', 'audit', 'config'
  method  = OpenSearch::API::HTTP_PUT
  params  = Utils.__validate_and_extract_params arguments, UPDATE_AUDIT_CONFIGURATION_QUERY_PARAMS

  perform_request(method, url, params, body, headers).body
end

#update_configuration(arguments = {}) ⇒ Object

Adds or updates the existing configuration using the REST API.

API Reference

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :body (Hash)

    Required

Raises:

  • (ArgumentError)


24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/opensearch/api/actions/security/update_configuration.rb', line 24

def update_configuration(arguments = {})
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}
  body    = arguments.delete(:body)
  url     = Utils.__pathify '_plugins', '_security', 'api', 'securityconfig', 'config'
  method  = OpenSearch::API::HTTP_PUT
  params  = Utils.__validate_and_extract_params arguments, UPDATE_CONFIGURATION_QUERY_PARAMS

  perform_request(method, url, params, body, headers).body
end

#update_distinguished_names(arguments = {}) ⇒ Object

Adds or updates the specified distinguished names in the cluster’s or node’s allow list.

API Reference

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :cluster_name (String)

    Required

  • :body (Hash)

Raises:

  • (ArgumentError)


25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/opensearch/api/actions/security/update_distinguished_names.rb', line 25

def update_distinguished_names(arguments = {})
  raise ArgumentError, "Required argument 'cluster_name' missing" unless arguments[:cluster_name]

  arguments = arguments.clone
  _cluster_name = arguments.delete(:cluster_name)

  headers = arguments.delete(:headers) || {}
  body    = arguments.delete(:body)
  url     = Utils.__pathify '_plugins', '_security', 'api', 'nodesdn', _cluster_name
  method  = OpenSearch::API::HTTP_PUT
  params  = Utils.__validate_and_extract_params arguments, UPDATE_DISTINGUISHED_NAMES_QUERY_PARAMS

  perform_request(method, url, params, body, headers).body
end