simulateindextemplate

package
v9.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 29, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Simulate an index. Get the index configuration that would be applied to the specified index from an existing index template.

Index

Constants

This section is empty.

Variables

View Source
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 NewSimulateIndexTemplate

type NewSimulateIndexTemplate func(name string) *SimulateIndexTemplate

NewSimulateIndexTemplate type alias for index.

func NewSimulateIndexTemplateFunc

func NewSimulateIndexTemplateFunc(tp elastictransport.Interface) NewSimulateIndexTemplate

NewSimulateIndexTemplateFunc returns a new instance of SimulateIndexTemplate with the provided transport. Used in the index of the library this allows to retrieve every apis in once place.

type Request added in v9.2.0

type Request = types.IndexTemplate

Request holds the request body struct for the package simulateindextemplate

https://github.com/elastic/elasticsearch-specification/blob/d520d9e8cf14cad487de5e0654007686c395b494/specification/indices/simulate_index_template/IndicesSimulateIndexTemplateRequest.ts#L25-L70

func NewRequest added in v9.2.0

func NewRequest() *Request

NewRequest returns a Request

type Response

type Response struct {
	Overlapping []types.Overlapping `json:"overlapping,omitempty"`
	Template    types.Template      `json:"template"`
}

Response holds the response body struct for the package simulateindextemplate

https://github.com/elastic/elasticsearch-specification/blob/d520d9e8cf14cad487de5e0654007686c395b494/specification/indices/simulate_index_template/IndicesSimulateIndexTemplateResponse.ts#L25-L30

func NewResponse

func NewResponse() *Response

NewResponse returns a Response

type SimulateIndexTemplate

type SimulateIndexTemplate struct {
	// contains filtered or unexported fields
}

func New

Simulate an index. Get the index configuration that would be applied to the specified index from an existing index template.

https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-simulate-index-template

func (*SimulateIndexTemplate) AllowAutoCreate added in v9.2.0

func (r *SimulateIndexTemplate) AllowAutoCreate(allowautocreate bool) *SimulateIndexTemplate

API name: allow_auto_create

func (*SimulateIndexTemplate) Cause

Cause User defined reason for dry-run creating the new template for simulation purposes API name: cause

func (*SimulateIndexTemplate) ComposedOf added in v9.2.0

func (r *SimulateIndexTemplate) ComposedOf(composedofs ...string) *SimulateIndexTemplate

An ordered list of component template names. Component templates are merged in the order specified, meaning that the last component template specified has the highest precedence. API name: composed_of

func (*SimulateIndexTemplate) Create

Create Whether the index template we optionally defined in the body should only be dry-run added if new or can also replace an existing one API name: create

func (*SimulateIndexTemplate) CreatedDate added in v9.2.0

Date and time when the index template was created. Only returned if the `human` query parameter is `true`. API name: created_date

func (*SimulateIndexTemplate) CreatedDateMillis added in v9.2.0

func (r *SimulateIndexTemplate) CreatedDateMillis(epochtimeunitmillis int64) *SimulateIndexTemplate

Date and time when the index template was created, in milliseconds since the epoch. API name: created_date_millis

func (*SimulateIndexTemplate) DataStream added in v9.2.0

If this object is included, the template is used to create data streams and their backing indices. Supports an empty object. Data streams require a matching index template with a `data_stream` object. API name: data_stream

func (*SimulateIndexTemplate) Deprecated added in v9.2.0

func (r *SimulateIndexTemplate) Deprecated(deprecated bool) *SimulateIndexTemplate

Marks this index template as deprecated. When creating or updating a non-deprecated index template that uses deprecated components, Elasticsearch will emit a deprecation warning. API name: deprecated

func (SimulateIndexTemplate) Do

func (r SimulateIndexTemplate) Do(providedCtx context.Context) (*Response, error)

Do runs the request through the transport, handle the response and returns a simulateindextemplate.Response

func (*SimulateIndexTemplate) ErrorTrace

func (r *SimulateIndexTemplate) ErrorTrace(errortrace bool) *SimulateIndexTemplate

ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors when they occur. API name: error_trace

