upgradejobsnapshot

package
v9.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Upgrade a snapshot. Upgrade an anomaly detection model snapshot to the latest major version. Over time, older snapshot formats are deprecated and removed. Anomaly detection jobs support only snapshots that are from the current or previous major version. This API provides a means to upgrade a snapshot to the current major version. This aids in preparing the cluster for an upgrade to the next major version. Only one snapshot per anomaly detection job can be upgraded at a time and the upgraded snapshot cannot be the current snapshot of the anomaly detection job.

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 NewUpgradeJobSnapshot

type NewUpgradeJobSnapshot func(jobid, snapshotid string) *UpgradeJobSnapshot

NewUpgradeJobSnapshot type alias for index.

func NewUpgradeJobSnapshotFunc

func NewUpgradeJobSnapshotFunc(tp elastictransport.Interface) NewUpgradeJobSnapshot

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

type Response

type Response struct {

	// Completed When true, this means the task is complete. When false, it is still running.
	Completed bool `json:"completed"`
	// Node The ID of the node that the upgrade task was started on if it is still
	// running. In serverless this will be the "serverless".
	Node string `json:"node"`
}

Response holds the response body struct for the package upgradejobsnapshot

https://github.com/elastic/elasticsearch-specification/blob/86f41834c7bb975159a38a73be8a9d930010d673/specification/ml/upgrade_job_snapshot/MlUpgradeJobSnapshotResponse.ts#L22-L31

func NewResponse

func NewResponse() *Response

NewResponse returns a Response

type UpgradeJobSnapshot

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

func New

Upgrade a snapshot. Upgrade an anomaly detection model snapshot to the latest major version. Over time, older snapshot formats are deprecated and removed. Anomaly detection jobs support only snapshots that are from the current or previous major version. This API provides a means to upgrade a snapshot to the current major version. This aids in preparing the cluster for an upgrade to the next major version. Only one snapshot per anomaly detection job can be upgraded at a time and the upgraded snapshot cannot be the current snapshot of the anomaly detection job.

https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-upgrade-job-snapshot

func (UpgradeJobSnapshot) Do

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

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

func (*UpgradeJobSnapshot) ErrorTrace

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

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

func (*UpgradeJobSnapshot) FilterPath

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

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

func (*UpgradeJobSnapshot) Header

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

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

func (*UpgradeJobSnapshot) HttpRequest

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

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

func (*UpgradeJobSnapshot) Human

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

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 (UpgradeJobSnapshot) IsSuccess

func (r UpgradeJobSnapshot) IsSuccess(providedCtx context.Context) (bool, error)

IsSuccess allows to run a query with a context and retrieve the result as a boolean. This only exists for endpoints without a request payload and allows for quick control flow.

func (UpgradeJobSnapshot) Perform

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

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

func (*UpgradeJobSnapshot) Pretty

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

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

func (*UpgradeJobSnapshot) Timeout

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

Timeout Controls the time to wait for the request to complete. API name: timeout

func (*UpgradeJobSnapshot) WaitForCompletion

func (r *UpgradeJobSnapshot) WaitForCompletion(waitforcompletion bool) *UpgradeJobSnapshot

WaitForCompletion When true, the API won’t respond until the upgrade is complete. Otherwise, it responds as soon as the upgrade task is assigned to a node. API name: wait_for_completion

Jump to

Keyboard shortcuts

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