Documentation
¶
Overview ¶
Update security index settings.
Update the user-configurable settings for the security internal index (`.security` and associated indices). Only a subset of settings are allowed to be modified. This includes `index.auto_expand_replicas` and `index.number_of_replicas`.
NOTE: If `index.auto_expand_replicas` is set, `index.number_of_replicas` will be ignored during updates.
If a specific index is not in use on the system and settings are provided for it, the request will be rejected. This API does not yet support configuring the settings for indices before they are in use.
Index ¶
- Variables
- type NewUpdateSettings
- type Request
- type Response
- type UpdateSettings
- func (r UpdateSettings) Do(providedCtx context.Context) (*Response, error)
- func (r *UpdateSettings) ErrorTrace(errortrace bool) *UpdateSettings
- func (r *UpdateSettings) FilterPath(filterpaths ...string) *UpdateSettings
- func (r *UpdateSettings) Header(key, value string) *UpdateSettings
- func (r *UpdateSettings) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r *UpdateSettings) Human(human bool) *UpdateSettings
- func (r *UpdateSettings) MasterTimeout(duration string) *UpdateSettings
- func (r UpdateSettings) Perform(providedCtx context.Context) (*http.Response, error)
- func (r *UpdateSettings) Pretty(pretty bool) *UpdateSettings
- func (r *UpdateSettings) Raw(raw io.Reader) *UpdateSettings
- func (r *UpdateSettings) Request(req *Request) *UpdateSettings
- func (r *UpdateSettings) Security(security types.SecuritySettingsVariant) *UpdateSettings
- func (r *UpdateSettings) SecurityProfile(securityprofile types.SecuritySettingsVariant) *UpdateSettings
- func (r *UpdateSettings) SecurityTokens(securitytokens types.SecuritySettingsVariant) *UpdateSettings
- func (r *UpdateSettings) Timeout(duration string) *UpdateSettings
Constants ¶
This section is empty.
Variables ¶
var ErrBuildPath = errors.New("cannot build path, check for missing path parameters")
ErrBuildPath is returned in case of missing parameters within the build of the request.
Functions ¶
This section is empty.
Types ¶
type NewUpdateSettings ¶
type NewUpdateSettings func() *UpdateSettings
NewUpdateSettings type alias for index.
func NewUpdateSettingsFunc ¶
func NewUpdateSettingsFunc(tp elastictransport.Interface) NewUpdateSettings
NewUpdateSettingsFunc returns a new instance of UpdateSettings with the provided transport. Used in the index of the library this allows to retrieve every apis in once place.
type Request ¶
type Request struct { // Security Settings for the index used for most security configuration, including native // realm users and roles configured with the API. Security *types.SecuritySettings `json:"security,omitempty"` // SecurityProfile Settings for the index used to store profile information. SecurityProfile *types.SecuritySettings `json:"security-profile,omitempty"` // SecurityTokens Settings for the index used to store tokens. SecurityTokens *types.SecuritySettings `json:"security-tokens,omitempty"` }
Request holds the request body struct for the package updatesettings
type Response ¶
type Response struct {
Acknowledged bool `json:"acknowledged"`
}
Response holds the response body struct for the package updatesettings
type UpdateSettings ¶
type UpdateSettings struct {
// contains filtered or unexported fields
}
func New ¶
func New(tp elastictransport.Interface) *UpdateSettings
Update security index settings.
Update the user-configurable settings for the security internal index (`.security` and associated indices). Only a subset of settings are allowed to be modified. This includes `index.auto_expand_replicas` and `index.number_of_replicas`.
NOTE: If `index.auto_expand_replicas` is set, `index.number_of_replicas` will be ignored during updates.
If a specific index is not in use on the system and settings are provided for it, the request will be rejected. This API does not yet support configuring the settings for indices before they are in use.
https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-security-update-settings
func (UpdateSettings) Do ¶
func (r UpdateSettings) Do(providedCtx context.Context) (*Response, error)
Do runs the request through the transport, handle the response and returns a updatesettings.Response
func (*UpdateSettings) ErrorTrace ¶
func (r *UpdateSettings) ErrorTrace(errortrace bool) *UpdateSettings
ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors when they occur. API name: error_trace
func (*UpdateSettings) FilterPath ¶
func (r *UpdateSettings) FilterPath(filterpaths ...string) *UpdateSettings
FilterPath Comma-separated list of filters in dot notation which reduce the response returned by Elasticsearch. API name: filter_path
func (*UpdateSettings) Header ¶
func (r *UpdateSettings) Header(key, value string) *UpdateSettings
Header set a key, value pair in the UpdateSettings headers map.
func (*UpdateSettings) HttpRequest ¶
HttpRequest returns the http.Request object built from the given parameters.
func (*UpdateSettings) Human ¶
func (r *UpdateSettings) Human(human bool) *UpdateSettings
Human When set to `true` will return statistics in a format suitable for humans. For example `"exists_time": "1h"` for humans and `"eixsts_time_in_millis": 3600000` for computers. When disabled the human readable values will be omitted. This makes sense for responses being consumed only by machines. API name: human
func (*UpdateSettings) MasterTimeout ¶
func (r *UpdateSettings) MasterTimeout(duration string) *UpdateSettings
MasterTimeout The period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. API name: master_timeout
func (UpdateSettings) Perform ¶
Perform runs the http.Request through the provided transport and returns an http.Response.
func (*UpdateSettings) Pretty ¶
func (r *UpdateSettings) Pretty(pretty bool) *UpdateSettings
Pretty If set to `true` the returned JSON will be "pretty-formatted". Only use this option for debugging only. API name: pretty
func (*UpdateSettings) Raw ¶
func (r *UpdateSettings) Raw(raw io.Reader) *UpdateSettings
Raw takes a json payload as input which is then passed to the http.Request If specified Raw takes precedence on Request method.
func (*UpdateSettings) Request ¶
func (r *UpdateSettings) Request(req *Request) *UpdateSettings
Request allows to set the request property with the appropriate payload.
func (*UpdateSettings) Security ¶
func (r *UpdateSettings) Security(security types.SecuritySettingsVariant) *UpdateSettings
Settings for the index used for most security configuration, including native realm users and roles configured with the API. API name: security
func (*UpdateSettings) SecurityProfile ¶
func (r *UpdateSettings) SecurityProfile(securityprofile types.SecuritySettingsVariant) *UpdateSettings
Settings for the index used to store profile information. API name: security-profile
func (*UpdateSettings) SecurityTokens ¶
func (r *UpdateSettings) SecurityTokens(securitytokens types.SecuritySettingsVariant) *UpdateSettings
Settings for the index used to store tokens. API name: security-tokens
func (*UpdateSettings) Timeout ¶
func (r *UpdateSettings) Timeout(duration string) *UpdateSettings
Timeout The period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. API name: timeout