Documentation ¶
Overview ¶
Closes one or more anomaly detection jobs. A job can be opened and closed multiple times throughout its lifecycle.
Index ¶
- Variables
- type CloseJob
- func (r *CloseJob) AllowNoMatch(allownomatch bool) *CloseJob
- func (r CloseJob) Do(ctx context.Context) (*Response, error)
- func (r *CloseJob) Force(force bool) *CloseJob
- func (r *CloseJob) Header(key, value string) *CloseJob
- func (r *CloseJob) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r *CloseJob) JobId(jobid string) *CloseJob
- func (r CloseJob) Perform(ctx context.Context) (*http.Response, error)
- func (r *CloseJob) Raw(raw io.Reader) *CloseJob
- func (r *CloseJob) Request(req *Request) *CloseJob
- func (r *CloseJob) Timeout(duration types.Duration) *CloseJob
- type NewCloseJob
- 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 CloseJob ¶
type CloseJob struct {
// contains filtered or unexported fields
}
func New ¶
func New(tp elastictransport.Interface) *CloseJob
Closes one or more anomaly detection jobs. A job can be opened and closed multiple times throughout its lifecycle.
https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/ml-close-job.html
func (*CloseJob) AllowNoMatch ¶
AllowNoMatch Refer to the description for the `allow_no_match` query parameter. API name: allow_no_match
func (CloseJob) Do ¶
Do runs the request through the transport, handle the response and returns a closejob.Response
func (*CloseJob) Force ¶
Force Refer to the descriptiion for the `force` query parameter. API name: force
func (*CloseJob) HttpRequest ¶
HttpRequest returns the http.Request object built from the given parameters.
func (*CloseJob) JobId ¶
JobId Identifier for the anomaly detection job. It can be a job identifier, a group name, or a wildcard expression. You can close multiple anomaly detection jobs in a single API request by using a group name, a comma-separated list of jobs, or a wildcard expression. You can close all jobs by using `_all` or by specifying `*` as the job identifier. API Name: jobid
func (CloseJob) Perform ¶ added in v8.7.0
Perform runs the http.Request through the provided transport and returns an http.Response.
func (*CloseJob) Raw ¶
Raw takes a json payload as input which is then passed to the http.Request If specified Raw takes precedence on Request method.
type NewCloseJob ¶
NewCloseJob type alias for index.
func NewCloseJobFunc ¶
func NewCloseJobFunc(tp elastictransport.Interface) NewCloseJob
NewCloseJobFunc returns a new instance of CloseJob 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"` // Force Refer to the descriptiion for the `force` query parameter. Force *bool `json:"force,omitempty"` // Timeout Refer to the description for the `timeout` query parameter. Timeout types.Duration `json:"timeout,omitempty"` }
Request holds the request body struct for the package closejob