updatetransform

package
v8.13.1 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 12 Imported by: 3

Documentation

Overview

Updates certain properties of a transform.

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 NewUpdateTransform

type NewUpdateTransform func(transformid string) *UpdateTransform

NewUpdateTransform type alias for index.

func NewUpdateTransformFunc

func NewUpdateTransformFunc(tp elastictransport.Interface) NewUpdateTransform

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

type Request

type Request struct {

	// Description Free text description of the transform.
	Description *string `json:"description,omitempty"`
	// Dest The destination for the transform.
	Dest *types.TransformDestination `json:"dest,omitempty"`
	// Frequency The interval between checks for changes in the source indices when the
	// transform is running continuously. Also determines the retry interval in
	// the event of transient failures while the transform is searching or
	// indexing. The minimum value is 1s and the maximum is 1h.
	Frequency types.Duration `json:"frequency,omitempty"`
	// Meta_ Defines optional transform metadata.
	Meta_ types.Metadata `json:"_meta,omitempty"`
	// RetentionPolicy Defines a retention policy for the transform. Data that meets the defined
	// criteria is deleted from the destination index.
	RetentionPolicy types.RetentionPolicyContainer `json:"retention_policy,omitempty"`
	// Settings Defines optional transform settings.
	Settings *types.Settings `json:"settings,omitempty"`
	// Source The source of the data for the transform.
	Source *types.TransformSource `json:"source,omitempty"`
	// Sync Defines the properties transforms require to run continuously.
	Sync *types.SyncContainer `json:"sync,omitempty"`
}

Request holds the request body struct for the package updatetransform

https://github.com/elastic/elasticsearch-specification/blob/5bf86339cd4bda77d07f6eaa6789b72f9c0279b1/specification/transform/update_transform/UpdateTransformRequest.ts#L31-L105

func NewRequest added in v8.5.0

func NewRequest() *Request

NewRequest returns a Request

func (*Request) FromJSON added in v8.5.0

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 added in v8.7.0

type Response struct {
	Authorization   *types.TransformAuthorization   `json:"authorization,omitempty"`
	CreateTime      int64                           `json:"create_time"`
	Description     string                          `json:"description"`
	Dest            types.ReindexDestination        `json:"dest"`
	Frequency       types.Duration                  `json:"frequency,omitempty"`
	Id              string                          `json:"id"`
	Latest          *types.Latest                   `json:"latest,omitempty"`
	Meta_           types.Metadata                  `json:"_meta,omitempty"`
	Pivot           *types.Pivot                    `json:"pivot,omitempty"`
	RetentionPolicy *types.RetentionPolicyContainer `json:"retention_policy,omitempty"`
	Settings        types.Settings                  `json:"settings"`
	Source          types.ReindexSource             `json:"source"`
	Sync            *types.SyncContainer            `json:"sync,omitempty"`
	Version         string                          `json:"version"`
}

Response holds the response body struct for the package updatetransform

https://github.com/elastic/elasticsearch-specification/blob/5bf86339cd4bda77d07f6eaa6789b72f9c0279b1/specification/transform/update_transform/UpdateTransformResponse.ts#L33-L51

func NewResponse added in v8.7.0

func NewResponse() *Response

NewResponse returns a Response

type UpdateTransform

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

func (*UpdateTransform) DeferValidation

func (r *UpdateTransform) DeferValidation(defervalidation bool) *UpdateTransform

DeferValidation When true, deferrable validations are not run. This behavior may be desired if the source index does not exist until after the transform is created. API name: defer_validation

func (*UpdateTransform) Description added in v8.9.0

func (r *UpdateTransform) Description(description string) *UpdateTransform

Description Free text description of the transform. API name: description

func (*UpdateTransform) Dest added in v8.9.0

Dest The destination for the transform. API name: dest

func (UpdateTransform) Do

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

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

func (*UpdateTransform) Frequency added in v8.9.0

func (r *UpdateTransform) Frequency(duration types.Duration) *UpdateTransform

Frequency The interval between checks for changes in the source indices when the transform is running continuously. Also determines the retry interval in the event of transient failures while the transform is searching or indexing. The minimum value is 1s and the maximum is 1h. API name: frequency

func (*UpdateTransform) Header

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

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

func (*UpdateTransform) HttpRequest

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

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

func (*UpdateTransform) Meta_ added in v8.9.0

func (r *UpdateTransform) Meta_(metadata types.Metadata) *UpdateTransform

Meta_ Defines optional transform metadata. API name: _meta

func (UpdateTransform) Perform added in v8.7.0

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

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

func (*UpdateTransform) 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 (*UpdateTransform) Request

func (r *UpdateTransform) Request(req *Request) *UpdateTransform

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

func (*UpdateTransform) RetentionPolicy added in v8.9.0

func (r *UpdateTransform) RetentionPolicy(retentionpolicy types.RetentionPolicyContainer) *UpdateTransform

RetentionPolicy Defines a retention policy for the transform. Data that meets the defined criteria is deleted from the destination index. API name: retention_policy

func (*UpdateTransform) Settings added in v8.9.0

func (r *UpdateTransform) Settings(settings *types.Settings) *UpdateTransform

Settings Defines optional transform settings. API name: settings

func (*UpdateTransform) Source added in v8.9.0

Source The source of the data for the transform. API name: source

func (*UpdateTransform) Sync added in v8.9.0

Sync Defines the properties transforms require to run continuously. API name: sync

func (*UpdateTransform) Timeout

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

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

Jump to

Keyboard shortcuts

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