update-settings.asciidoc 2.3 KB

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