elasticsearch-xpack 7.4.0 → 7.5.0.pre.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/elasticsearch/xpack/api/actions/{data_frame/delete_data_frame_transform.rb → data_frame_transform_deprecated/delete_transform.rb} +24 -16
- data/lib/elasticsearch/xpack/api/actions/data_frame_transform_deprecated/get_transform.rb +55 -0
- data/lib/elasticsearch/xpack/api/actions/data_frame_transform_deprecated/get_transform_stats.rb +53 -0
- data/lib/elasticsearch/xpack/api/actions/{data_frame → data_frame_transform_deprecated}/params_registry.rb +1 -2
- data/lib/elasticsearch/xpack/api/actions/{data_frame/preview_data_frame_transform.rb → data_frame_transform_deprecated/preview_transform.rb} +15 -9
- data/lib/elasticsearch/xpack/api/actions/{data_frame/put_data_frame_transform.rb → data_frame_transform_deprecated/put_transform.rb} +23 -16
- data/lib/elasticsearch/xpack/api/actions/{data_frame/start_data_frame_transform.rb → data_frame_transform_deprecated/start_transform.rb} +22 -13
- data/lib/elasticsearch/xpack/api/actions/data_frame_transform_deprecated/stop_transform.rb +53 -0
- data/lib/elasticsearch/xpack/api/actions/{data_frame/update_data_frame_transform.rb → data_frame_transform_deprecated/update_transform.rb} +23 -17
- data/lib/elasticsearch/xpack/api/actions/graph/explore.rb +30 -16
- data/lib/elasticsearch/xpack/api/actions/graph/params_registry.rb +0 -1
- data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/delete_lifecycle.rb +36 -0
- data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/delete_policy.rb +4 -5
- data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/explain.rb +4 -5
- data/lib/elasticsearch/xpack/api/actions/{migration/upgrade.rb → index_lifecycle_management/explain_lifecycle.rb} +22 -12
- data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/get_lifecycle.rb +38 -0
- data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/get_policy.rb +3 -5
- data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/get_status.rb +7 -14
- data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/move_to_step.rb +14 -18
- data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/params_registry.rb +0 -1
- data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/put_lifecycle.rb +37 -0
- data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/put_policy.rb +4 -4
- data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/remove_policy.rb +13 -15
- data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/retry.rb +36 -0
- data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/retry_policy.rb +5 -5
- data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/start.rb +7 -14
- data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/stop.rb +7 -14
- data/lib/elasticsearch/xpack/api/actions/info.rb +14 -13
- data/lib/elasticsearch/xpack/api/actions/license/delete.rb +8 -6
- data/lib/elasticsearch/xpack/api/actions/license/get.rb +14 -9
- data/lib/elasticsearch/xpack/api/actions/license/get_basic_status.rb +8 -7
- data/lib/elasticsearch/xpack/api/actions/license/get_trial_status.rb +8 -7
- data/lib/elasticsearch/xpack/api/actions/license/params_registry.rb +0 -1
- data/lib/elasticsearch/xpack/api/actions/license/post.rb +15 -11
- data/lib/elasticsearch/xpack/api/actions/license/post_start_basic.rb +13 -8
- data/lib/elasticsearch/xpack/api/actions/license/post_start_trial.rb +14 -9
- data/lib/elasticsearch/xpack/api/actions/machine_learning/close_job.rb +19 -10
- data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_calendar.rb +12 -6
- data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_calendar_event.rb +15 -7
- data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_calendar_job.rb +15 -7
- data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_data_frame_analytics.rb +36 -0
- data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_datafeed.rb +16 -8
- data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_expired_data.rb +10 -4
- data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_filter.rb +15 -5
- data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_forecast.rb +32 -14
- data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_job.rb +18 -8
- data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_model_snapshot.rb +15 -7
- data/lib/elasticsearch/xpack/api/actions/machine_learning/estimate_memory_usage.rb +7 -5
- data/lib/elasticsearch/xpack/api/actions/machine_learning/evaluate_data_frame.rb +32 -0
- data/lib/elasticsearch/xpack/api/actions/machine_learning/find_file_structure.rb +52 -8
- data/lib/elasticsearch/xpack/api/actions/machine_learning/flush_job.rb +22 -15
- data/lib/elasticsearch/xpack/api/actions/machine_learning/forecast.rb +18 -10
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_buckets.rb +29 -19
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_calendar_events.rb +18 -14
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_calendars.rb +18 -10
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_categories.rb +24 -10
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_data_frame_analytics.rb +50 -0
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_data_frame_analytics_stats.rb +50 -0
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_datafeed_stats.rb +18 -7
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_datafeeds.rb +19 -8
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_filters.rb +22 -7
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_influencers.rb +24 -16
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_job_stats.rb +19 -8
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_jobs.rb +18 -7
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_model_snapshots.rb +30 -16
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_overall_buckets.rb +23 -15
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_records.rb +24 -16
- data/lib/elasticsearch/xpack/api/actions/machine_learning/info.rb +7 -6
- data/lib/elasticsearch/xpack/api/actions/machine_learning/open_job.rb +12 -8
- data/lib/elasticsearch/xpack/api/actions/machine_learning/params_registry.rb +0 -1
- data/lib/elasticsearch/xpack/api/actions/machine_learning/post_calendar_events.rb +13 -7
- data/lib/elasticsearch/xpack/api/actions/machine_learning/post_data.rb +19 -11
- data/lib/elasticsearch/xpack/api/actions/machine_learning/preview_datafeed.rb +12 -6
- data/lib/elasticsearch/xpack/api/actions/machine_learning/put_calendar.rb +12 -6
- data/lib/elasticsearch/xpack/api/actions/machine_learning/put_calendar_job.rb +15 -7
- data/lib/elasticsearch/xpack/api/actions/machine_learning/put_data_frame_analytics.rb +38 -0
- data/lib/elasticsearch/xpack/api/actions/machine_learning/put_datafeed.rb +13 -7
- data/lib/elasticsearch/xpack/api/actions/machine_learning/put_filter.rb +16 -6
- data/lib/elasticsearch/xpack/api/actions/machine_learning/put_job.rb +13 -7
- data/lib/elasticsearch/xpack/api/actions/machine_learning/revert_model_snapshot.rb +20 -9
- data/lib/elasticsearch/xpack/api/actions/machine_learning/set_upgrade_mode.rb +16 -13
- data/lib/elasticsearch/xpack/api/actions/machine_learning/start_data_frame_analytics.rb +45 -0
- data/lib/elasticsearch/xpack/api/actions/machine_learning/start_datafeed.rb +19 -11
- data/lib/elasticsearch/xpack/api/actions/machine_learning/stop_data_frame_analytics.rb +49 -0
- data/lib/elasticsearch/xpack/api/actions/machine_learning/stop_datafeed.rb +18 -10
- data/lib/elasticsearch/xpack/api/actions/machine_learning/update_datafeed.rb +12 -7
- data/lib/elasticsearch/xpack/api/actions/machine_learning/update_filter.rb +15 -7
- data/lib/elasticsearch/xpack/api/actions/machine_learning/update_job.rb +13 -7
- data/lib/elasticsearch/xpack/api/actions/machine_learning/update_model_snapshot.rb +15 -8
- data/lib/elasticsearch/xpack/api/actions/machine_learning/validate.rb +9 -4
- data/lib/elasticsearch/xpack/api/actions/machine_learning/validate_detector.rb +10 -4
- data/lib/elasticsearch/xpack/api/actions/migration/deprecations.rb +16 -8
- data/lib/elasticsearch/xpack/api/actions/migration/params_registry.rb +0 -1
- data/lib/elasticsearch/xpack/api/actions/params_registry.rb +0 -1
- data/lib/elasticsearch/xpack/api/actions/rollup/delete_job.rb +12 -6
- data/lib/elasticsearch/xpack/api/actions/rollup/get_jobs.rb +14 -5
- data/lib/elasticsearch/xpack/api/actions/rollup/get_rollup_caps.rb +16 -5
- data/lib/elasticsearch/xpack/api/actions/rollup/get_rollup_index_caps.rb +12 -6
- data/lib/elasticsearch/xpack/api/actions/rollup/params_registry.rb +0 -1
- data/lib/elasticsearch/xpack/api/actions/rollup/put_job.rb +13 -7
- data/lib/elasticsearch/xpack/api/actions/rollup/rollup_search.rb +31 -11
- data/lib/elasticsearch/xpack/api/actions/rollup/start_job.rb +12 -6
- data/lib/elasticsearch/xpack/api/actions/rollup/stop_job.rb +23 -7
- data/lib/elasticsearch/xpack/api/actions/security/authenticate.rb +8 -6
- data/lib/elasticsearch/xpack/api/actions/security/change_password.rb +20 -10
- data/lib/elasticsearch/xpack/api/actions/security/clear_cached_realms.rb +16 -11
- data/lib/elasticsearch/xpack/api/actions/security/clear_cached_roles.rb +13 -8
- data/lib/elasticsearch/xpack/api/actions/security/create_api_key.rb +16 -11
- data/lib/elasticsearch/xpack/api/actions/security/delete_privileges.rb +24 -9
- data/lib/elasticsearch/xpack/api/actions/security/delete_role.rb +20 -15
- data/lib/elasticsearch/xpack/api/actions/security/delete_role_mapping.rb +17 -12
- data/lib/elasticsearch/xpack/api/actions/security/delete_user.rb +19 -17
- data/lib/elasticsearch/xpack/api/actions/security/disable_user.rb +17 -13
- data/lib/elasticsearch/xpack/api/actions/security/enable_user.rb +17 -13
- data/lib/elasticsearch/xpack/api/actions/security/get_api_key.rb +21 -16
- data/lib/elasticsearch/xpack/api/actions/security/get_builtin_privileges.rb +6 -4
- data/lib/elasticsearch/xpack/api/actions/security/get_privileges.rb +21 -9
- data/lib/elasticsearch/xpack/api/actions/security/get_role.rb +15 -6
- data/lib/elasticsearch/xpack/api/actions/security/get_role_mapping.rb +15 -6
- data/lib/elasticsearch/xpack/api/actions/security/get_token.rb +9 -7
- data/lib/elasticsearch/xpack/api/actions/security/get_user.rb +15 -6
- data/lib/elasticsearch/xpack/api/actions/security/get_user_privileges.rb +10 -5
- data/lib/elasticsearch/xpack/api/actions/security/has_privileges.rb +17 -7
- data/lib/elasticsearch/xpack/api/actions/security/invalidate_api_key.rb +8 -6
- data/lib/elasticsearch/xpack/api/actions/security/invalidate_token.rb +9 -7
- data/lib/elasticsearch/xpack/api/actions/security/params_registry.rb +0 -1
- data/lib/elasticsearch/xpack/api/actions/security/put_privileges.rb +17 -9
- data/lib/elasticsearch/xpack/api/actions/security/put_role.rb +20 -11
- data/lib/elasticsearch/xpack/api/actions/security/put_role_mapping.rb +19 -16
- data/lib/elasticsearch/xpack/api/actions/security/put_user.rb +18 -12
- data/lib/elasticsearch/xpack/api/actions/sql/clear_cursor.rb +8 -6
- data/lib/elasticsearch/xpack/api/actions/sql/params_registry.rb +0 -1
- data/lib/elasticsearch/xpack/api/actions/sql/query.rb +14 -8
- data/lib/elasticsearch/xpack/api/actions/sql/translate.rb +8 -6
- data/lib/elasticsearch/xpack/api/actions/ssl/certificates.rb +10 -4
- data/lib/elasticsearch/xpack/api/actions/ssl/params_registry.rb +0 -1
- data/lib/elasticsearch/xpack/api/actions/usage.rb +14 -9
- data/lib/elasticsearch/xpack/api/actions/watcher/ack_watch.rb +18 -19
- data/lib/elasticsearch/xpack/api/actions/watcher/activate_watch.rb +12 -15
- data/lib/elasticsearch/xpack/api/actions/watcher/deactivate_watch.rb +12 -15
- data/lib/elasticsearch/xpack/api/actions/watcher/delete_watch.rb +14 -16
- data/lib/elasticsearch/xpack/api/actions/watcher/execute_watch.rb +19 -10
- data/lib/elasticsearch/xpack/api/actions/watcher/get_watch.rb +12 -7
- data/lib/elasticsearch/xpack/api/actions/watcher/params_registry.rb +0 -1
- data/lib/elasticsearch/xpack/api/actions/watcher/put_watch.rb +24 -16
- data/lib/elasticsearch/xpack/api/actions/watcher/start.rb +8 -7
- data/lib/elasticsearch/xpack/api/actions/watcher/stats.rb +27 -11
- data/lib/elasticsearch/xpack/api/actions/watcher/stop.rb +8 -7
- data/lib/elasticsearch/xpack/api/namespace/data_frame.rb +1 -1
- data/lib/elasticsearch/xpack/version.rb +1 -1
- metadata +25 -16
- data/lib/elasticsearch/xpack/api/actions/data_frame/get_data_frame_transform.rb +0 -43
- data/lib/elasticsearch/xpack/api/actions/data_frame/get_data_frame_transform_stats.rb +0 -42
- data/lib/elasticsearch/xpack/api/actions/data_frame/stop_data_frame_transform.rb +0 -46
- data/lib/elasticsearch/xpack/api/actions/migration/get_assistance.rb +0 -39
- data/lib/elasticsearch/xpack/api/actions/watcher/restart.rb +0 -27
@@ -7,27 +7,36 @@ module Elasticsearch
|
|
7
7
|
module API
|
8
8
|
module Security
|
9
9
|
module Actions
|
10
|
+
# TODO: Description
|
10
11
|
|
11
|
-
# Retrieve one or more roles from the native realm
|
12
12
|
#
|
13
13
|
# @option arguments [String] :name Role name
|
14
|
+
|
14
15
|
#
|
15
|
-
# @see https://www.elastic.co/guide/en/
|
16
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role.html
|
16
17
|
#
|
17
|
-
def get_role(arguments={})
|
18
|
+
def get_role(arguments = {})
|
19
|
+
arguments = arguments.clone
|
20
|
+
|
21
|
+
_name = arguments.delete(:name)
|
22
|
+
|
18
23
|
method = Elasticsearch::API::HTTP_GET
|
19
|
-
path =
|
24
|
+
path = if _name
|
25
|
+
"_security/role/#{Elasticsearch::API::Utils.__listify(_name)}"
|
26
|
+
else
|
27
|
+
"_security/role"
|
28
|
+
end
|
20
29
|
params = {}
|
21
|
-
body = nil
|
22
30
|
|
31
|
+
body = nil
|
23
32
|
if Array(arguments[:ignore]).include?(404)
|
24
33
|
Elasticsearch::API::Utils.__rescue_from_not_found { perform_request(method, path, params, body).body }
|
25
34
|
else
|
26
35
|
perform_request(method, path, params, body).body
|
27
36
|
end
|
28
37
|
end
|
29
|
-
end
|
30
38
|
end
|
31
39
|
end
|
40
|
+
end
|
32
41
|
end
|
33
42
|
end
|
@@ -7,23 +7,32 @@ module Elasticsearch
|
|
7
7
|
module API
|
8
8
|
module Security
|
9
9
|
module Actions
|
10
|
+
# TODO: Description
|
10
11
|
|
11
|
-
# Retrieve the mapping for a role
|
12
12
|
#
|
13
13
|
# @option arguments [String] :name Role-Mapping name
|
14
|
+
|
14
15
|
#
|
15
|
-
# @see https://www.elastic.co/guide/en/
|
16
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role-mapping.html
|
16
17
|
#
|
17
|
-
def get_role_mapping(arguments={})
|
18
|
+
def get_role_mapping(arguments = {})
|
19
|
+
arguments = arguments.clone
|
20
|
+
|
21
|
+
_name = arguments.delete(:name)
|
22
|
+
|
18
23
|
method = Elasticsearch::API::HTTP_GET
|
19
|
-
path =
|
24
|
+
path = if _name
|
25
|
+
"_security/role_mapping/#{Elasticsearch::API::Utils.__listify(_name)}"
|
26
|
+
else
|
27
|
+
"_security/role_mapping"
|
28
|
+
end
|
20
29
|
params = {}
|
21
|
-
body = nil
|
22
30
|
|
31
|
+
body = nil
|
23
32
|
perform_request(method, path, params, body).body
|
24
33
|
end
|
25
|
-
end
|
26
34
|
end
|
27
35
|
end
|
36
|
+
end
|
28
37
|
end
|
29
38
|
end
|
@@ -7,24 +7,26 @@ module Elasticsearch
|
|
7
7
|
module API
|
8
8
|
module Security
|
9
9
|
module Actions
|
10
|
+
# TODO: Description
|
10
11
|
|
11
|
-
# Obtain a token for OAuth 2.0 auhentication
|
12
|
-
#
|
13
12
|
# @option arguments [Hash] :body The token request to get (*Required*)
|
14
13
|
#
|
15
|
-
# @see https://www.elastic.co/guide/en/
|
14
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-token.html
|
16
15
|
#
|
17
|
-
def get_token(arguments={})
|
16
|
+
def get_token(arguments = {})
|
18
17
|
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
18
|
+
|
19
|
+
arguments = arguments.clone
|
20
|
+
|
19
21
|
method = Elasticsearch::API::HTTP_POST
|
20
|
-
path = "
|
22
|
+
path = "_security/oauth2/token"
|
21
23
|
params = {}
|
22
|
-
body = arguments[:body]
|
23
24
|
|
25
|
+
body = arguments[:body]
|
24
26
|
perform_request(method, path, params, body).body
|
25
27
|
end
|
26
|
-
end
|
27
28
|
end
|
28
29
|
end
|
30
|
+
end
|
29
31
|
end
|
30
32
|
end
|
@@ -7,27 +7,36 @@ module Elasticsearch
|
|
7
7
|
module API
|
8
8
|
module Security
|
9
9
|
module Actions
|
10
|
+
# TODO: Description
|
10
11
|
|
11
|
-
# Retrieve one or more users from the native realm
|
12
12
|
#
|
13
13
|
# @option arguments [List] :username A comma-separated list of usernames
|
14
|
+
|
14
15
|
#
|
15
|
-
# @see https://www.elastic.co/guide/en/
|
16
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-user.html
|
16
17
|
#
|
17
|
-
def get_user(arguments={})
|
18
|
+
def get_user(arguments = {})
|
19
|
+
arguments = arguments.clone
|
20
|
+
|
21
|
+
_username = arguments.delete(:username)
|
22
|
+
|
18
23
|
method = Elasticsearch::API::HTTP_GET
|
19
|
-
path =
|
24
|
+
path = if _username
|
25
|
+
"_security/user/#{Elasticsearch::API::Utils.__listify(_username)}"
|
26
|
+
else
|
27
|
+
"_security/user"
|
28
|
+
end
|
20
29
|
params = {}
|
21
|
-
body = nil
|
22
30
|
|
31
|
+
body = nil
|
23
32
|
if Array(arguments[:ignore]).include?(404)
|
24
33
|
Elasticsearch::API::Utils.__rescue_from_not_found { perform_request(method, path, params, body).body }
|
25
34
|
else
|
26
35
|
perform_request(method, path, params, body).body
|
27
36
|
end
|
28
37
|
end
|
29
|
-
end
|
30
38
|
end
|
31
39
|
end
|
40
|
+
end
|
32
41
|
end
|
33
42
|
end
|
@@ -7,18 +7,23 @@ module Elasticsearch
|
|
7
7
|
module API
|
8
8
|
module Security
|
9
9
|
module Actions
|
10
|
+
# TODO: Description
|
10
11
|
|
11
|
-
# Get user privileges
|
12
12
|
#
|
13
|
-
|
13
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-privileges.html
|
14
|
+
#
|
15
|
+
def get_user_privileges(arguments = {})
|
16
|
+
arguments = arguments.clone
|
17
|
+
|
14
18
|
method = Elasticsearch::API::HTTP_GET
|
19
|
+
path = "_security/user/_privileges"
|
15
20
|
params = {}
|
16
|
-
body = nil
|
17
21
|
|
18
|
-
|
22
|
+
body = nil
|
23
|
+
perform_request(method, path, params, body).body
|
19
24
|
end
|
20
|
-
end
|
21
25
|
end
|
22
26
|
end
|
27
|
+
end
|
23
28
|
end
|
24
29
|
end
|
@@ -7,25 +7,35 @@ module Elasticsearch
|
|
7
7
|
module API
|
8
8
|
module Security
|
9
9
|
module Actions
|
10
|
+
# TODO: Description
|
10
11
|
|
11
|
-
# Remove a role from the native realm
|
12
12
|
#
|
13
13
|
# @option arguments [String] :user Username
|
14
|
-
|
14
|
+
|
15
|
+
# @option arguments [Hash] :body The privileges to test (*Required*)
|
15
16
|
#
|
16
17
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-has-privileges.html
|
17
18
|
#
|
18
|
-
def has_privileges(arguments={})
|
19
|
+
def has_privileges(arguments = {})
|
19
20
|
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
20
21
|
|
21
|
-
|
22
|
+
arguments = arguments.clone
|
23
|
+
|
24
|
+
_user = arguments.delete(:user)
|
22
25
|
|
23
|
-
|
26
|
+
method = Elasticsearch::API::HTTP_GET
|
27
|
+
path = if _user
|
28
|
+
"_security/user/#{Elasticsearch::API::Utils.__listify(_user)}/_has_privileges"
|
29
|
+
else
|
30
|
+
"_security/user/_has_privileges"
|
31
|
+
end
|
32
|
+
params = {}
|
24
33
|
|
25
|
-
|
34
|
+
body = arguments[:body]
|
35
|
+
perform_request(method, path, params, body).body
|
26
36
|
end
|
27
|
-
end
|
28
37
|
end
|
29
38
|
end
|
39
|
+
end
|
30
40
|
end
|
31
41
|
end
|
@@ -7,24 +7,26 @@ module Elasticsearch
|
|
7
7
|
module API
|
8
8
|
module Security
|
9
9
|
module Actions
|
10
|
+
# TODO: Description
|
10
11
|
|
11
|
-
#
|
12
|
-
#
|
13
|
-
# @option arguments [Hash] :body The api key request to invalidate API key(s). (*Required*)
|
12
|
+
# @option arguments [Hash] :body The api key request to invalidate API key(s) (*Required*)
|
14
13
|
#
|
15
14
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-invalidate-api-key.html
|
16
15
|
#
|
17
|
-
def invalidate_api_key(arguments={})
|
16
|
+
def invalidate_api_key(arguments = {})
|
18
17
|
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
19
18
|
|
19
|
+
arguments = arguments.clone
|
20
|
+
|
20
21
|
method = Elasticsearch::API::HTTP_DELETE
|
21
22
|
path = "_security/api_key"
|
22
23
|
params = {}
|
23
24
|
|
24
|
-
|
25
|
+
body = arguments[:body]
|
26
|
+
perform_request(method, path, params, body).body
|
25
27
|
end
|
26
|
-
end
|
27
28
|
end
|
28
29
|
end
|
30
|
+
end
|
29
31
|
end
|
30
32
|
end
|
@@ -7,24 +7,26 @@ module Elasticsearch
|
|
7
7
|
module API
|
8
8
|
module Security
|
9
9
|
module Actions
|
10
|
+
# TODO: Description
|
10
11
|
|
11
|
-
# Delete a token for OAuth 2.0 auhentication
|
12
|
-
#
|
13
12
|
# @option arguments [Hash] :body The token to invalidate (*Required*)
|
14
13
|
#
|
15
|
-
# @see https://www.elastic.co/guide/en/
|
14
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-invalidate-token.html
|
16
15
|
#
|
17
|
-
def invalidate_token(arguments={})
|
16
|
+
def invalidate_token(arguments = {})
|
18
17
|
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
18
|
+
|
19
|
+
arguments = arguments.clone
|
20
|
+
|
19
21
|
method = Elasticsearch::API::HTTP_DELETE
|
20
|
-
path = "
|
22
|
+
path = "_security/oauth2/token"
|
21
23
|
params = {}
|
22
|
-
body = arguments[:body]
|
23
24
|
|
25
|
+
body = arguments[:body]
|
24
26
|
perform_request(method, path, params, body).body
|
25
27
|
end
|
26
|
-
end
|
27
28
|
end
|
28
29
|
end
|
30
|
+
end
|
29
31
|
end
|
30
32
|
end
|
@@ -7,29 +7,37 @@ module Elasticsearch
|
|
7
7
|
module API
|
8
8
|
module Security
|
9
9
|
module Actions
|
10
|
+
# TODO: Description
|
10
11
|
|
11
|
-
# Add a privilege
|
12
12
|
#
|
13
|
+
# @option arguments [String] :refresh If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes.
|
14
|
+
# (options: true,false,wait_for)
|
15
|
+
|
13
16
|
# @option arguments [Hash] :body The privilege(s) to add (*Required*)
|
14
|
-
# @option arguments [Boolean] :refresh If `true` (the default) then refresh the affected shards to make this operation visible to search,
|
15
|
-
# if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes.
|
16
17
|
#
|
17
|
-
|
18
|
+
# @see TODO
|
19
|
+
#
|
20
|
+
def put_privileges(arguments = {})
|
18
21
|
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
22
|
+
|
23
|
+
arguments = arguments.clone
|
24
|
+
|
19
25
|
method = Elasticsearch::API::HTTP_PUT
|
20
|
-
path = "
|
26
|
+
path = "_security/privilege"
|
21
27
|
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
22
|
-
body = arguments[:body]
|
23
28
|
|
29
|
+
body = arguments[:body]
|
24
30
|
perform_request(method, path, params, body).body
|
25
31
|
end
|
26
32
|
|
27
33
|
# Register this action with its valid params when the module is loaded.
|
28
34
|
#
|
29
|
-
# @since
|
30
|
-
ParamsRegistry.register(:put_privileges, [
|
31
|
-
|
35
|
+
# @since 6.2.0
|
36
|
+
ParamsRegistry.register(:put_privileges, [
|
37
|
+
:refresh
|
38
|
+
].freeze)
|
32
39
|
end
|
33
40
|
end
|
41
|
+
end
|
34
42
|
end
|
35
43
|
end
|
@@ -7,32 +7,41 @@ module Elasticsearch
|
|
7
7
|
module API
|
8
8
|
module Security
|
9
9
|
module Actions
|
10
|
+
# TODO: Description
|
10
11
|
|
11
|
-
# Update or create a role for the native shield realm
|
12
12
|
#
|
13
|
-
# @option arguments [String] :name Role name
|
13
|
+
# @option arguments [String] :name Role name
|
14
|
+
# @option arguments [String] :refresh If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes.
|
15
|
+
# (options: true,false,wait_for)
|
16
|
+
|
14
17
|
# @option arguments [Hash] :body The role to add (*Required*)
|
15
|
-
# @option arguments [Boolean] :refresh Refresh the index after performing the operation
|
16
18
|
#
|
17
|
-
# @see https://www.elastic.co/guide/en/
|
19
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role.html
|
18
20
|
#
|
19
|
-
def put_role(arguments={})
|
20
|
-
raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]
|
21
|
+
def put_role(arguments = {})
|
21
22
|
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
23
|
+
raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]
|
24
|
+
|
25
|
+
arguments = arguments.clone
|
26
|
+
|
27
|
+
_name = arguments.delete(:name)
|
28
|
+
|
22
29
|
method = Elasticsearch::API::HTTP_PUT
|
23
|
-
path = "
|
30
|
+
path = "_security/role/#{Elasticsearch::API::Utils.__listify(_name)}"
|
24
31
|
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
25
|
-
body = arguments[:body]
|
26
32
|
|
33
|
+
body = arguments[:body]
|
27
34
|
perform_request(method, path, params, body).body
|
28
35
|
end
|
29
36
|
|
30
37
|
# Register this action with its valid params when the module is loaded.
|
31
38
|
#
|
32
|
-
# @since
|
33
|
-
ParamsRegistry.register(:put_role, [
|
34
|
-
|
39
|
+
# @since 6.2.0
|
40
|
+
ParamsRegistry.register(:put_role, [
|
41
|
+
:refresh
|
42
|
+
].freeze)
|
35
43
|
end
|
36
44
|
end
|
45
|
+
end
|
37
46
|
end
|
38
47
|
end
|
@@ -7,38 +7,41 @@ module Elasticsearch
|
|
7
7
|
module API
|
8
8
|
module Security
|
9
9
|
module Actions
|
10
|
+
# TODO: Description
|
10
11
|
|
11
|
-
# Add a mapping for a role
|
12
12
|
#
|
13
|
-
# @option arguments [String] :name Role-mapping name
|
14
|
-
# @option arguments [
|
15
|
-
#
|
16
|
-
|
17
|
-
#
|
13
|
+
# @option arguments [String] :name Role-mapping name
|
14
|
+
# @option arguments [String] :refresh If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes.
|
15
|
+
# (options: true,false,wait_for)
|
16
|
+
|
17
|
+
# @option arguments [Hash] :body The role mapping to add (*Required*)
|
18
18
|
#
|
19
|
-
# @see https://www.elastic.co/guide/en/
|
19
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role-mapping.html
|
20
20
|
#
|
21
|
-
def put_role_mapping(arguments={})
|
22
|
-
raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]
|
21
|
+
def put_role_mapping(arguments = {})
|
23
22
|
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
23
|
+
raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]
|
24
|
+
|
24
25
|
arguments = arguments.clone
|
25
|
-
|
26
|
+
|
27
|
+
_name = arguments.delete(:name)
|
26
28
|
|
27
29
|
method = Elasticsearch::API::HTTP_PUT
|
28
|
-
path = "
|
30
|
+
path = "_security/role_mapping/#{Elasticsearch::API::Utils.__listify(_name)}"
|
29
31
|
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
30
|
-
body = arguments[:body]
|
31
32
|
|
33
|
+
body = arguments[:body]
|
32
34
|
perform_request(method, path, params, body).body
|
33
35
|
end
|
34
36
|
|
35
37
|
# Register this action with its valid params when the module is loaded.
|
36
38
|
#
|
37
|
-
# @since
|
38
|
-
ParamsRegistry.register(:put_role_mapping, [
|
39
|
-
|
40
|
-
|
39
|
+
# @since 6.2.0
|
40
|
+
ParamsRegistry.register(:put_role_mapping, [
|
41
|
+
:refresh
|
42
|
+
].freeze)
|
41
43
|
end
|
42
44
|
end
|
45
|
+
end
|
43
46
|
end
|
44
47
|
end
|