putdatalifecycle

package
v8.17.0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 13 Imported by: 2

Documentation

Overview

Update data stream lifecycles. Update the data stream lifecycle of the specified data streams.

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 NewPutDataLifecycle

type NewPutDataLifecycle func(name string) *PutDataLifecycle

NewPutDataLifecycle type alias for index.

func NewPutDataLifecycleFunc

func NewPutDataLifecycleFunc(tp elastictransport.Interface) NewPutDataLifecycle

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

type PutDataLifecycle

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

func New

Update data stream lifecycles. Update the data stream lifecycle of the specified data streams.

https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams-put-lifecycle.html

func (*PutDataLifecycle) DataRetention added in v8.9.0

func (r *PutDataLifecycle) DataRetention(duration types.Duration) *PutDataLifecycle

DataRetention If defined, every document added to this data stream will be stored at least for this time frame. Any time after this duration the document could be deleted. When empty, every document in this data stream will be stored indefinitely. API name: data_retention

func (PutDataLifecycle) Do

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

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

func (*PutDataLifecycle) Downsampling added in v8.11.0

Downsampling If defined, every backing index will execute the configured downsampling configuration after the backing index is not the data stream write index anymore. API name: downsampling

func (*PutDataLifecycle) ErrorTrace added in v8.14.0

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

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

func (*PutDataLifecycle) ExpandWildcards

func (r *PutDataLifecycle) ExpandWildcards(expandwildcards ...expandwildcard.ExpandWildcard) *PutDataLifecycle

ExpandWildcards Type of data stream that wildcard patterns can match. Supports comma-separated values, such as `open,hidden`. Valid values are: `all`, `hidden`, `open`, `closed`, `none`. API name: expand_wildcards

func (*PutDataLifecycle) FilterPath added in v8.14.0

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

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

func (*PutDataLifecycle) Header

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

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

func (*PutDataLifecycle) HttpRequest

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

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

func (*PutDataLifecycle) Human added in v8.14.0

func (r *PutDataLifecycle) Human(human bool) *PutDataLifecycle

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 (*PutDataLifecycle) MasterTimeout

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

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 (PutDataLifecycle) Perform

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

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

func (*PutDataLifecycle) Pretty added in v8.14.0

func (r *PutDataLifecycle) Pretty(pretty bool) *PutDataLifecycle

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

func (*PutDataLifecycle) Raw

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

func (*PutDataLifecycle) Request

func (r *PutDataLifecycle) Request(req *Request) *PutDataLifecycle

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

func (*PutDataLifecycle) Timeout

func (r *PutDataLifecycle) Timeout(duration string) *PutDataLifecycle

Timeout 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

type Request

type Request struct {

	// DataRetention If defined, every document added to this data stream will be stored at least
	// for this time frame.
	// Any time after this duration the document could be deleted.
	// When empty, every document in this data stream will be stored indefinitely.
	DataRetention types.Duration `json:"data_retention,omitempty"`
	// Downsampling If defined, every backing index will execute the configured downsampling
	// configuration after the backing
	// index is not the data stream write index anymore.
	Downsampling *types.DataStreamLifecycleDownsampling `json:"downsampling,omitempty"`
}

Request holds the request body struct for the package putdatalifecycle

https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/put_data_lifecycle/IndicesPutDataLifecycleRequest.ts#L25-L76

func NewRequest

func NewRequest() *Request

NewRequest returns a Request

func (*Request) FromJSON

func (r *Request) FromJSON(data string) (*Request, error)

FromJSON allows to load an arbitrary json into the request structure

func (*Request) UnmarshalJSON added in v8.12.1

func (s *Request) UnmarshalJSON(data []byte) error

type Response

type Response struct {

	// Acknowledged For a successful response, this value is always true. On failure, an
	// exception is returned instead.
	Acknowledged bool `json:"acknowledged"`
}

Response holds the response body struct for the package putdatalifecycle

https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/indices/put_data_lifecycle/IndicesPutDataLifecycleResponse.ts#L22-L24

func NewResponse

func NewResponse() *Response

NewResponse returns a Response

Jump to

Keyboard shortcuts

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