putdatalifecycle

package
v8.9.0 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2023 License: Apache-2.0 Imports: 12 Imported by: 2

Documentation

Overview

Updates the data lifecycle of the selected 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 (*PutDataLifecycle) DataRetention added in v8.9.0

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

API name: data_retention

func (PutDataLifecycle) Do

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

func (*PutDataLifecycle) ExpandWildcards

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

ExpandWildcards Whether wildcard expressions should get expanded to open or closed indices (default: open) API name: expand_wildcards

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) MasterTimeout

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

MasterTimeout Specify timeout for connection to master API name: master_timeout

func (*PutDataLifecycle) Name

func (r *PutDataLifecycle) Name(name string) *PutDataLifecycle

Name A comma-separated list of data streams whose lifecycle will be updated; use `*` to set the lifecycle to all data streams API Name: name

func (PutDataLifecycle) Perform

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

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

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 Explicit timestamp for the document API name: timeout

type Request

type Request struct {
	DataRetention types.Duration `json:"data_retention,omitempty"`
}

Request holds the request body struct for the package putdatalifecycle

https://github.com/elastic/elasticsearch-specification/blob/656080dee792f93a849cd7fbf566f528f858a5ea/specification/indices/put_data_lifecycle/IndicesPutDataLifecycleRequest.ts#L24-L42

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

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"`
}

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