diff --git a/elasticsearch/client/cluster.py b/elasticsearch/client/cluster.py
index 1df7e795..99d82a68 100644
--- a/elasticsearch/client/cluster.py
+++ b/elasticsearch/client/cluster.py
@@ -25,7 +25,7 @@ class ClusterClient(NamespacedClient):
@query_params('filter_blocks', 'filter_index_templates', 'filter_indices',
'filter_metadata', 'filter_nodes', 'filter_routing_table', 'local',
- 'master_timeout')
+ 'master_timeout', 'flat_settings')
def state(self, params=None):
"""
Get a comprehensive state information of the whole cluster.
@@ -39,6 +39,7 @@ class ClusterClient(NamespacedClient):
:arg filter_routing_table: Do not return information about shard allocation (`routing_table` and `routing_nodes`)
:arg local: Return local information, do not retrieve the state from master node (default: false)
:arg master_timeout: Specify timeout for connection to master
+ :arg flat_settings: Return settings in flat format (default: false)
"""
_, data = self.transport.perform_request('GET', '/_cluster/state', params=params)
return data
@@ -57,16 +58,18 @@ class ClusterClient(NamespacedClient):
_, data = self.transport.perform_request('POST', '/_cluster/reroute', params=params, body=body)
return data
- @query_params()
+ @query_params('flat_settings')
def get_settings(self, params=None):
"""
Get cluster settings.
``_
+
+ :arg flat_settings: Return settings in flat format (default: false)
"""
_, data = self.transport.perform_request('GET', '/_cluster/settings', params=params)
return data
- @query_params()
+ @query_params('flat_settings')
def put_settings(self, body, params=None):
"""
Update cluster wide specific settings.
@@ -74,6 +77,7 @@ class ClusterClient(NamespacedClient):
:arg body: The settings to be updated. Can be either `transient` or
`persistent` (survives cluster restart).
+ :arg flat_settings: Return settings in flat format (default: false)
"""
_, data = self.transport.perform_request('PUT', '/_cluster/settings', params=params, body=body)
return data
diff --git a/elasticsearch/client/indices.py b/elasticsearch/client/indices.py
index cf70d694..f3da6a11 100644
--- a/elasticsearch/client/indices.py
+++ b/elasticsearch/client/indices.py
@@ -366,7 +366,7 @@ class IndicesClient(NamespacedClient):
params=params)
return data
- @query_params('order', 'timeout', 'master_timeout')
+ @query_params('order', 'timeout', 'master_timeout', 'flat_settings')
def put_template(self, name, body, params=None):
"""
Create an index template that will automatically be applied to new
@@ -379,18 +379,20 @@ class IndicesClient(NamespacedClient):
ones (higher numbers are merged later, overriding the lower numbers)
:arg master_timeout: Specify timeout for connection to master
:arg timeout: Explicit operation timeout
+ :arg flat_settings: Return settings in flat format (default: false)
"""
_, data = self.transport.perform_request('PUT', _make_path('_template', name),
params=params, body=body)
return data
- @query_params()
+ @query_params('flat_settings')
def get_template(self, name=None, params=None):
"""
Retrieve an index template by its name.
``_
:arg name: The name of the template
+ :arg flat_settings: Return settings in flat format (default: false)
"""
_, data = self.transport.perform_request('GET', _make_path('_template', name),
params=params)
@@ -410,7 +412,7 @@ class IndicesClient(NamespacedClient):
params=params)
return data
- @query_params()
+ @query_params('flat_settings')
def get_settings(self, index=None, params=None):
"""
Retrieve settings for one or more (or all) indices.
@@ -418,12 +420,13 @@ class IndicesClient(NamespacedClient):
:arg index: A comma-separated list of index names; use `_all` or empty
string to perform the operation on all indices
+ :arg flat_settings: Return settings in flat format (default: false)
"""
_, data = self.transport.perform_request('GET', _make_path(index, '_settings'),
params=params)
return data
- @query_params('master_timeout')
+ @query_params('master_timeout', 'flat_settings')
def put_settings(self, body, index=None, params=None):
"""
Change specific index level settings in real time.
@@ -433,6 +436,7 @@ class IndicesClient(NamespacedClient):
string to perform the operation on all indices
:arg master_timeout: Specify timeout for connection to master
:arg body: The index settings to be updated
+ :arg flat_settings: Return settings in flat format (default: false)
"""
_, data = self.transport.perform_request('PUT', _make_path(index, '_settings'),
params=params, body=body)