Documentation ¶
Overview ¶
Upgrades a given job snapshot to the current major version.
Index ¶
- Variables
- type NewUpgradeJobSnapshot
- type Response
- type UpgradeJobSnapshot
- func (r UpgradeJobSnapshot) Do(ctx context.Context) (*Response, error)
- func (r *UpgradeJobSnapshot) Header(key, value string) *UpgradeJobSnapshot
- func (r *UpgradeJobSnapshot) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r UpgradeJobSnapshot) IsSuccess(ctx context.Context) (bool, error)
- func (r *UpgradeJobSnapshot) JobId(v string) *UpgradeJobSnapshot
- func (r UpgradeJobSnapshot) Perform(ctx context.Context) (*http.Response, error)
- func (r *UpgradeJobSnapshot) SnapshotId(v string) *UpgradeJobSnapshot
- func (r *UpgradeJobSnapshot) Timeout(v string) *UpgradeJobSnapshot
- func (r *UpgradeJobSnapshot) WaitForCompletion(b bool) *UpgradeJobSnapshot
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 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 UpgradeJobSnapshot ¶
type UpgradeJobSnapshot struct {
// contains filtered or unexported fields
}
func New ¶
func New(tp elastictransport.Interface) *UpgradeJobSnapshot
Upgrades a given job snapshot to the current major version.
https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-upgrade-job-model-snapshot.html
func (UpgradeJobSnapshot) Do ¶
func (r UpgradeJobSnapshot) Do(ctx context.Context) (*Response, error)
Do runs the request through the transport, handle the response and returns a upgradejobsnapshot.Response
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 ¶
HttpRequest returns the http.Request object built from the given parameters.
func (UpgradeJobSnapshot) IsSuccess ¶
func (r UpgradeJobSnapshot) IsSuccess(ctx 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) JobId ¶
func (r *UpgradeJobSnapshot) JobId(v string) *UpgradeJobSnapshot
JobId Identifier for the anomaly detection job. API Name: jobid
func (UpgradeJobSnapshot) Perform ¶
Perform runs the http.Request through the provided transport and returns an http.Response.
func (*UpgradeJobSnapshot) SnapshotId ¶
func (r *UpgradeJobSnapshot) SnapshotId(v string) *UpgradeJobSnapshot
SnapshotId A numerical character string that uniquely identifies the model snapshot. API Name: snapshotid
func (*UpgradeJobSnapshot) Timeout ¶
func (r *UpgradeJobSnapshot) Timeout(v string) *UpgradeJobSnapshot
Timeout Controls the time to wait for the request to complete. API name: timeout
func (*UpgradeJobSnapshot) WaitForCompletion ¶
func (r *UpgradeJobSnapshot) WaitForCompletion(b 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