Documentation
¶
Overview ¶
Update a transform. Updates certain properties of a transform.
All updated properties except `description` do not take effect until after the transform starts the next checkpoint, thus there is data consistency in each checkpoint. To use this API, you must have `read` and `view_index_metadata` privileges for the source indices. You must also have `index` and `read` privileges for the destination index. When Elasticsearch security features are enabled, the transform remembers which roles the user who updated it had at the time of update and runs with those privileges.
Index ¶
- Variables
- type NewUpdateTransform
- type Request
- type Response
- type UpdateTransform
- func (r *UpdateTransform) DeferValidation(defervalidation bool) *UpdateTransform
- func (r *UpdateTransform) Description(description string) *UpdateTransform
- func (r *UpdateTransform) Dest(dest types.TransformDestinationVariant) *UpdateTransform
- func (r UpdateTransform) Do(providedCtx context.Context) (*Response, error)
- func (r *UpdateTransform) ErrorTrace(errortrace bool) *UpdateTransform
- func (r *UpdateTransform) FilterPath(filterpaths ...string) *UpdateTransform
- func (r *UpdateTransform) Frequency(duration types.DurationVariant) *UpdateTransform
- func (r *UpdateTransform) Header(key, value string) *UpdateTransform
- func (r *UpdateTransform) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r *UpdateTransform) Human(human bool) *UpdateTransform
- func (r *UpdateTransform) Meta_(metadata types.MetadataVariant) *UpdateTransform
- func (r UpdateTransform) Perform(providedCtx context.Context) (*http.Response, error)
- func (r *UpdateTransform) Pretty(pretty bool) *UpdateTransform
- func (r *UpdateTransform) Raw(raw io.Reader) *UpdateTransform
- func (r *UpdateTransform) Request(req *Request) *UpdateTransform
- func (r *UpdateTransform) RetentionPolicy(retentionpolicy types.RetentionPolicyContainerVariant) *UpdateTransform
- func (r *UpdateTransform) Settings(settings types.SettingsVariant) *UpdateTransform
- func (r *UpdateTransform) Source(source types.TransformSourceVariant) *UpdateTransform
- func (r *UpdateTransform) Sync(sync types.SyncContainerVariant) *UpdateTransform
- func (r *UpdateTransform) Timeout(duration string) *UpdateTransform
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 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
func (*Request) UnmarshalJSON ¶
type Response ¶
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
type UpdateTransform ¶
type UpdateTransform struct {
// contains filtered or unexported fields
}
func New ¶
func New(tp elastictransport.Interface) *UpdateTransform
Update a transform. Updates certain properties of a transform.
All updated properties except `description` do not take effect until after the transform starts the next checkpoint, thus there is data consistency in each checkpoint. To use this API, you must have `read` and `view_index_metadata` privileges for the source indices. You must also have `index` and `read` privileges for the destination index. When Elasticsearch security features are enabled, the transform remembers which roles the user who updated it had at the time of update and runs with those privileges.
https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-transform-update-transform
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 ¶
func (r *UpdateTransform) Description(description string) *UpdateTransform
Free text description of the transform. API name: description
func (*UpdateTransform) Dest ¶
func (r *UpdateTransform) Dest(dest types.TransformDestinationVariant) *UpdateTransform
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) ErrorTrace ¶
func (r *UpdateTransform) ErrorTrace(errortrace bool) *UpdateTransform
ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors when they occur. API name: error_trace
func (*UpdateTransform) FilterPath ¶
func (r *UpdateTransform) FilterPath(filterpaths ...string) *UpdateTransform
FilterPath Comma-separated list of filters in dot notation which reduce the response returned by Elasticsearch. API name: filter_path
func (*UpdateTransform) Frequency ¶
func (r *UpdateTransform) Frequency(duration types.DurationVariant) *UpdateTransform
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 ¶
HttpRequest returns the http.Request object built from the given parameters.
func (*UpdateTransform) Human ¶
func (r *UpdateTransform) Human(human bool) *UpdateTransform
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 (*UpdateTransform) Meta_ ¶
func (r *UpdateTransform) Meta_(metadata types.MetadataVariant) *UpdateTransform
Defines optional transform metadata. API name: _meta
func (UpdateTransform) Perform ¶
Perform runs the http.Request through the provided transport and returns an http.Response.
func (*UpdateTransform) Pretty ¶
func (r *UpdateTransform) Pretty(pretty bool) *UpdateTransform
Pretty If set to `true` the returned JSON will be "pretty-formatted". Only use this option for debugging only. API name: pretty
func (*UpdateTransform) Raw ¶
func (r *UpdateTransform) Raw(raw io.Reader) *UpdateTransform
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 ¶
func (r *UpdateTransform) RetentionPolicy(retentionpolicy types.RetentionPolicyContainerVariant) *UpdateTransform
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 ¶
func (r *UpdateTransform) Settings(settings types.SettingsVariant) *UpdateTransform
Defines optional transform settings. API name: settings
func (*UpdateTransform) Source ¶
func (r *UpdateTransform) Source(source types.TransformSourceVariant) *UpdateTransform
The source of the data for the transform. API name: source
func (*UpdateTransform) Sync ¶
func (r *UpdateTransform) Sync(sync types.SyncContainerVariant) *UpdateTransform
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