func (*SimulateIndexTemplate) FilterPath

func (r *SimulateIndexTemplate) FilterPath(filterpaths ...string) *SimulateIndexTemplate

FilterPath Comma-separated list of filters in dot notation which reduce the response returned by Elasticsearch. API name: filter_path

func (*SimulateIndexTemplate) Header

func (r *SimulateIndexTemplate) Header(key, value string) *SimulateIndexTemplate

Header set a key, value pair in the SimulateIndexTemplate headers map.

func (*SimulateIndexTemplate) HttpRequest

func (r *SimulateIndexTemplate) HttpRequest(ctx context.Context) (*http.Request, error)

HttpRequest returns the http.Request object built from the given parameters.

func (*SimulateIndexTemplate) Human

Human When set to `true` will return statistics in a format suitable for humans. For example `"exists_time": "1h"` for humans and `"exists_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 (*SimulateIndexTemplate) IgnoreMissingComponentTemplates added in v9.2.0

func (r *SimulateIndexTemplate) IgnoreMissingComponentTemplates(names ...string) *SimulateIndexTemplate

A list of component template names that are allowed to be absent. API name: ignore_missing_component_templates

func (*SimulateIndexTemplate) IncludeDefaults

func (r *SimulateIndexTemplate) IncludeDefaults(includedefaults bool) *SimulateIndexTemplate

IncludeDefaults If true, returns all relevant default configurations for the index template. API name: include_defaults

func (*SimulateIndexTemplate) IndexPatterns added in v9.2.0

func (r *SimulateIndexTemplate) IndexPatterns(names ...string) *SimulateIndexTemplate

Name of the index template. API name: index_patterns

func (*SimulateIndexTemplate) MasterTimeout

func (r *SimulateIndexTemplate) MasterTimeout(duration string) *SimulateIndexTemplate

MasterTimeout 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 (*SimulateIndexTemplate) Meta_ added in v9.2.0

Optional user metadata about the index template. May have any contents. This map is not automatically generated by Elasticsearch. API name: _meta

func (*SimulateIndexTemplate) ModifiedDate added in v9.2.0

Date and time when the index template was last modified. Only returned if the `human` query parameter is `true`. API name: modified_date

func (*SimulateIndexTemplate) ModifiedDateMillis added in v9.2.0

func (r *SimulateIndexTemplate) ModifiedDateMillis(epochtimeunitmillis int64) *SimulateIndexTemplate

Date and time when the index template was last modified, in milliseconds since the epoch. API name: modified_date_millis

func (SimulateIndexTemplate) Perform

func (r SimulateIndexTemplate) Perform(providedCtx context.Context) (*http.Response, error)

Perform runs the http.Request through the provided transport and returns an http.Response.

func (*SimulateIndexTemplate) Pretty

Pretty If set to `true` the returned JSON will be "pretty-formatted". Only use this option for debugging only. API name: pretty

func (*SimulateIndexTemplate) Priority added in v9.2.0

func (r *SimulateIndexTemplate) Priority(priority int64) *SimulateIndexTemplate

Priority to determine index template precedence when a new data stream or index is created. The index template with the highest priority is chosen. If no priority is specified the template is treated as though it is of priority 0 (lowest priority). This number is not automatically generated by Elasticsearch. API name: priority

func (*SimulateIndexTemplate) Raw added in v9.2.0

Raw takes a json payload as input which is then passed to the http.Request If specified Raw takes precedence on Request method.

func (*SimulateIndexTemplate) Request added in v9.2.0

Request allows to set the request property with the appropriate payload.

func (*SimulateIndexTemplate) Template added in v9.2.0

Template to be applied. It may optionally include an `aliases`, `mappings`, or `settings` configuration. API name: template

func (*SimulateIndexTemplate) Version added in v9.2.0

func (r *SimulateIndexTemplate) Version(versionnumber int64) *SimulateIndexTemplate

Version number used to manage index templates externally. This number is not automatically generated by Elasticsearch. API name: version

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL