put_settings.asciidoc 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. --
  2. :api: put-settings
  3. :request: ClusterUpdateSettingsRequest
  4. :response: ClusterUpdateSettingsResponse
  5. --
  6. [id="{upid}-{api}"]
  7. === Cluster Update Settings API
  8. The Cluster Update Settings API allows to update cluster wide settings.
  9. [id="{upid}-{api}-request"]
  10. ==== Cluster Update Settings Request
  11. A +{request}+:
  12. ["source","java",subs="attributes,callouts,macros"]
  13. --------------------------------------------------
  14. include-tagged::{doc-tests-file}[{api}-request]
  15. --------------------------------------------------
  16. ==== Cluster Settings
  17. At least one setting to be updated must be provided:
  18. ["source","java",subs="attributes,callouts,macros"]
  19. --------------------------------------------------
  20. include-tagged::{doc-tests-file}[{api}-request-cluster-settings]
  21. --------------------------------------------------
  22. <1> Sets the transient settings to be applied
  23. <2> Sets the persistent setting to be applied
  24. ==== Providing the Settings
  25. The settings to be applied can be provided in different ways:
  26. ["source","java",subs="attributes,callouts,macros"]
  27. --------------------------------------------------
  28. include-tagged::{doc-tests-file}[{api}-create-settings]
  29. --------------------------------------------------
  30. <1> Creates a transient setting as `Settings`
  31. <2> Creates a persistent setting as `Settings`
  32. ["source","java",subs="attributes,callouts,macros"]
  33. --------------------------------------------------
  34. include-tagged::{doc-tests-file}[{api}-settings-builder]
  35. --------------------------------------------------
  36. <1> Settings provided as `Settings.Builder`
  37. ["source","java",subs="attributes,callouts,macros"]
  38. --------------------------------------------------
  39. include-tagged::{doc-tests-file}[{api}-settings-source]
  40. --------------------------------------------------
  41. <1> Settings provided as `String`
  42. ["source","java",subs="attributes,callouts,macros"]
  43. --------------------------------------------------
  44. include-tagged::{doc-tests-file}[{api}-settings-map]
  45. --------------------------------------------------
  46. <1> Settings provided as a `Map`
  47. ==== Optional Arguments
  48. The following arguments can optionally be provided:
  49. ["source","java",subs="attributes,callouts,macros"]
  50. --------------------------------------------------
  51. include-tagged::{doc-tests-file}[{api}-request-timeout]
  52. --------------------------------------------------
  53. <1> Timeout to wait for the all the nodes to acknowledge the settings were applied
  54. as a `TimeValue`
  55. <2> Timeout to wait for the all the nodes to acknowledge the settings were applied
  56. as a `String`
  57. ["source","java",subs="attributes,callouts,macros"]
  58. --------------------------------------------------
  59. include-tagged::{doc-tests-file}[{api}-request-masterTimeout]
  60. --------------------------------------------------
  61. <1> Timeout to connect to the master node as a `TimeValue`
  62. <2> Timeout to connect to the master node as a `String`
  63. include::../execution.asciidoc[]
  64. [id="{upid}-{api}-response"]
  65. ==== Cluster Update Settings Response
  66. The returned +{response}+ allows to retrieve information about the
  67. executed operation as follows:
  68. ["source","java",subs="attributes,callouts,macros"]
  69. --------------------------------------------------
  70. include-tagged::{doc-tests-file}[{api}-response]
  71. --------------------------------------------------
  72. <1> Indicates whether all of the nodes have acknowledged the request
  73. <2> Indicates which transient settings have been applied
  74. <3> Indicates which persistent settings have been applied