getoverallbuckets

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Retrieves overall bucket results that summarize the bucket results of multiple anomaly detection jobs.

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 GetOverallBuckets

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

func New

Retrieves overall bucket results that summarize the bucket results of multiple anomaly detection jobs.

https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-overall-buckets.html

func (*GetOverallBuckets) AllowNoMatch

func (r *GetOverallBuckets) AllowNoMatch(b bool) *GetOverallBuckets

AllowNoMatch Specifies what to do when the request:

1. Contains wildcard expressions and there are no jobs that match. 2. Contains the `_all` string or no identifiers and there are no matches. 3. Contains wildcard expressions and there are only partial matches.

If `true`, the request returns an empty `jobs` array when there are no matches and the subset of results when there are partial matches. If this parameter is `false`, the request returns a `404` status code when there are no matches or only partial matches. API name: allow_no_match

func (*GetOverallBuckets) BucketSpan

func (r *GetOverallBuckets) BucketSpan(v string) *GetOverallBuckets

BucketSpan The span of the overall buckets. Must be greater or equal to the largest bucket span of the specified anomaly detection jobs, which is the default value.

By default, an overall bucket has a span equal to the largest bucket span of the specified anomaly detection jobs. To override that behavior, use the optional `bucket_span` parameter. API name: bucket_span

func (GetOverallBuckets) Do

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

func (*GetOverallBuckets) End

End Returns overall buckets with timestamps earlier than this time. API name: end

func (*GetOverallBuckets) ExcludeInterim

func (r *GetOverallBuckets) ExcludeInterim(b bool) *GetOverallBuckets

ExcludeInterim If `true`, the output excludes interim results. API name: exclude_interim

func (*GetOverallBuckets) Header

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

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

func (*GetOverallBuckets) HttpRequest

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

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

func (*GetOverallBuckets) JobId

JobId Identifier for the anomaly detection job. It can be a job identifier, a group name, a comma-separated list of jobs or groups, or a wildcard expression.

You can summarize the bucket results for all anomaly detection jobs by using `_all` or by specifying `*` as the `<job_id>`. API Name: jobid

func (*GetOverallBuckets) OverallScore

func (r *GetOverallBuckets) OverallScore(v string) *GetOverallBuckets

OverallScore Returns overall buckets with overall scores greater than or equal to this value. API name: overall_score

func (GetOverallBuckets) Perform

func (r GetOverallBuckets) Perform(ctx context.Context) (*http.Response, error)

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

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

func (r *GetOverallBuckets) Request(req *Request) *GetOverallBuckets

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

func (*GetOverallBuckets) Start

Start Returns overall buckets with timestamps after this time. API name: start

func (*GetOverallBuckets) TopN

TopN The number of top anomaly detection job bucket scores to be used in the `overall_score` calculation. API name: top_n

type NewGetOverallBuckets

type NewGetOverallBuckets func(jobid string) *GetOverallBuckets

NewGetOverallBuckets type alias for index.

func NewGetOverallBucketsFunc

func NewGetOverallBucketsFunc(tp elastictransport.Interface) NewGetOverallBuckets

NewGetOverallBucketsFunc returns a new instance of GetOverallBuckets 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 {

	// AllowNoMatch Refer to the description for the `allow_no_match` query parameter.
	AllowNoMatch *bool `json:"allow_no_match,omitempty"`
	// BucketSpan Refer to the description for the `bucket_span` query parameter.
	BucketSpan types.Duration `json:"bucket_span,omitempty"`
	// End Refer to the description for the `end` query parameter.
	End types.DateTime `json:"end,omitempty"`
	// ExcludeInterim Refer to the description for the `exclude_interim` query parameter.
	ExcludeInterim *bool `json:"exclude_interim,omitempty"`
	// OverallScore Refer to the description for the `overall_score` query parameter.
	OverallScore string `json:"overall_score,omitempty"`
	// Start Refer to the description for the `start` query parameter.
	Start types.DateTime `json:"start,omitempty"`
	// TopN Refer to the description for the `top_n` query parameter.
	TopN *int `json:"top_n,omitempty"`
}

Request holds the request body struct for the package getoverallbuckets

https://github.com/elastic/elasticsearch-specification/blob/1ad7fe36297b3a8e187b2259dedaf68a47bc236e/specification/ml/get_overall_buckets/MlGetOverallBucketsRequest.ts#L25-L143

func NewRequest

func NewRequest() *Request

NewRequest returns a Request

func (*Request) FromJSON

func (r *Request) FromJSON(data string) (*Request, error)

FromJSON allows to load an arbitrary json into the request structure

type Response

type Response struct {
	Count int64 `json:"count"`
	// OverallBuckets Array of overall bucket objects
	OverallBuckets []types.OverallBucket `json:"overall_buckets"`
}

func NewResponse

func NewResponse() *Response

NewResponse returns a Response

Jump to

Keyboard shortcuts

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