Documentation
¶
Overview ¶
Updates certain properties of an anomaly detection job.
Index ¶
- Variables
- type NewUpdateJob
- type Request
- type RequestBuilder
- func (rb *RequestBuilder) AllowLazyOpen(allowlazyopen bool) *RequestBuilder
- func (rb *RequestBuilder) AnalysisLimits(analysislimits *types.AnalysisMemoryLimitBuilder) *RequestBuilder
- func (rb *RequestBuilder) BackgroundPersistInterval(backgroundpersistinterval *types.DurationBuilder) *RequestBuilder
- func (rb *RequestBuilder) Build() *Request
- func (rb *RequestBuilder) CategorizationFilters(categorization_filters ...string) *RequestBuilder
- func (rb *RequestBuilder) CustomSettings(value map[string]interface{}) *RequestBuilder
- func (rb *RequestBuilder) DailyModelSnapshotRetentionAfterDays(dailymodelsnapshotretentionafterdays int64) *RequestBuilder
- func (rb *RequestBuilder) Description(description string) *RequestBuilder
- func (rb *RequestBuilder) Detectors(detectors []types.DetectorBuilder) *RequestBuilder
- func (rb *RequestBuilder) FromJSON(data string) (*Request, error)
- func (rb *RequestBuilder) Groups(groups ...string) *RequestBuilder
- func (rb *RequestBuilder) ModelPlotConfig(modelplotconfig *types.ModelPlotConfigBuilder) *RequestBuilder
- func (rb *RequestBuilder) ModelSnapshotRetentionDays(modelsnapshotretentiondays int64) *RequestBuilder
- func (rb *RequestBuilder) PerPartitionCategorization(perpartitioncategorization *types.PerPartitionCategorizationBuilder) *RequestBuilder
- func (rb *RequestBuilder) RenormalizationWindowDays(renormalizationwindowdays int64) *RequestBuilder
- func (rb *RequestBuilder) ResultsRetentionDays(resultsretentiondays int64) *RequestBuilder
- type UpdateJob
- func (r UpdateJob) Do(ctx context.Context) (*http.Response, error)
- func (r *UpdateJob) Header(key, value string) *UpdateJob
- func (r *UpdateJob) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r *UpdateJob) JobId(v string) *UpdateJob
- func (r *UpdateJob) Raw(raw json.RawMessage) *UpdateJob
- func (r *UpdateJob) Request(req *Request) *UpdateJob
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 NewUpdateJob ¶
NewUpdateJob type alias for index.
func NewUpdateJobFunc ¶
func NewUpdateJobFunc(tp elastictransport.Interface) NewUpdateJob
NewUpdateJobFunc returns a new instance of UpdateJob 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 {
// AllowLazyOpen Advanced configuration option. Specifies whether this job can open when
// there is insufficient machine learning node capacity for it to be
// immediately assigned to a node. If `false` and a machine learning node
// with capacity to run the job cannot immediately be found, the open
// anomaly detection jobs API returns an error. However, this is also
// subject to the cluster-wide `xpack.ml.max_lazy_ml_nodes` setting. If this
// option is set to `true`, the open anomaly detection jobs API does not
// return an error and the job waits in the opening state until sufficient
// machine learning node capacity is available.
AllowLazyOpen *bool `json:"allow_lazy_open,omitempty"`
AnalysisLimits *types.AnalysisMemoryLimit `json:"analysis_limits,omitempty"`
// BackgroundPersistInterval Advanced configuration option. The time between each periodic persistence
// of the model.
// The default value is a randomized value between 3 to 4 hours, which
// avoids all jobs persisting at exactly the same time. The smallest allowed
// value is 1 hour.
// For very large models (several GB), persistence could take 10-20 minutes,
// so do not set the value too low.
// If the job is open when you make the update, you must stop the datafeed,
// close the job, then reopen the job and restart the datafeed for the
// changes to take effect.
BackgroundPersistInterval *types.Duration `json:"background_persist_interval,omitempty"`
CategorizationFilters []string `json:"categorization_filters,omitempty"`
// CustomSettings Advanced configuration option. Contains custom meta data about the job.
// For example, it can contain custom URL information as shown in Adding
// custom URLs to machine learning results.
CustomSettings map[string]interface{} `json:"custom_settings,omitempty"`
// DailyModelSnapshotRetentionAfterDays Advanced configuration option, which affects the automatic removal of old
// model snapshots for this job. It specifies a period of time (in days)
// after which only the first snapshot per day is retained. This period is
// relative to the timestamp of the most recent snapshot for this job. Valid
// values range from 0 to `model_snapshot_retention_days`. For jobs created
// before version 7.8.0, the default value matches
// `model_snapshot_retention_days`.
DailyModelSnapshotRetentionAfterDays *int64 `json:"daily_model_snapshot_retention_after_days,omitempty"`
// Description A description of the job.
Description *string `json:"description,omitempty"`
// Detectors An array of detector update objects.
Detectors []types.Detector `json:"detectors,omitempty"`
// Groups A list of job groups. A job can belong to no groups or many.
Groups []string `json:"groups,omitempty"`
ModelPlotConfig *types.ModelPlotConfig `json:"model_plot_config,omitempty"`
// ModelSnapshotRetentionDays Advanced configuration option, which affects the automatic removal of old
// model snapshots for this job. It specifies the maximum period of time (in
// days) that snapshots are retained. This period is relative to the
// timestamp of the most recent snapshot for this job.
ModelSnapshotRetentionDays *int64 `json:"model_snapshot_retention_days,omitempty"`
// PerPartitionCategorization Settings related to how categorization interacts with partition fields.
PerPartitionCategorization *types.PerPartitionCategorization `json:"per_partition_categorization,omitempty"`
// RenormalizationWindowDays Advanced configuration option. The period over which adjustments to the
// score are applied, as new data is seen.
RenormalizationWindowDays *int64 `json:"renormalization_window_days,omitempty"`
// ResultsRetentionDays Advanced configuration option. The period of time (in days) that results
// are retained. Age is calculated relative to the timestamp of the latest
// bucket result. If this property has a non-null value, once per day at
// 00:30 (server time), results that are the specified number of days older
// than the latest bucket result are deleted from Elasticsearch. The default
// value is null, which means all results are retained.
ResultsRetentionDays *int64 `json:"results_retention_days,omitempty"`
}
Request holds the request body struct for the package updatejob
type RequestBuilder ¶
type RequestBuilder struct {
// contains filtered or unexported fields
}
RequestBuilder is the builder API for the updatejob.Request
func NewRequestBuilder ¶
func NewRequestBuilder() *RequestBuilder
NewRequest returns a RequestBuilder which can be chained and built to retrieve a RequestBuilder
func (*RequestBuilder) AllowLazyOpen ¶
func (rb *RequestBuilder) AllowLazyOpen(allowlazyopen bool) *RequestBuilder
func (*RequestBuilder) AnalysisLimits ¶
func (rb *RequestBuilder) AnalysisLimits(analysislimits *types.AnalysisMemoryLimitBuilder) *RequestBuilder
func (*RequestBuilder) BackgroundPersistInterval ¶
func (rb *RequestBuilder) BackgroundPersistInterval(backgroundpersistinterval *types.DurationBuilder) *RequestBuilder
func (*RequestBuilder) Build ¶
func (rb *RequestBuilder) Build() *Request
Build finalize the chain and returns the Request struct.
func (*RequestBuilder) CategorizationFilters ¶
func (rb *RequestBuilder) CategorizationFilters(categorization_filters ...string) *RequestBuilder
func (*RequestBuilder) CustomSettings ¶
func (rb *RequestBuilder) CustomSettings(value map[string]interface{}) *RequestBuilder
func (*RequestBuilder) DailyModelSnapshotRetentionAfterDays ¶
func (rb *RequestBuilder) DailyModelSnapshotRetentionAfterDays(dailymodelsnapshotretentionafterdays int64) *RequestBuilder
func (*RequestBuilder) Description ¶
func (rb *RequestBuilder) Description(description string) *RequestBuilder
func (*RequestBuilder) Detectors ¶
func (rb *RequestBuilder) Detectors(detectors []types.DetectorBuilder) *RequestBuilder
func (*RequestBuilder) FromJSON ¶
func (rb *RequestBuilder) FromJSON(data string) (*Request, error)
FromJSON allows to load an arbitrary json into the request structure
func (*RequestBuilder) Groups ¶
func (rb *RequestBuilder) Groups(groups ...string) *RequestBuilder
func (*RequestBuilder) ModelPlotConfig ¶
func (rb *RequestBuilder) ModelPlotConfig(modelplotconfig *types.ModelPlotConfigBuilder) *RequestBuilder
func (*RequestBuilder) ModelSnapshotRetentionDays ¶
func (rb *RequestBuilder) ModelSnapshotRetentionDays(modelsnapshotretentiondays int64) *RequestBuilder
func (*RequestBuilder) PerPartitionCategorization ¶
func (rb *RequestBuilder) PerPartitionCategorization(perpartitioncategorization *types.PerPartitionCategorizationBuilder) *RequestBuilder
func (*RequestBuilder) RenormalizationWindowDays ¶
func (rb *RequestBuilder) RenormalizationWindowDays(renormalizationwindowdays int64) *RequestBuilder
func (*RequestBuilder) ResultsRetentionDays ¶
func (rb *RequestBuilder) ResultsRetentionDays(resultsretentiondays int64) *RequestBuilder
type UpdateJob ¶
type UpdateJob struct {
// contains filtered or unexported fields
}
func New ¶
func New(tp elastictransport.Interface) *UpdateJob
Updates certain properties of an anomaly detection job.
https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-job.html
func (*UpdateJob) HttpRequest ¶
HttpRequest returns the http.Request object built from the given parameters.