Class CloseJobRequest.Builder
java.lang.Object
co.elastic.clients.elasticsearch.ml.CloseJobRequest.Builder
- All Implemented Interfaces:
ObjectBuilder<CloseJobRequest>
- Enclosing class:
- CloseJobRequest
public static class CloseJobRequest.Builder extends java.lang.Object implements ObjectBuilder<CloseJobRequest>
Builder for
CloseJobRequest
.-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
Modifier and Type Method Description CloseJobRequest.Builder
allowNoJobs(java.lang.Boolean value)
Whether to ignore if a wildcard expression matches no jobs.CloseJobRequest.Builder
allowNoMatch(java.lang.Boolean value)
Specifies what to do when the request: contains wildcard expressions and there are no jobs that match; contains the_all
string or no identifiers and there are no matches; or contains wildcard expressions and there are only partial matches.CloseJobRequest
build()
Builds aCloseJobRequest
.CloseJobRequest.Builder
force(java.lang.Boolean value)
Use to close a failed job, or to forcefully close a job which has not responded to its initial close request; the request returns without performing the associated actions such as flushing buffers and persisting the model snapshots.CloseJobRequest.Builder
jobId(java.lang.String value)
Required - Identifier for the anomaly detection job.CloseJobRequest.Builder
timeout(java.lang.String value)
Controls the time to wait until a job has closed.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
jobId
Required - 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:
job_id
-
allowNoMatch
Specifies what to do when the request: contains wildcard expressions and there are no jobs that match; contains the_all
string or no identifiers and there are no matches; or contains wildcard expressions and there are only partial matches. By default, it returns an empty jobs array when there are no matches and the subset of results when there are partial matches. Iffalse
, the request returns a 404 status code when there are no matches or only partial matches.API name:
allow_no_match
-
allowNoJobs
Whether to ignore if a wildcard expression matches no jobs. (This includes_all
string or when no jobs have been specified)API name:
allow_no_jobs
-
force
Use to close a failed job, or to forcefully close a job which has not responded to its initial close request; the request returns without performing the associated actions such as flushing buffers and persisting the model snapshots. If you want the job to be in a consistent state after the close job API returns, do not set totrue
. This parameter should be used only in situations where the job has already failed or where you are not interested in results the job might have recently produced or might produce in the future.API name:
force
-
timeout
Controls the time to wait until a job has closed.API name:
timeout
-
build
Builds aCloseJobRequest
.- Specified by:
build
in interfaceObjectBuilder<CloseJobRequest>
- Throws:
java.lang.NullPointerException
- if some of the required fields are null.
-