Documentation ¶
Overview ¶
Retrieves overall bucket results that summarize the bucket results of multiple anomaly detection jobs.
Index ¶
- Variables
- type GetOverallBuckets
- func (r *GetOverallBuckets) AllowNoMatch(b bool) *GetOverallBuckets
- func (r *GetOverallBuckets) BucketSpan(v string) *GetOverallBuckets
- func (r GetOverallBuckets) Do(ctx context.Context) (*Response, error)
- func (r *GetOverallBuckets) End(v string) *GetOverallBuckets
- func (r *GetOverallBuckets) ExcludeInterim(b bool) *GetOverallBuckets
- func (r *GetOverallBuckets) Header(key, value string) *GetOverallBuckets
- func (r *GetOverallBuckets) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r *GetOverallBuckets) JobId(v string) *GetOverallBuckets
- func (r *GetOverallBuckets) OverallScore(v string) *GetOverallBuckets
- func (r GetOverallBuckets) Perform(ctx context.Context) (*http.Response, error)
- func (r *GetOverallBuckets) Raw(raw io.Reader) *GetOverallBuckets
- func (r *GetOverallBuckets) Request(req *Request) *GetOverallBuckets
- func (r *GetOverallBuckets) Start(v string) *GetOverallBuckets
- func (r *GetOverallBuckets) TopN(i int) *GetOverallBuckets
- type NewGetOverallBuckets
- type Request
- type Response
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 GetOverallBuckets ¶
type GetOverallBuckets struct {
// contains filtered or unexported fields
}
func New ¶
func New(tp elastictransport.Interface) *GetOverallBuckets
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 ¶
func (r GetOverallBuckets) Do(ctx context.Context) (*Response, error)
Do runs the request through the transport, handle the response and returns a getoverallbuckets.Response
func (*GetOverallBuckets) End ¶
func (r *GetOverallBuckets) End(v string) *GetOverallBuckets
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 ¶
HttpRequest returns the http.Request object built from the given parameters.
func (*GetOverallBuckets) JobId ¶
func (r *GetOverallBuckets) JobId(v string) *GetOverallBuckets
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 ¶
Perform runs the http.Request through the provided transport and returns an http.Response.
func (*GetOverallBuckets) Raw ¶
func (r *GetOverallBuckets) Raw(raw io.Reader) *GetOverallBuckets
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 ¶
func (r *GetOverallBuckets) Start(v string) *GetOverallBuckets
Start Returns overall buckets with timestamps after this time. API name: start
func (*GetOverallBuckets) TopN ¶
func (r *GetOverallBuckets) TopN(i int) *GetOverallBuckets
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
type Response ¶
type Response struct { Count int64 `json:"count"` // OverallBuckets Array of overall bucket objects OverallBuckets []types.OverallBucket `json:"overall_buckets"` }