Documentation ¶
Overview ¶
Update data stream lifecycles. Update the data stream lifecycle of the specified data streams.
Index ¶
- Variables
- type NewPutDataLifecycle
- type PutDataLifecycle
- func (r *PutDataLifecycle) DataRetention(duration types.Duration) *PutDataLifecycle
- func (r PutDataLifecycle) Do(providedCtx context.Context) (*Response, error)
- func (r *PutDataLifecycle) Downsampling(downsampling *types.DataStreamLifecycleDownsampling) *PutDataLifecycle
- func (r *PutDataLifecycle) ErrorTrace(errortrace bool) *PutDataLifecycle
- func (r *PutDataLifecycle) ExpandWildcards(expandwildcards ...expandwildcard.ExpandWildcard) *PutDataLifecycle
- func (r *PutDataLifecycle) FilterPath(filterpaths ...string) *PutDataLifecycle
- func (r *PutDataLifecycle) Header(key, value string) *PutDataLifecycle
- func (r *PutDataLifecycle) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r *PutDataLifecycle) Human(human bool) *PutDataLifecycle
- func (r *PutDataLifecycle) MasterTimeout(duration string) *PutDataLifecycle
- func (r PutDataLifecycle) Perform(providedCtx context.Context) (*http.Response, error)
- func (r *PutDataLifecycle) Pretty(pretty bool) *PutDataLifecycle
- func (r *PutDataLifecycle) Raw(raw io.Reader) *PutDataLifecycle
- func (r *PutDataLifecycle) Request(req *Request) *PutDataLifecycle
- func (r *PutDataLifecycle) Timeout(duration string) *PutDataLifecycle
- type Request
- type Response
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 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 ¶
func New(tp elastictransport.Interface) *PutDataLifecycle
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
func (r *PutDataLifecycle) Downsampling(downsampling *types.DataStreamLifecycleDownsampling) *PutDataLifecycle
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 ¶
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 ¶
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 ¶
func (r *PutDataLifecycle) Raw(raw io.Reader) *PutDataLifecycle
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