Method: OpenSearch::API::Security::Actions#patch_tenants

Defined in:
lib/opensearch/api/actions/security/patch_tenants.rb

#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