update-settings.asciidoc 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. [role="xpack"]
  2. [[security-api-update-settings]]
  3. === Update Security index settings
  4. ++++
  5. <titleabbrev>Update Security settings</titleabbrev>
  6. ++++
  7. Updates the settings of the security internal indices.
  8. [[security-api-update-settings-prereqs]]
  9. ==== {api-prereq-title}
  10. * To use this API, you must have at least the `manage_security` cluster privilege.
  11. [[security-api-update-settings-request-body]]
  12. ==== {api-request-body-title}
  13. `security`::
  14. (Optional, object) Settings to be used for the index used for most security
  15. configuration, including Native realm users and roles configured via the API.
  16. `security-tokens`::
  17. (Optional, object) Settings to be used for the index used to store
  18. <<security-api-get-token,tokens>>.
  19. `security`::
  20. (Optional, object) Settings to be used for the index used to store
  21. <<security-api-activate-user-profile, profile>> information.
  22. [[security-api-update-settings-desc]]
  23. ==== {api-description-title}
  24. This API allows a user to modify the settings for the Security internal indices
  25. (`.security` and associated indices). Only a subset of settings are allowed to
  26. be modified. This includes:
  27. - `index.auto_expand_replicas`
  28. - `index.number_of_replicas`
  29. [[security-api-update-settings-example]]
  30. ==== {api-examples-title}
  31. An example of modifying the Security settings:
  32. [source,console]
  33. -----------------------------------------------------------
  34. PUT /_security/settings
  35. {
  36. "security": {
  37. "index.auto_expand_replicas": "0-all"
  38. },
  39. "security-tokens": {
  40. "index.auto_expand_replicas": "0-all"
  41. },
  42. "security-profile": {
  43. "index.auto_expand_replicas": "0-all"
  44. }
  45. }
  46. -----------------------------------------------------------
  47. // TEST[skip:making sure all the indices have been created reliably is difficult]
  48. The configured settings can be retrieved using the
  49. <<security-api-get-settings,Get Security index settings>> API. If a given index
  50. is not in use on the system, but settings are provided for it, the request will
  51. be rejected - this API does not yet support configuring the settings for these
  52. indices before they are in use.