getjobs

package
v8.13.1 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 12 Imported by: 4

Documentation

Overview

Retrieves configuration information for 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 GetJobs

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

func New

Retrieves configuration information for anomaly detection jobs.

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

func (*GetJobs) AllowNoMatch

func (r *GetJobs) AllowNoMatch(allownomatch bool) *GetJobs

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.

The default value is `true`, which 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 (GetJobs) Do

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

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

func (*GetJobs) ExcludeGenerated

func (r *GetJobs) ExcludeGenerated(excludegenerated bool) *GetJobs

ExcludeGenerated Indicates if certain fields should be removed from the configuration on retrieval. This allows the configuration to be in an acceptable format to be retrieved and then added to another cluster. API name: exclude_generated

func (*GetJobs) Header

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

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

func (*GetJobs) HttpRequest

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

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

func (GetJobs) IsSuccess

func (r GetJobs) 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 (*GetJobs) JobId

func (r *GetJobs) JobId(jobid string) *GetJobs

JobId Identifier for the anomaly detection job. It can be a job identifier, a group name, or a wildcard expression. If you do not specify one of these options, the API returns information for all anomaly detection jobs. API Name: jobid

func (GetJobs) Perform added in v8.7.0

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

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

type NewGetJobs

type NewGetJobs func() *GetJobs

NewGetJobs type alias for index.

func NewGetJobsFunc

func NewGetJobsFunc(tp elastictransport.Interface) NewGetJobs

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

type Response added in v8.7.0

type Response struct {
	Count int64       `json:"count"`
	Jobs  []types.Job `json:"jobs"`
}

Response holds the response body struct for the package getjobs

https://github.com/elastic/elasticsearch-specification/blob/5bf86339cd4bda77d07f6eaa6789b72f9c0279b1/specification/ml/get_jobs/MlGetJobsResponse.ts#L23-L28

func NewResponse added in v8.7.0

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