Documentation
¶
Overview ¶
Simulate an index. Get the index configuration that would be applied to the specified index from an existing index template.
Index ¶
- Variables
- type NewSimulateIndexTemplate
- type Request
- type Response
- type SimulateIndexTemplate
- func (r *SimulateIndexTemplate) AllowAutoCreate(allowautocreate bool) *SimulateIndexTemplate
- func (r *SimulateIndexTemplate) Cause(cause string) *SimulateIndexTemplate
- func (r *SimulateIndexTemplate) ComposedOf(composedofs ...string) *SimulateIndexTemplate
- func (r *SimulateIndexTemplate) Create(create bool) *SimulateIndexTemplate
- func (r *SimulateIndexTemplate) CreatedDate(datetime types.DateTimeVariant) *SimulateIndexTemplate
- func (r *SimulateIndexTemplate) CreatedDateMillis(epochtimeunitmillis int64) *SimulateIndexTemplate
- func (r *SimulateIndexTemplate) DataStream(datastream types.IndexTemplateDataStreamConfigurationVariant) *SimulateIndexTemplate
- func (r *SimulateIndexTemplate) Deprecated(deprecated bool) *SimulateIndexTemplate
- func (r SimulateIndexTemplate) Do(providedCtx context.Context) (*Response, error)
- func (r *SimulateIndexTemplate) ErrorTrace(errortrace bool) *SimulateIndexTemplate
- func (r *SimulateIndexTemplate) FilterPath(filterpaths ...string) *SimulateIndexTemplate
- func (r *SimulateIndexTemplate) Header(key, value string) *SimulateIndexTemplate
- func (r *SimulateIndexTemplate) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r *SimulateIndexTemplate) Human(human bool) *SimulateIndexTemplate
- func (r *SimulateIndexTemplate) IgnoreMissingComponentTemplates(names ...string) *SimulateIndexTemplate
- func (r *SimulateIndexTemplate) IncludeDefaults(includedefaults bool) *SimulateIndexTemplate
- func (r *SimulateIndexTemplate) IndexPatterns(names ...string) *SimulateIndexTemplate
- func (r *SimulateIndexTemplate) MasterTimeout(duration string) *SimulateIndexTemplate
- func (r *SimulateIndexTemplate) Meta_(metadata types.MetadataVariant) *SimulateIndexTemplate
- func (r *SimulateIndexTemplate) ModifiedDate(datetime types.DateTimeVariant) *SimulateIndexTemplate
- func (r *SimulateIndexTemplate) ModifiedDateMillis(epochtimeunitmillis int64) *SimulateIndexTemplate
- func (r SimulateIndexTemplate) Perform(providedCtx context.Context) (*http.Response, error)
- func (r *SimulateIndexTemplate) Pretty(pretty bool) *SimulateIndexTemplate
- func (r *SimulateIndexTemplate) Priority(priority int64) *SimulateIndexTemplate
- func (r *SimulateIndexTemplate) Raw(raw io.Reader) *SimulateIndexTemplate
- func (r *SimulateIndexTemplate) Request(req *Request) *SimulateIndexTemplate
- func (r *SimulateIndexTemplate) Template(template types.IndexTemplateSummaryVariant) *SimulateIndexTemplate
- func (r *SimulateIndexTemplate) Version(versionnumber int64) *SimulateIndexTemplate
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 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
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
type SimulateIndexTemplate ¶
type SimulateIndexTemplate struct {
// contains filtered or unexported fields
}
func New ¶
func New(tp elastictransport.Interface) *SimulateIndexTemplate
Simulate an index. Get the index configuration that would be applied to the specified index from an existing 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 ¶
func (r *SimulateIndexTemplate) Cause(cause string) *SimulateIndexTemplate
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 ¶
func (r *SimulateIndexTemplate) Create(create bool) *SimulateIndexTemplate
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
func (r *SimulateIndexTemplate) CreatedDate(datetime types.DateTimeVariant) *SimulateIndexTemplate
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
func (r *SimulateIndexTemplate) DataStream(datastream types.IndexTemplateDataStreamConfigurationVariant) *SimulateIndexTemplate
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 ¶
HttpRequest returns the http.Request object built from the given parameters.
func (*SimulateIndexTemplate) Human ¶
func (r *SimulateIndexTemplate) Human(human bool) *SimulateIndexTemplate
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
func (r *SimulateIndexTemplate) Meta_(metadata types.MetadataVariant) *SimulateIndexTemplate
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
func (r *SimulateIndexTemplate) ModifiedDate(datetime types.DateTimeVariant) *SimulateIndexTemplate
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 ¶
Perform runs the http.Request through the provided transport and returns an http.Response.
func (*SimulateIndexTemplate) Pretty ¶
func (r *SimulateIndexTemplate) Pretty(pretty bool) *SimulateIndexTemplate
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
func (r *SimulateIndexTemplate) Raw(raw io.Reader) *SimulateIndexTemplate
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
func (r *SimulateIndexTemplate) Request(req *Request) *SimulateIndexTemplate
Request allows to set the request property with the appropriate payload.
func (*SimulateIndexTemplate) Template ¶ added in v9.2.0
func (r *SimulateIndexTemplate) Template(template types.IndexTemplateSummaryVariant) *SimulateIndexTemplate
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