Class ElasticsearchMlClient
- All Implemented Interfaces:
Closeable
,AutoCloseable
-
Field Summary
Fields inherited from class co.elastic.clients.ApiClient
transport, transportOptions
-
Constructor Summary
ConstructorsConstructorDescriptionElasticsearchMlClient
(ElasticsearchTransport transport) ElasticsearchMlClient
(ElasticsearchTransport transport, TransportOptions transportOptions) -
Method Summary
Modifier and TypeMethodDescriptionClear trained model deployment cache.clearTrainedModelDeploymentCache
(Function<ClearTrainedModelDeploymentCacheRequest.Builder, ObjectBuilder<ClearTrainedModelDeploymentCacheRequest>> fn) Clear trained model deployment cache.closeJob
(CloseJobRequest request) Close anomaly detection jobs.final CloseJobResponse
Close anomaly detection jobs.deleteCalendar
(DeleteCalendarRequest request) Delete a calendar.final DeleteCalendarResponse
Delete a calendar.Delete events from a calendar.deleteCalendarEvent
(Function<DeleteCalendarEventRequest.Builder, ObjectBuilder<DeleteCalendarEventRequest>> fn) Delete events from a calendar.Delete anomaly jobs from a calendar.deleteCalendarJob
(Function<DeleteCalendarJobRequest.Builder, ObjectBuilder<DeleteCalendarJobRequest>> fn) Delete anomaly jobs from a calendar.deleteDatafeed
(DeleteDatafeedRequest request) Delete a datafeed.final DeleteDatafeedResponse
Delete a datafeed.Delete a data frame analytics job.deleteDataFrameAnalytics
(Function<DeleteDataFrameAnalyticsRequest.Builder, ObjectBuilder<DeleteDataFrameAnalyticsRequest>> fn) Delete a data frame analytics job.Delete expired ML data.Delete expired ML data.deleteExpiredData
(Function<DeleteExpiredDataRequest.Builder, ObjectBuilder<DeleteExpiredDataRequest>> fn) Delete expired ML data.deleteFilter
(DeleteFilterRequest request) Delete a filter.final DeleteFilterResponse
Delete a filter.deleteForecast
(DeleteForecastRequest request) Delete forecasts from a job.final DeleteForecastResponse
Delete forecasts from a job.deleteJob
(DeleteJobRequest request) Delete an anomaly detection job.final DeleteJobResponse
Delete an anomaly detection job.Delete a model snapshot.deleteModelSnapshot
(Function<DeleteModelSnapshotRequest.Builder, ObjectBuilder<DeleteModelSnapshotRequest>> fn) Delete a model snapshot.Delete an unreferenced trained model.deleteTrainedModel
(Function<DeleteTrainedModelRequest.Builder, ObjectBuilder<DeleteTrainedModelRequest>> fn) Delete an unreferenced trained model.Delete a trained model alias.deleteTrainedModelAlias
(Function<DeleteTrainedModelAliasRequest.Builder, ObjectBuilder<DeleteTrainedModelAliasRequest>> fn) Delete a trained model alias.Estimate job model memory usage.Estimate job model memory usage.estimateModelMemory
(Function<EstimateModelMemoryRequest.Builder, ObjectBuilder<EstimateModelMemoryRequest>> fn) Estimate job model memory usage.Evaluate data frame analytics.evaluateDataFrame
(Function<EvaluateDataFrameRequest.Builder, ObjectBuilder<EvaluateDataFrameRequest>> fn) Evaluate data frame analytics.Explain data frame analytics config.Explain data frame analytics config.explainDataFrameAnalytics
(Function<ExplainDataFrameAnalyticsRequest.Builder, ObjectBuilder<ExplainDataFrameAnalyticsRequest>> fn) Explain data frame analytics config.flushJob
(FlushJobRequest request) Force buffered data to be processed.final FlushJobResponse
Force buffered data to be processed.forecast
(ForecastRequest request) Predict future behavior of a time series.final ForecastResponse
Predict future behavior of a time series.getBuckets
(GetBucketsRequest request) Get anomaly detection job results for buckets.final GetBucketsResponse
Get anomaly detection job results for buckets.Get info about events in calendars.getCalendarEvents
(Function<GetCalendarEventsRequest.Builder, ObjectBuilder<GetCalendarEventsRequest>> fn) Get info about events in calendars.Get calendar configuration info.getCalendars
(GetCalendarsRequest request) Get calendar configuration info.final GetCalendarsResponse
Get calendar configuration info.getCategories
(GetCategoriesRequest request) Get anomaly detection job results for categories.final GetCategoriesResponse
Get anomaly detection job results for categories.Get datafeeds configuration info.getDatafeeds
(GetDatafeedsRequest request) Get datafeeds configuration info.final GetDatafeedsResponse
Get datafeeds configuration info.Get datafeeds usage info.getDatafeedStats
(GetDatafeedStatsRequest request) Get datafeeds usage info.final GetDatafeedStatsResponse
getDatafeedStats
(Function<GetDatafeedStatsRequest.Builder, ObjectBuilder<GetDatafeedStatsRequest>> fn) Get datafeeds usage info.Get data frame analytics job configuration info.Get data frame analytics job configuration info.getDataFrameAnalytics
(Function<GetDataFrameAnalyticsRequest.Builder, ObjectBuilder<GetDataFrameAnalyticsRequest>> fn) Get data frame analytics job configuration info.Get data frame analytics jobs usage info.Get data frame analytics jobs usage info.getDataFrameAnalyticsStats
(Function<GetDataFrameAnalyticsStatsRequest.Builder, ObjectBuilder<GetDataFrameAnalyticsStatsRequest>> fn) Get data frame analytics jobs usage info.Get filters.getFilters
(GetFiltersRequest request) Get filters.final GetFiltersResponse
Get filters.getInfluencers
(GetInfluencersRequest request) Get anomaly detection job results for influencers.final GetInfluencersResponse
Get anomaly detection job results for influencers.getJobs()
Get anomaly detection jobs configuration info.getJobs
(GetJobsRequest request) Get anomaly detection jobs configuration info.final GetJobsResponse
Get anomaly detection jobs configuration info.Get anomaly detection jobs usage info.getJobStats
(GetJobStatsRequest request) Get anomaly detection jobs usage info.final GetJobStatsResponse
Get anomaly detection jobs usage info.Get machine learning memory usage info.getMemoryStats
(GetMemoryStatsRequest request) Get machine learning memory usage info.final GetMemoryStatsResponse
Get machine learning memory usage info.Get model snapshots info.getModelSnapshots
(Function<GetModelSnapshotsRequest.Builder, ObjectBuilder<GetModelSnapshotsRequest>> fn) Get model snapshots info.Get anomaly detection job model snapshot upgrade usage info.getModelSnapshotUpgradeStats
(Function<GetModelSnapshotUpgradeStatsRequest.Builder, ObjectBuilder<GetModelSnapshotUpgradeStatsRequest>> fn) Get anomaly detection job model snapshot upgrade usage info.Get overall bucket results.getOverallBuckets
(Function<GetOverallBucketsRequest.Builder, ObjectBuilder<GetOverallBucketsRequest>> fn) Get overall bucket results.getRecords
(GetRecordsRequest request) Get anomaly records for an anomaly detection job.final GetRecordsResponse
Get anomaly records for an anomaly detection job.Get trained model configuration info.getTrainedModels
(GetTrainedModelsRequest request) Get trained model configuration info.final GetTrainedModelsResponse
getTrainedModels
(Function<GetTrainedModelsRequest.Builder, ObjectBuilder<GetTrainedModelsRequest>> fn) Get trained model configuration info.Get trained models usage info.Get trained models usage info.getTrainedModelsStats
(Function<GetTrainedModelsStatsRequest.Builder, ObjectBuilder<GetTrainedModelsStatsRequest>> fn) Get trained models usage info.Evaluate a trained model.inferTrainedModel
(Function<InferTrainedModelRequest.Builder, ObjectBuilder<InferTrainedModelRequest>> fn) Evaluate a trained model.info()
Get machine learning information.openJob
(OpenJobRequest request) Open anomaly detection jobs.final OpenJobResponse
Open anomaly detection jobs.Add scheduled events to the calendar.postCalendarEvents
(Function<PostCalendarEventsRequest.Builder, ObjectBuilder<PostCalendarEventsRequest>> fn) Add scheduled events to the calendar.<TData> PostDataResponse
postData
(PostDataRequest<TData> request) Send data to an anomaly detection job for analysis.final <TData> PostDataResponse
postData
(Function<PostDataRequest.Builder<TData>, ObjectBuilder<PostDataRequest<TData>>> fn) Send data to an anomaly detection job for analysis.previewDatafeed
(PreviewDatafeedRequest request) Overload ofpreviewDatafeed(PreviewDatafeedRequest, Class)
, where Class is defined as Void, meaning the documents will not be deserialized.<TDocument>
PreviewDatafeedResponse<TDocument>previewDatafeed
(PreviewDatafeedRequest request, Class<TDocument> tDocumentClass) Preview a datafeed.<TDocument>
PreviewDatafeedResponse<TDocument>previewDatafeed
(PreviewDatafeedRequest request, Type tDocumentType) Preview a datafeed.final PreviewDatafeedResponse<Void>
Overload ofpreviewDatafeed(Function, Class)
, where Class is defined as Void, meaning the documents will not be deserialized.final <TDocument>
PreviewDatafeedResponse<TDocument>previewDatafeed
(Function<PreviewDatafeedRequest.Builder, ObjectBuilder<PreviewDatafeedRequest>> fn, Class<TDocument> tDocumentClass) Preview a datafeed.final <TDocument>
PreviewDatafeedResponse<TDocument>previewDatafeed
(Function<PreviewDatafeedRequest.Builder, ObjectBuilder<PreviewDatafeedRequest>> fn, Type tDocumentType) Preview a datafeed.Preview features used by data frame analytics.Preview features used by data frame analytics.previewDataFrameAnalytics
(Function<PreviewDataFrameAnalyticsRequest.Builder, ObjectBuilder<PreviewDataFrameAnalyticsRequest>> fn) Preview features used by data frame analytics.putCalendar
(PutCalendarRequest request) Create a calendar.final PutCalendarResponse
Create a calendar.putCalendarJob
(PutCalendarJobRequest request) Add anomaly detection job to calendar.final PutCalendarJobResponse
Add anomaly detection job to calendar.putDatafeed
(PutDatafeedRequest request) Create a datafeed.final PutDatafeedResponse
Create a datafeed.Create a data frame analytics job.putDataFrameAnalytics
(Function<PutDataFrameAnalyticsRequest.Builder, ObjectBuilder<PutDataFrameAnalyticsRequest>> fn) Create a data frame analytics job.putFilter
(PutFilterRequest request) Create a filter.final PutFilterResponse
Create a filter.putJob
(PutJobRequest request) Create an anomaly detection job.final PutJobResponse
Create an anomaly detection job.putTrainedModel
(PutTrainedModelRequest request) Create a trained model.final PutTrainedModelResponse
Create a trained model.Create or update a trained model alias.putTrainedModelAlias
(Function<PutTrainedModelAliasRequest.Builder, ObjectBuilder<PutTrainedModelAliasRequest>> fn) Create or update a trained model alias.Create part of a trained model definition.putTrainedModelDefinitionPart
(Function<PutTrainedModelDefinitionPartRequest.Builder, ObjectBuilder<PutTrainedModelDefinitionPartRequest>> fn) Create part of a trained model definition.Create a trained model vocabulary.putTrainedModelVocabulary
(Function<PutTrainedModelVocabularyRequest.Builder, ObjectBuilder<PutTrainedModelVocabularyRequest>> fn) Create a trained model vocabulary.resetJob
(ResetJobRequest request) Reset an anomaly detection job.final ResetJobResponse
Reset an anomaly detection job.Revert to a snapshot.revertModelSnapshot
(Function<RevertModelSnapshotRequest.Builder, ObjectBuilder<RevertModelSnapshotRequest>> fn) Revert to a snapshot.Set upgrade_mode for ML indices.setUpgradeMode
(SetUpgradeModeRequest request) Set upgrade_mode for ML indices.final SetUpgradeModeResponse
Set upgrade_mode for ML indices.startDatafeed
(StartDatafeedRequest request) Start datafeeds.final StartDatafeedResponse
Start datafeeds.Start a data frame analytics job.startDataFrameAnalytics
(Function<StartDataFrameAnalyticsRequest.Builder, ObjectBuilder<StartDataFrameAnalyticsRequest>> fn) Start a data frame analytics job.Start a trained model deployment.startTrainedModelDeployment
(Function<StartTrainedModelDeploymentRequest.Builder, ObjectBuilder<StartTrainedModelDeploymentRequest>> fn) Start a trained model deployment.stopDatafeed
(StopDatafeedRequest request) Stop datafeeds.final StopDatafeedResponse
Stop datafeeds.Stop data frame analytics jobs.stopDataFrameAnalytics
(Function<StopDataFrameAnalyticsRequest.Builder, ObjectBuilder<StopDataFrameAnalyticsRequest>> fn) Stop data frame analytics jobs.Stop a trained model deployment.stopTrainedModelDeployment
(Function<StopTrainedModelDeploymentRequest.Builder, ObjectBuilder<StopTrainedModelDeploymentRequest>> fn) Stop a trained model deployment.updateDatafeed
(UpdateDatafeedRequest request) Update a datafeed.final UpdateDatafeedResponse
Update a datafeed.Update a data frame analytics job.updateDataFrameAnalytics
(Function<UpdateDataFrameAnalyticsRequest.Builder, ObjectBuilder<UpdateDataFrameAnalyticsRequest>> fn) Update a data frame analytics job.updateFilter
(UpdateFilterRequest request) Update a filter.final UpdateFilterResponse
Update a filter.updateJob
(UpdateJobRequest request) Update an anomaly detection job.final UpdateJobResponse
Update an anomaly detection job.Update a snapshot.updateModelSnapshot
(Function<UpdateModelSnapshotRequest.Builder, ObjectBuilder<UpdateModelSnapshotRequest>> fn) Update a snapshot.Update a trained model deployment.updateTrainedModelDeployment
(Function<UpdateTrainedModelDeploymentRequest.Builder, ObjectBuilder<UpdateTrainedModelDeploymentRequest>> fn) Update a trained model deployment.Upgrade a snapshot.upgradeJobSnapshot
(Function<UpgradeJobSnapshotRequest.Builder, ObjectBuilder<UpgradeJobSnapshotRequest>> fn) Upgrade a snapshot.validate()
Validate an anomaly detection job.validate
(ValidateRequest request) Validate an anomaly detection job.final ValidateResponse
Validate an anomaly detection job.Validate an anomaly detection job.validateDetector
(ValidateDetectorRequest request) Validate an anomaly detection job.final ValidateDetectorResponse
validateDetector
(Function<ValidateDetectorRequest.Builder, ObjectBuilder<ValidateDetectorRequest>> fn) Validate an anomaly detection job.withTransportOptions
(TransportOptions transportOptions) Creates a new client with some request optionsMethods inherited from class co.elastic.clients.ApiClient
_jsonpMapper, _transport, _transportOptions, close, getDeserializer, withTransportOptions
-
Constructor Details
-
ElasticsearchMlClient
-
ElasticsearchMlClient
public ElasticsearchMlClient(ElasticsearchTransport transport, @Nullable TransportOptions transportOptions)
-
-
Method Details
-
withTransportOptions
Description copied from class:ApiClient
Creates a new client with some request options- Specified by:
withTransportOptions
in classApiClient<ElasticsearchTransport,
ElasticsearchMlClient>
-
clearTrainedModelDeploymentCache
public ClearTrainedModelDeploymentCacheResponse clearTrainedModelDeploymentCache(ClearTrainedModelDeploymentCacheRequest request) throws IOException, ElasticsearchException Clear trained model deployment cache.Cache will be cleared on all nodes where the trained model is assigned. A trained model deployment may have an inference cache enabled. As requests are handled by each allocated node, their responses may be cached on that individual node. Calling this API clears the caches without restarting the deployment.
- Throws:
IOException
ElasticsearchException
- See Also:
-
clearTrainedModelDeploymentCache
public final ClearTrainedModelDeploymentCacheResponse clearTrainedModelDeploymentCache(Function<ClearTrainedModelDeploymentCacheRequest.Builder, ObjectBuilder<ClearTrainedModelDeploymentCacheRequest>> fn) throws IOException, ElasticsearchExceptionClear trained model deployment cache.Cache will be cleared on all nodes where the trained model is assigned. A trained model deployment may have an inference cache enabled. As requests are handled by each allocated node, their responses may be cached on that individual node. Calling this API clears the caches without restarting the deployment.
- Parameters:
fn
- a function that initializes a builder to create theClearTrainedModelDeploymentCacheRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
closeJob
public CloseJobResponse closeJob(CloseJobRequest request) throws IOException, ElasticsearchException Close anomaly detection jobs.A job can be opened and closed multiple times throughout its lifecycle. A closed job cannot receive data or perform analysis operations, but you can still explore and navigate results. When you close a job, it runs housekeeping tasks such as pruning the model history, flushing buffers, calculating final results and persisting the model snapshots. Depending upon the size of the job, it could take several minutes to close and the equivalent time to re-open. After it is closed, the job has a minimal overhead on the cluster except for maintaining its meta data. Therefore it is a best practice to close jobs that are no longer required to process data. If you close an anomaly detection job whose datafeed is running, the request first tries to stop the datafeed. This behavior is equivalent to calling stop datafeed API with the same timeout and force parameters as the close job request. When a datafeed that has a specified end date stops, it automatically closes its associated job.
- Throws:
IOException
ElasticsearchException
- See Also:
-
closeJob
public final CloseJobResponse closeJob(Function<CloseJobRequest.Builder, ObjectBuilder<CloseJobRequest>> fn) throws IOException, ElasticsearchExceptionClose anomaly detection jobs.A job can be opened and closed multiple times throughout its lifecycle. A closed job cannot receive data or perform analysis operations, but you can still explore and navigate results. When you close a job, it runs housekeeping tasks such as pruning the model history, flushing buffers, calculating final results and persisting the model snapshots. Depending upon the size of the job, it could take several minutes to close and the equivalent time to re-open. After it is closed, the job has a minimal overhead on the cluster except for maintaining its meta data. Therefore it is a best practice to close jobs that are no longer required to process data. If you close an anomaly detection job whose datafeed is running, the request first tries to stop the datafeed. This behavior is equivalent to calling stop datafeed API with the same timeout and force parameters as the close job request. When a datafeed that has a specified end date stops, it automatically closes its associated job.
- Parameters:
fn
- a function that initializes a builder to create theCloseJobRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
deleteCalendar
public DeleteCalendarResponse deleteCalendar(DeleteCalendarRequest request) throws IOException, ElasticsearchException Delete a calendar.Remove all scheduled events from a calendar, then delete it.
- Throws:
IOException
ElasticsearchException
- See Also:
-
deleteCalendar
public final DeleteCalendarResponse deleteCalendar(Function<DeleteCalendarRequest.Builder, ObjectBuilder<DeleteCalendarRequest>> fn) throws IOException, ElasticsearchExceptionDelete a calendar.Remove all scheduled events from a calendar, then delete it.
- Parameters:
fn
- a function that initializes a builder to create theDeleteCalendarRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
deleteCalendarEvent
public DeleteCalendarEventResponse deleteCalendarEvent(DeleteCalendarEventRequest request) throws IOException, ElasticsearchException Delete events from a calendar.- Throws:
IOException
ElasticsearchException
- See Also:
-
deleteCalendarEvent
public final DeleteCalendarEventResponse deleteCalendarEvent(Function<DeleteCalendarEventRequest.Builder, ObjectBuilder<DeleteCalendarEventRequest>> fn) throws IOException, ElasticsearchExceptionDelete events from a calendar.- Parameters:
fn
- a function that initializes a builder to create theDeleteCalendarEventRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
deleteCalendarJob
public DeleteCalendarJobResponse deleteCalendarJob(DeleteCalendarJobRequest request) throws IOException, ElasticsearchException Delete anomaly jobs from a calendar.- Throws:
IOException
ElasticsearchException
- See Also:
-
deleteCalendarJob
public final DeleteCalendarJobResponse deleteCalendarJob(Function<DeleteCalendarJobRequest.Builder, ObjectBuilder<DeleteCalendarJobRequest>> fn) throws IOException, ElasticsearchExceptionDelete anomaly jobs from a calendar.- Parameters:
fn
- a function that initializes a builder to create theDeleteCalendarJobRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
deleteDataFrameAnalytics
public DeleteDataFrameAnalyticsResponse deleteDataFrameAnalytics(DeleteDataFrameAnalyticsRequest request) throws IOException, ElasticsearchException Delete a data frame analytics job.- Throws:
IOException
ElasticsearchException
- See Also:
-
deleteDataFrameAnalytics
public final DeleteDataFrameAnalyticsResponse deleteDataFrameAnalytics(Function<DeleteDataFrameAnalyticsRequest.Builder, ObjectBuilder<DeleteDataFrameAnalyticsRequest>> fn) throws IOException, ElasticsearchExceptionDelete a data frame analytics job.- Parameters:
fn
- a function that initializes a builder to create theDeleteDataFrameAnalyticsRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
deleteDatafeed
public DeleteDatafeedResponse deleteDatafeed(DeleteDatafeedRequest request) throws IOException, ElasticsearchException Delete a datafeed.- Throws:
IOException
ElasticsearchException
- See Also:
-
deleteDatafeed
public final DeleteDatafeedResponse deleteDatafeed(Function<DeleteDatafeedRequest.Builder, ObjectBuilder<DeleteDatafeedRequest>> fn) throws IOException, ElasticsearchExceptionDelete a datafeed.- Parameters:
fn
- a function that initializes a builder to create theDeleteDatafeedRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
deleteExpiredData
public DeleteExpiredDataResponse deleteExpiredData(DeleteExpiredDataRequest request) throws IOException, ElasticsearchException Delete expired ML data.Delete all job results, model snapshots and forecast data that have exceeded their retention days period. Machine learning state documents that are not associated with any job are also deleted. You can limit the request to a single or set of anomaly detection jobs by using a job identifier, a group name, a comma-separated list of jobs, or a wildcard expression. You can delete expired data for all anomaly detection jobs by using
_all
, by specifying*
as the<job_id>
, or by omitting the<job_id>
.- Throws:
IOException
ElasticsearchException
- See Also:
-
deleteExpiredData
public final DeleteExpiredDataResponse deleteExpiredData(Function<DeleteExpiredDataRequest.Builder, ObjectBuilder<DeleteExpiredDataRequest>> fn) throws IOException, ElasticsearchExceptionDelete expired ML data.Delete all job results, model snapshots and forecast data that have exceeded their retention days period. Machine learning state documents that are not associated with any job are also deleted. You can limit the request to a single or set of anomaly detection jobs by using a job identifier, a group name, a comma-separated list of jobs, or a wildcard expression. You can delete expired data for all anomaly detection jobs by using
_all
, by specifying*
as the<job_id>
, or by omitting the<job_id>
.- Parameters:
fn
- a function that initializes a builder to create theDeleteExpiredDataRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
deleteExpiredData
Delete expired ML data.Delete all job results, model snapshots and forecast data that have exceeded their retention days period. Machine learning state documents that are not associated with any job are also deleted. You can limit the request to a single or set of anomaly detection jobs by using a job identifier, a group name, a comma-separated list of jobs, or a wildcard expression. You can delete expired data for all anomaly detection jobs by using
_all
, by specifying*
as the<job_id>
, or by omitting the<job_id>
.- Throws:
IOException
ElasticsearchException
- See Also:
-
deleteFilter
public DeleteFilterResponse deleteFilter(DeleteFilterRequest request) throws IOException, ElasticsearchException Delete a filter.If an anomaly detection job references the filter, you cannot delete the filter. You must update or delete the job before you can delete the filter.
- Throws:
IOException
ElasticsearchException
- See Also:
-
deleteFilter
public final DeleteFilterResponse deleteFilter(Function<DeleteFilterRequest.Builder, ObjectBuilder<DeleteFilterRequest>> fn) throws IOException, ElasticsearchExceptionDelete a filter.If an anomaly detection job references the filter, you cannot delete the filter. You must update or delete the job before you can delete the filter.
- Parameters:
fn
- a function that initializes a builder to create theDeleteFilterRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
deleteForecast
public DeleteForecastResponse deleteForecast(DeleteForecastRequest request) throws IOException, ElasticsearchException Delete forecasts from a job.By default, forecasts are retained for 14 days. You can specify a different retention period with the
expires_in
parameter in the forecast jobs API. The delete forecast API enables you to delete one or more forecasts before they expire.- Throws:
IOException
ElasticsearchException
- See Also:
-
deleteForecast
public final DeleteForecastResponse deleteForecast(Function<DeleteForecastRequest.Builder, ObjectBuilder<DeleteForecastRequest>> fn) throws IOException, ElasticsearchExceptionDelete forecasts from a job.By default, forecasts are retained for 14 days. You can specify a different retention period with the
expires_in
parameter in the forecast jobs API. The delete forecast API enables you to delete one or more forecasts before they expire.- Parameters:
fn
- a function that initializes a builder to create theDeleteForecastRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
deleteJob
public DeleteJobResponse deleteJob(DeleteJobRequest request) throws IOException, ElasticsearchException Delete an anomaly detection job.All job configuration, model state and results are deleted. It is not currently possible to delete multiple jobs using wildcards or a comma separated list. If you delete a job that has a datafeed, the request first tries to delete the datafeed. This behavior is equivalent to calling the delete datafeed API with the same timeout and force parameters as the delete job request.
- Throws:
IOException
ElasticsearchException
- See Also:
-
deleteJob
public final DeleteJobResponse deleteJob(Function<DeleteJobRequest.Builder, ObjectBuilder<DeleteJobRequest>> fn) throws IOException, ElasticsearchExceptionDelete an anomaly detection job.All job configuration, model state and results are deleted. It is not currently possible to delete multiple jobs using wildcards or a comma separated list. If you delete a job that has a datafeed, the request first tries to delete the datafeed. This behavior is equivalent to calling the delete datafeed API with the same timeout and force parameters as the delete job request.
- Parameters:
fn
- a function that initializes a builder to create theDeleteJobRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
deleteModelSnapshot
public DeleteModelSnapshotResponse deleteModelSnapshot(DeleteModelSnapshotRequest request) throws IOException, ElasticsearchException Delete a model snapshot.You cannot delete the active model snapshot. To delete that snapshot, first revert to a different one. To identify the active model snapshot, refer to the
model_snapshot_id
in the results from the get jobs API.- Throws:
IOException
ElasticsearchException
- See Also:
-
deleteModelSnapshot
public final DeleteModelSnapshotResponse deleteModelSnapshot(Function<DeleteModelSnapshotRequest.Builder, ObjectBuilder<DeleteModelSnapshotRequest>> fn) throws IOException, ElasticsearchExceptionDelete a model snapshot.You cannot delete the active model snapshot. To delete that snapshot, first revert to a different one. To identify the active model snapshot, refer to the
model_snapshot_id
in the results from the get jobs API.- Parameters:
fn
- a function that initializes a builder to create theDeleteModelSnapshotRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
deleteTrainedModel
public DeleteTrainedModelResponse deleteTrainedModel(DeleteTrainedModelRequest request) throws IOException, ElasticsearchException Delete an unreferenced trained model.The request deletes a trained inference model that is not referenced by an ingest pipeline.
- Throws:
IOException
ElasticsearchException
- See Also:
-
deleteTrainedModel
public final DeleteTrainedModelResponse deleteTrainedModel(Function<DeleteTrainedModelRequest.Builder, ObjectBuilder<DeleteTrainedModelRequest>> fn) throws IOException, ElasticsearchExceptionDelete an unreferenced trained model.The request deletes a trained inference model that is not referenced by an ingest pipeline.
- Parameters:
fn
- a function that initializes a builder to create theDeleteTrainedModelRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
deleteTrainedModelAlias
public DeleteTrainedModelAliasResponse deleteTrainedModelAlias(DeleteTrainedModelAliasRequest request) throws IOException, ElasticsearchException Delete a trained model alias.This API deletes an existing model alias that refers to a trained model. If the model alias is missing or refers to a model other than the one identified by the
model_id
, this API returns an error.- Throws:
IOException
ElasticsearchException
- See Also:
-
deleteTrainedModelAlias
public final DeleteTrainedModelAliasResponse deleteTrainedModelAlias(Function<DeleteTrainedModelAliasRequest.Builder, ObjectBuilder<DeleteTrainedModelAliasRequest>> fn) throws IOException, ElasticsearchExceptionDelete a trained model alias.This API deletes an existing model alias that refers to a trained model. If the model alias is missing or refers to a model other than the one identified by the
model_id
, this API returns an error.- Parameters:
fn
- a function that initializes a builder to create theDeleteTrainedModelAliasRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
estimateModelMemory
public EstimateModelMemoryResponse estimateModelMemory(EstimateModelMemoryRequest request) throws IOException, ElasticsearchException Estimate job model memory usage.Make an estimation of the memory usage for an anomaly detection job model. The estimate is based on analysis configuration details for the job and cardinality estimates for the fields it references.
- Throws:
IOException
ElasticsearchException
- See Also:
-
estimateModelMemory
public final EstimateModelMemoryResponse estimateModelMemory(Function<EstimateModelMemoryRequest.Builder, ObjectBuilder<EstimateModelMemoryRequest>> fn) throws IOException, ElasticsearchExceptionEstimate job model memory usage.Make an estimation of the memory usage for an anomaly detection job model. The estimate is based on analysis configuration details for the job and cardinality estimates for the fields it references.
- Parameters:
fn
- a function that initializes a builder to create theEstimateModelMemoryRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
estimateModelMemory
Estimate job model memory usage.Make an estimation of the memory usage for an anomaly detection job model. The estimate is based on analysis configuration details for the job and cardinality estimates for the fields it references.
- Throws:
IOException
ElasticsearchException
- See Also:
-
evaluateDataFrame
public EvaluateDataFrameResponse evaluateDataFrame(EvaluateDataFrameRequest request) throws IOException, ElasticsearchException Evaluate data frame analytics.The API packages together commonly used evaluation metrics for various types of machine learning features. This has been designed for use on indexes created by data frame analytics. Evaluation requires both a ground truth field and an analytics result field to be present.
- Throws:
IOException
ElasticsearchException
- See Also:
-
evaluateDataFrame
public final EvaluateDataFrameResponse evaluateDataFrame(Function<EvaluateDataFrameRequest.Builder, ObjectBuilder<EvaluateDataFrameRequest>> fn) throws IOException, ElasticsearchExceptionEvaluate data frame analytics.The API packages together commonly used evaluation metrics for various types of machine learning features. This has been designed for use on indexes created by data frame analytics. Evaluation requires both a ground truth field and an analytics result field to be present.
- Parameters:
fn
- a function that initializes a builder to create theEvaluateDataFrameRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
explainDataFrameAnalytics
public ExplainDataFrameAnalyticsResponse explainDataFrameAnalytics(ExplainDataFrameAnalyticsRequest request) throws IOException, ElasticsearchException Explain data frame analytics config.This API provides explanations for a data frame analytics config that either exists already or one that has not been created yet. The following explanations are provided:
- which fields are included or not in the analysis and why,
- how much memory is estimated to be required. The estimate can be used when deciding the appropriate value for model_memory_limit setting later on. If you have object fields or fields that are excluded via source filtering, they are not included in the explanation.
- Throws:
IOException
ElasticsearchException
- See Also:
-
explainDataFrameAnalytics
public final ExplainDataFrameAnalyticsResponse explainDataFrameAnalytics(Function<ExplainDataFrameAnalyticsRequest.Builder, ObjectBuilder<ExplainDataFrameAnalyticsRequest>> fn) throws IOException, ElasticsearchExceptionExplain data frame analytics config.This API provides explanations for a data frame analytics config that either exists already or one that has not been created yet. The following explanations are provided:
- which fields are included or not in the analysis and why,
- how much memory is estimated to be required. The estimate can be used when deciding the appropriate value for model_memory_limit setting later on. If you have object fields or fields that are excluded via source filtering, they are not included in the explanation.
- Parameters:
fn
- a function that initializes a builder to create theExplainDataFrameAnalyticsRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
explainDataFrameAnalytics
public ExplainDataFrameAnalyticsResponse explainDataFrameAnalytics() throws IOException, ElasticsearchExceptionExplain data frame analytics config.This API provides explanations for a data frame analytics config that either exists already or one that has not been created yet. The following explanations are provided:
- which fields are included or not in the analysis and why,
- how much memory is estimated to be required. The estimate can be used when deciding the appropriate value for model_memory_limit setting later on. If you have object fields or fields that are excluded via source filtering, they are not included in the explanation.
- Throws:
IOException
ElasticsearchException
- See Also:
-
flushJob
public FlushJobResponse flushJob(FlushJobRequest request) throws IOException, ElasticsearchException Force buffered data to be processed. The flush jobs API is only applicable when sending data for analysis using the post data API. Depending on the content of the buffer, then it might additionally calculate new results. Both flush and close operations are similar, however the flush is more efficient if you are expecting to send more data for analysis. When flushing, the job remains open and is available to continue analyzing data. A close operation additionally prunes and persists the model state to disk and the job must be opened again before analyzing further data.- Throws:
IOException
ElasticsearchException
- See Also:
-
flushJob
public final FlushJobResponse flushJob(Function<FlushJobRequest.Builder, ObjectBuilder<FlushJobRequest>> fn) throws IOException, ElasticsearchExceptionForce buffered data to be processed. The flush jobs API is only applicable when sending data for analysis using the post data API. Depending on the content of the buffer, then it might additionally calculate new results. Both flush and close operations are similar, however the flush is more efficient if you are expecting to send more data for analysis. When flushing, the job remains open and is available to continue analyzing data. A close operation additionally prunes and persists the model state to disk and the job must be opened again before analyzing further data.- Parameters:
fn
- a function that initializes a builder to create theFlushJobRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
forecast
public ForecastResponse forecast(ForecastRequest request) throws IOException, ElasticsearchException Predict future behavior of a time series.Forecasts are not supported for jobs that perform population analysis; an error occurs if you try to create a forecast for a job that has an
over_field_name
in its configuration. Forcasts predict future behavior based on historical data.- Throws:
IOException
ElasticsearchException
- See Also:
-
forecast
public final ForecastResponse forecast(Function<ForecastRequest.Builder, ObjectBuilder<ForecastRequest>> fn) throws IOException, ElasticsearchExceptionPredict future behavior of a time series.Forecasts are not supported for jobs that perform population analysis; an error occurs if you try to create a forecast for a job that has an
over_field_name
in its configuration. Forcasts predict future behavior based on historical data.- Parameters:
fn
- a function that initializes a builder to create theForecastRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
getBuckets
public GetBucketsResponse getBuckets(GetBucketsRequest request) throws IOException, ElasticsearchException Get anomaly detection job results for buckets. The API presents a chronological view of the records, grouped by bucket.- Throws:
IOException
ElasticsearchException
- See Also:
-
getBuckets
public final GetBucketsResponse getBuckets(Function<GetBucketsRequest.Builder, ObjectBuilder<GetBucketsRequest>> fn) throws IOException, ElasticsearchExceptionGet anomaly detection job results for buckets. The API presents a chronological view of the records, grouped by bucket.- Parameters:
fn
- a function that initializes a builder to create theGetBucketsRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
getCalendarEvents
public GetCalendarEventsResponse getCalendarEvents(GetCalendarEventsRequest request) throws IOException, ElasticsearchException Get info about events in calendars.- Throws:
IOException
ElasticsearchException
- See Also:
-
getCalendarEvents
public final GetCalendarEventsResponse getCalendarEvents(Function<GetCalendarEventsRequest.Builder, ObjectBuilder<GetCalendarEventsRequest>> fn) throws IOException, ElasticsearchExceptionGet info about events in calendars.- Parameters:
fn
- a function that initializes a builder to create theGetCalendarEventsRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
getCalendars
public GetCalendarsResponse getCalendars(GetCalendarsRequest request) throws IOException, ElasticsearchException Get calendar configuration info.- Throws:
IOException
ElasticsearchException
- See Also:
-
getCalendars
public final GetCalendarsResponse getCalendars(Function<GetCalendarsRequest.Builder, ObjectBuilder<GetCalendarsRequest>> fn) throws IOException, ElasticsearchExceptionGet calendar configuration info.- Parameters:
fn
- a function that initializes a builder to create theGetCalendarsRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
getCalendars
Get calendar configuration info.- Throws:
IOException
ElasticsearchException
- See Also:
-
getCategories
public GetCategoriesResponse getCategories(GetCategoriesRequest request) throws IOException, ElasticsearchException Get anomaly detection job results for categories.- Throws:
IOException
ElasticsearchException
- See Also:
-
getCategories
public final GetCategoriesResponse getCategories(Function<GetCategoriesRequest.Builder, ObjectBuilder<GetCategoriesRequest>> fn) throws IOException, ElasticsearchExceptionGet anomaly detection job results for categories.- Parameters:
fn
- a function that initializes a builder to create theGetCategoriesRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
getDataFrameAnalytics
public GetDataFrameAnalyticsResponse getDataFrameAnalytics(GetDataFrameAnalyticsRequest request) throws IOException, ElasticsearchException Get data frame analytics job configuration info. You can get information for multiple data frame analytics jobs in a single API request by using a comma-separated list of data frame analytics jobs or a wildcard expression.- Throws:
IOException
ElasticsearchException
- See Also:
-
getDataFrameAnalytics
public final GetDataFrameAnalyticsResponse getDataFrameAnalytics(Function<GetDataFrameAnalyticsRequest.Builder, ObjectBuilder<GetDataFrameAnalyticsRequest>> fn) throws IOException, ElasticsearchExceptionGet data frame analytics job configuration info. You can get information for multiple data frame analytics jobs in a single API request by using a comma-separated list of data frame analytics jobs or a wildcard expression.- Parameters:
fn
- a function that initializes a builder to create theGetDataFrameAnalyticsRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
getDataFrameAnalytics
public GetDataFrameAnalyticsResponse getDataFrameAnalytics() throws IOException, ElasticsearchExceptionGet data frame analytics job configuration info. You can get information for multiple data frame analytics jobs in a single API request by using a comma-separated list of data frame analytics jobs or a wildcard expression.- Throws:
IOException
ElasticsearchException
- See Also:
-
getDataFrameAnalyticsStats
public GetDataFrameAnalyticsStatsResponse getDataFrameAnalyticsStats(GetDataFrameAnalyticsStatsRequest request) throws IOException, ElasticsearchException Get data frame analytics jobs usage info.- Throws:
IOException
ElasticsearchException
- See Also:
-
getDataFrameAnalyticsStats
public final GetDataFrameAnalyticsStatsResponse getDataFrameAnalyticsStats(Function<GetDataFrameAnalyticsStatsRequest.Builder, ObjectBuilder<GetDataFrameAnalyticsStatsRequest>> fn) throws IOException, ElasticsearchExceptionGet data frame analytics jobs usage info.- Parameters:
fn
- a function that initializes a builder to create theGetDataFrameAnalyticsStatsRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
getDataFrameAnalyticsStats
public GetDataFrameAnalyticsStatsResponse getDataFrameAnalyticsStats() throws IOException, ElasticsearchExceptionGet data frame analytics jobs usage info.- Throws:
IOException
ElasticsearchException
- See Also:
-
getDatafeedStats
public GetDatafeedStatsResponse getDatafeedStats(GetDatafeedStatsRequest request) throws IOException, ElasticsearchException Get datafeeds usage info. You can get statistics for multiple datafeeds in a single API request by using a comma-separated list of datafeeds or a wildcard expression. You can get statistics for all datafeeds by using_all
, by specifying*
as the<feed_id>
, or by omitting the<feed_id>
. If the datafeed is stopped, the only information you receive is thedatafeed_id
and thestate
. This API returns a maximum of 10,000 datafeeds.- Throws:
IOException
ElasticsearchException
- See Also:
-
getDatafeedStats
public final GetDatafeedStatsResponse getDatafeedStats(Function<GetDatafeedStatsRequest.Builder, ObjectBuilder<GetDatafeedStatsRequest>> fn) throws IOException, ElasticsearchExceptionGet datafeeds usage info. You can get statistics for multiple datafeeds in a single API request by using a comma-separated list of datafeeds or a wildcard expression. You can get statistics for all datafeeds by using_all
, by specifying*
as the<feed_id>
, or by omitting the<feed_id>
. If the datafeed is stopped, the only information you receive is thedatafeed_id
and thestate
. This API returns a maximum of 10,000 datafeeds.- Parameters:
fn
- a function that initializes a builder to create theGetDatafeedStatsRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
getDatafeedStats
Get datafeeds usage info. You can get statistics for multiple datafeeds in a single API request by using a comma-separated list of datafeeds or a wildcard expression. You can get statistics for all datafeeds by using_all
, by specifying*
as the<feed_id>
, or by omitting the<feed_id>
. If the datafeed is stopped, the only information you receive is thedatafeed_id
and thestate
. This API returns a maximum of 10,000 datafeeds.- Throws:
IOException
ElasticsearchException
- See Also:
-
getDatafeeds
public GetDatafeedsResponse getDatafeeds(GetDatafeedsRequest request) throws IOException, ElasticsearchException Get datafeeds configuration info. You can get information for multiple datafeeds in a single API request by using a comma-separated list of datafeeds or a wildcard expression. You can get information for all datafeeds by using_all
, by specifying*
as the<feed_id>
, or by omitting the<feed_id>
. This API returns a maximum of 10,000 datafeeds.- Throws:
IOException
ElasticsearchException
- See Also:
-
getDatafeeds
public final GetDatafeedsResponse getDatafeeds(Function<GetDatafeedsRequest.Builder, ObjectBuilder<GetDatafeedsRequest>> fn) throws IOException, ElasticsearchExceptionGet datafeeds configuration info. You can get information for multiple datafeeds in a single API request by using a comma-separated list of datafeeds or a wildcard expression. You can get information for all datafeeds by using_all
, by specifying*
as the<feed_id>
, or by omitting the<feed_id>
. This API returns a maximum of 10,000 datafeeds.- Parameters:
fn
- a function that initializes a builder to create theGetDatafeedsRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
getDatafeeds
Get datafeeds configuration info. You can get information for multiple datafeeds in a single API request by using a comma-separated list of datafeeds or a wildcard expression. You can get information for all datafeeds by using_all
, by specifying*
as the<feed_id>
, or by omitting the<feed_id>
. This API returns a maximum of 10,000 datafeeds.- Throws:
IOException
ElasticsearchException
- See Also:
-
getFilters
public GetFiltersResponse getFilters(GetFiltersRequest request) throws IOException, ElasticsearchException Get filters. You can get a single filter or all filters.- Throws:
IOException
ElasticsearchException
- See Also:
-
getFilters
public final GetFiltersResponse getFilters(Function<GetFiltersRequest.Builder, ObjectBuilder<GetFiltersRequest>> fn) throws IOException, ElasticsearchExceptionGet filters. You can get a single filter or all filters.- Parameters:
fn
- a function that initializes a builder to create theGetFiltersRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
getFilters
Get filters. You can get a single filter or all filters.- Throws:
IOException
ElasticsearchException
- See Also:
-
getInfluencers
public GetInfluencersResponse getInfluencers(GetInfluencersRequest request) throws IOException, ElasticsearchException Get anomaly detection job results for influencers. Influencers are the entities that have contributed to, or are to blame for, the anomalies. Influencer results are available only if aninfluencer_field_name
is specified in the job configuration.- Throws:
IOException
ElasticsearchException
- See Also:
-
getInfluencers
public final GetInfluencersResponse getInfluencers(Function<GetInfluencersRequest.Builder, ObjectBuilder<GetInfluencersRequest>> fn) throws IOException, ElasticsearchExceptionGet anomaly detection job results for influencers. Influencers are the entities that have contributed to, or are to blame for, the anomalies. Influencer results are available only if aninfluencer_field_name
is specified in the job configuration.- Parameters:
fn
- a function that initializes a builder to create theGetInfluencersRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
getJobStats
public GetJobStatsResponse getJobStats(GetJobStatsRequest request) throws IOException, ElasticsearchException Get anomaly detection jobs usage info.- Throws:
IOException
ElasticsearchException
- See Also:
-
getJobStats
public final GetJobStatsResponse getJobStats(Function<GetJobStatsRequest.Builder, ObjectBuilder<GetJobStatsRequest>> fn) throws IOException, ElasticsearchExceptionGet anomaly detection jobs usage info.- Parameters:
fn
- a function that initializes a builder to create theGetJobStatsRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
getJobStats
Get anomaly detection jobs usage info.- Throws:
IOException
ElasticsearchException
- See Also:
-
getJobs
Get anomaly detection jobs configuration info. You can get information for 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 get information for all anomaly detection jobs by using_all
, by specifying*
as the<job_id>
, or by omitting the<job_id>
.- Throws:
IOException
ElasticsearchException
- See Also:
-
getJobs
public final GetJobsResponse getJobs(Function<GetJobsRequest.Builder, ObjectBuilder<GetJobsRequest>> fn) throws IOException, ElasticsearchExceptionGet anomaly detection jobs configuration info. You can get information for 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 get information for all anomaly detection jobs by using_all
, by specifying*
as the<job_id>
, or by omitting the<job_id>
.- Parameters:
fn
- a function that initializes a builder to create theGetJobsRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
getJobs
Get anomaly detection jobs configuration info. You can get information for 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 get information for all anomaly detection jobs by using_all
, by specifying*
as the<job_id>
, or by omitting the<job_id>
.- Throws:
IOException
ElasticsearchException
- See Also:
-
getMemoryStats
public GetMemoryStatsResponse getMemoryStats(GetMemoryStatsRequest request) throws IOException, ElasticsearchException Get machine learning memory usage info. Get information about how machine learning jobs and trained models are using memory, on each node, both within the JVM heap, and natively, outside of the JVM.- Throws:
IOException
ElasticsearchException
- See Also:
-
getMemoryStats
public final GetMemoryStatsResponse getMemoryStats(Function<GetMemoryStatsRequest.Builder, ObjectBuilder<GetMemoryStatsRequest>> fn) throws IOException, ElasticsearchExceptionGet machine learning memory usage info. Get information about how machine learning jobs and trained models are using memory, on each node, both within the JVM heap, and natively, outside of the JVM.- Parameters:
fn
- a function that initializes a builder to create theGetMemoryStatsRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
getMemoryStats
Get machine learning memory usage info. Get information about how machine learning jobs and trained models are using memory, on each node, both within the JVM heap, and natively, outside of the JVM.- Throws:
IOException
ElasticsearchException
- See Also:
-
getModelSnapshotUpgradeStats
public GetModelSnapshotUpgradeStatsResponse getModelSnapshotUpgradeStats(GetModelSnapshotUpgradeStatsRequest request) throws IOException, ElasticsearchException Get anomaly detection job model snapshot upgrade usage info.- Throws:
IOException
ElasticsearchException
- See Also:
-
getModelSnapshotUpgradeStats
public final GetModelSnapshotUpgradeStatsResponse getModelSnapshotUpgradeStats(Function<GetModelSnapshotUpgradeStatsRequest.Builder, ObjectBuilder<GetModelSnapshotUpgradeStatsRequest>> fn) throws IOException, ElasticsearchExceptionGet anomaly detection job model snapshot upgrade usage info.- Parameters:
fn
- a function that initializes a builder to create theGetModelSnapshotUpgradeStatsRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
getModelSnapshots
public GetModelSnapshotsResponse getModelSnapshots(GetModelSnapshotsRequest request) throws IOException, ElasticsearchException Get model snapshots info.- Throws:
IOException
ElasticsearchException
- See Also:
-
getModelSnapshots
public final GetModelSnapshotsResponse getModelSnapshots(Function<GetModelSnapshotsRequest.Builder, ObjectBuilder<GetModelSnapshotsRequest>> fn) throws IOException, ElasticsearchExceptionGet model snapshots info.- Parameters:
fn
- a function that initializes a builder to create theGetModelSnapshotsRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
getOverallBuckets
public GetOverallBucketsResponse getOverallBuckets(GetOverallBucketsRequest request) throws IOException, ElasticsearchException Get overall bucket results.Retrievs overall bucket results that summarize the bucket results of multiple anomaly detection jobs.
The
overall_score
is calculated by combining the scores of all the buckets within the overall bucket span. First, the maximumanomaly_score
per anomaly detection job in the overall bucket is calculated. Then thetop_n
of those scores are averaged to result in theoverall_score
. This means that you can fine-tune theoverall_score
so that it is more or less sensitive to the number of jobs that detect an anomaly at the same time. For example, if you settop_n
to1
, theoverall_score
is the maximum bucket score in the overall bucket. Alternatively, if you settop_n
to the number of jobs, theoverall_score
is high only when all jobs detect anomalies in that overall bucket. If you set thebucket_span
parameter (to a value greater than its default), theoverall_score
is the maximumoverall_score
of the overall buckets that have a span equal to the jobs' largest bucket span.- Throws:
IOException
ElasticsearchException
- See Also:
-
getOverallBuckets
public final GetOverallBucketsResponse getOverallBuckets(Function<GetOverallBucketsRequest.Builder, ObjectBuilder<GetOverallBucketsRequest>> fn) throws IOException, ElasticsearchExceptionGet overall bucket results.Retrievs overall bucket results that summarize the bucket results of multiple anomaly detection jobs.
The
overall_score
is calculated by combining the scores of all the buckets within the overall bucket span. First, the maximumanomaly_score
per anomaly detection job in the overall bucket is calculated. Then thetop_n
of those scores are averaged to result in theoverall_score
. This means that you can fine-tune theoverall_score
so that it is more or less sensitive to the number of jobs that detect an anomaly at the same time. For example, if you settop_n
to1
, theoverall_score
is the maximum bucket score in the overall bucket. Alternatively, if you settop_n
to the number of jobs, theoverall_score
is high only when all jobs detect anomalies in that overall bucket. If you set thebucket_span
parameter (to a value greater than its default), theoverall_score
is the maximumoverall_score
of the overall buckets that have a span equal to the jobs' largest bucket span.- Parameters:
fn
- a function that initializes a builder to create theGetOverallBucketsRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
getRecords
public GetRecordsResponse getRecords(GetRecordsRequest request) throws IOException, ElasticsearchException Get anomaly records for an anomaly detection job. Records contain the detailed analytical results. They describe the anomalous activity that has been identified in the input data based on the detector configuration. There can be many anomaly records depending on the characteristics and size of the input data. In practice, there are often too many to be able to manually process them. The machine learning features therefore perform a sophisticated aggregation of the anomaly records into buckets. The number of record results depends on the number of anomalies found in each bucket, which relates to the number of time series being modeled and the number of detectors.- Throws:
IOException
ElasticsearchException
- See Also:
-
getRecords
public final GetRecordsResponse getRecords(Function<GetRecordsRequest.Builder, ObjectBuilder<GetRecordsRequest>> fn) throws IOException, ElasticsearchExceptionGet anomaly records for an anomaly detection job. Records contain the detailed analytical results. They describe the anomalous activity that has been identified in the input data based on the detector configuration. There can be many anomaly records depending on the characteristics and size of the input data. In practice, there are often too many to be able to manually process them. The machine learning features therefore perform a sophisticated aggregation of the anomaly records into buckets. The number of record results depends on the number of anomalies found in each bucket, which relates to the number of time series being modeled and the number of detectors.- Parameters:
fn
- a function that initializes a builder to create theGetRecordsRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
getTrainedModels
public GetTrainedModelsResponse getTrainedModels(GetTrainedModelsRequest request) throws IOException, ElasticsearchException Get trained model configuration info.- Throws:
IOException
ElasticsearchException
- See Also:
-
getTrainedModels
public final GetTrainedModelsResponse getTrainedModels(Function<GetTrainedModelsRequest.Builder, ObjectBuilder<GetTrainedModelsRequest>> fn) throws IOException, ElasticsearchExceptionGet trained model configuration info.- Parameters:
fn
- a function that initializes a builder to create theGetTrainedModelsRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
getTrainedModels
Get trained model configuration info.- Throws:
IOException
ElasticsearchException
- See Also:
-
getTrainedModelsStats
public GetTrainedModelsStatsResponse getTrainedModelsStats(GetTrainedModelsStatsRequest request) throws IOException, ElasticsearchException Get trained models usage info. You can get usage information for multiple trained models in a single API request by using a comma-separated list of model IDs or a wildcard expression.- Throws:
IOException
ElasticsearchException
- See Also:
-
getTrainedModelsStats
public final GetTrainedModelsStatsResponse getTrainedModelsStats(Function<GetTrainedModelsStatsRequest.Builder, ObjectBuilder<GetTrainedModelsStatsRequest>> fn) throws IOException, ElasticsearchExceptionGet trained models usage info. You can get usage information for multiple trained models in a single API request by using a comma-separated list of model IDs or a wildcard expression.- Parameters:
fn
- a function that initializes a builder to create theGetTrainedModelsStatsRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
getTrainedModelsStats
public GetTrainedModelsStatsResponse getTrainedModelsStats() throws IOException, ElasticsearchExceptionGet trained models usage info. You can get usage information for multiple trained models in a single API request by using a comma-separated list of model IDs or a wildcard expression.- Throws:
IOException
ElasticsearchException
- See Also:
-
inferTrainedModel
public InferTrainedModelResponse inferTrainedModel(InferTrainedModelRequest request) throws IOException, ElasticsearchException Evaluate a trained model.- Throws:
IOException
ElasticsearchException
- See Also:
-
inferTrainedModel
public final InferTrainedModelResponse inferTrainedModel(Function<InferTrainedModelRequest.Builder, ObjectBuilder<InferTrainedModelRequest>> fn) throws IOException, ElasticsearchExceptionEvaluate a trained model.- Parameters:
fn
- a function that initializes a builder to create theInferTrainedModelRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
info
Get machine learning information. Get defaults and limits used by machine learning. This endpoint is designed to be used by a user interface that needs to fully understand machine learning configurations where some options are not specified, meaning that the defaults should be used. This endpoint may be used to find out what those defaults are. It also provides information about the maximum size of machine learning jobs that could run in the current cluster configuration.- Throws:
IOException
ElasticsearchException
- See Also:
-
openJob
Open anomaly detection jobs.An anomaly detection job must be opened to be ready to receive and analyze data. It can be opened and closed multiple times throughout its lifecycle. When you open a new job, it starts with an empty model. When you open an existing job, the most recent model state is automatically loaded. The job is ready to resume its analysis from where it left off, once new data is received.
- Throws:
IOException
ElasticsearchException
- See Also:
-
openJob
public final OpenJobResponse openJob(Function<OpenJobRequest.Builder, ObjectBuilder<OpenJobRequest>> fn) throws IOException, ElasticsearchExceptionOpen anomaly detection jobs.An anomaly detection job must be opened to be ready to receive and analyze data. It can be opened and closed multiple times throughout its lifecycle. When you open a new job, it starts with an empty model. When you open an existing job, the most recent model state is automatically loaded. The job is ready to resume its analysis from where it left off, once new data is received.
- Parameters:
fn
- a function that initializes a builder to create theOpenJobRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
postCalendarEvents
public PostCalendarEventsResponse postCalendarEvents(PostCalendarEventsRequest request) throws IOException, ElasticsearchException Add scheduled events to the calendar.- Throws:
IOException
ElasticsearchException
- See Also:
-
postCalendarEvents
public final PostCalendarEventsResponse postCalendarEvents(Function<PostCalendarEventsRequest.Builder, ObjectBuilder<PostCalendarEventsRequest>> fn) throws IOException, ElasticsearchExceptionAdd scheduled events to the calendar.- Parameters:
fn
- a function that initializes a builder to create thePostCalendarEventsRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
postData
public <TData> PostDataResponse postData(PostDataRequest<TData> request) throws IOException, ElasticsearchException Send data to an anomaly detection job for analysis.IMPORTANT: For each job, data can be accepted from only a single connection at a time. It is not currently possible to post data to multiple jobs using wildcards or a comma-separated list.
- Throws:
IOException
ElasticsearchException
- See Also:
-
postData
public final <TData> PostDataResponse postData(Function<PostDataRequest.Builder<TData>, ObjectBuilder<PostDataRequest<TData>>> fn) throws IOException, ElasticsearchExceptionSend data to an anomaly detection job for analysis.IMPORTANT: For each job, data can be accepted from only a single connection at a time. It is not currently possible to post data to multiple jobs using wildcards or a comma-separated list.
- Parameters:
fn
- a function that initializes a builder to create thePostDataRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
previewDataFrameAnalytics
public PreviewDataFrameAnalyticsResponse previewDataFrameAnalytics(PreviewDataFrameAnalyticsRequest request) throws IOException, ElasticsearchException Preview features used by data frame analytics. Preview the extracted features used by a data frame analytics config.- Throws:
IOException
ElasticsearchException
- See Also:
-
previewDataFrameAnalytics
public final PreviewDataFrameAnalyticsResponse previewDataFrameAnalytics(Function<PreviewDataFrameAnalyticsRequest.Builder, ObjectBuilder<PreviewDataFrameAnalyticsRequest>> fn) throws IOException, ElasticsearchExceptionPreview features used by data frame analytics. Preview the extracted features used by a data frame analytics config.- Parameters:
fn
- a function that initializes a builder to create thePreviewDataFrameAnalyticsRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
previewDataFrameAnalytics
public PreviewDataFrameAnalyticsResponse previewDataFrameAnalytics() throws IOException, ElasticsearchExceptionPreview features used by data frame analytics. Preview the extracted features used by a data frame analytics config.- Throws:
IOException
ElasticsearchException
- See Also:
-
previewDatafeed
public <TDocument> PreviewDatafeedResponse<TDocument> previewDatafeed(PreviewDatafeedRequest request, Class<TDocument> tDocumentClass) throws IOException, ElasticsearchException Preview a datafeed. This API returns the first "page" of search results from a datafeed. You can preview an existing datafeed or provide configuration details for a datafeed and anomaly detection job in the API. The preview shows the structure of the data that will be passed to the anomaly detection engine. IMPORTANT: When Elasticsearch security features are enabled, the preview uses the credentials of the user that called the API. However, when the datafeed starts it uses the roles of the last user that created or updated the datafeed. To get a preview that accurately reflects the behavior of the datafeed, use the appropriate credentials. You can also use secondary authorization headers to supply the credentials.- Throws:
IOException
ElasticsearchException
- See Also:
-
previewDatafeed
public final <TDocument> PreviewDatafeedResponse<TDocument> previewDatafeed(Function<PreviewDatafeedRequest.Builder, ObjectBuilder<PreviewDatafeedRequest>> fn, Class<TDocument> tDocumentClass) throws IOException, ElasticsearchExceptionPreview a datafeed. This API returns the first "page" of search results from a datafeed. You can preview an existing datafeed or provide configuration details for a datafeed and anomaly detection job in the API. The preview shows the structure of the data that will be passed to the anomaly detection engine. IMPORTANT: When Elasticsearch security features are enabled, the preview uses the credentials of the user that called the API. However, when the datafeed starts it uses the roles of the last user that created or updated the datafeed. To get a preview that accurately reflects the behavior of the datafeed, use the appropriate credentials. You can also use secondary authorization headers to supply the credentials.- Parameters:
fn
- a function that initializes a builder to create thePreviewDatafeedRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
previewDatafeed
public PreviewDatafeedResponse<Void> previewDatafeed(PreviewDatafeedRequest request) throws IOException, ElasticsearchException Overload ofpreviewDatafeed(PreviewDatafeedRequest, Class)
, where Class is defined as Void, meaning the documents will not be deserialized.- Throws:
IOException
ElasticsearchException
-
previewDatafeed
public final PreviewDatafeedResponse<Void> previewDatafeed(Function<PreviewDatafeedRequest.Builder, ObjectBuilder<PreviewDatafeedRequest>> fn) throws IOException, ElasticsearchExceptionOverload ofpreviewDatafeed(Function, Class)
, where Class is defined as Void, meaning the documents will not be deserialized.- Throws:
IOException
ElasticsearchException
-
previewDatafeed
public <TDocument> PreviewDatafeedResponse<TDocument> previewDatafeed(PreviewDatafeedRequest request, Type tDocumentType) throws IOException, ElasticsearchException Preview a datafeed. This API returns the first "page" of search results from a datafeed. You can preview an existing datafeed or provide configuration details for a datafeed and anomaly detection job in the API. The preview shows the structure of the data that will be passed to the anomaly detection engine. IMPORTANT: When Elasticsearch security features are enabled, the preview uses the credentials of the user that called the API. However, when the datafeed starts it uses the roles of the last user that created or updated the datafeed. To get a preview that accurately reflects the behavior of the datafeed, use the appropriate credentials. You can also use secondary authorization headers to supply the credentials.- Throws:
IOException
ElasticsearchException
- See Also:
-
previewDatafeed
public final <TDocument> PreviewDatafeedResponse<TDocument> previewDatafeed(Function<PreviewDatafeedRequest.Builder, ObjectBuilder<PreviewDatafeedRequest>> fn, Type tDocumentType) throws IOException, ElasticsearchExceptionPreview a datafeed. This API returns the first "page" of search results from a datafeed. You can preview an existing datafeed or provide configuration details for a datafeed and anomaly detection job in the API. The preview shows the structure of the data that will be passed to the anomaly detection engine. IMPORTANT: When Elasticsearch security features are enabled, the preview uses the credentials of the user that called the API. However, when the datafeed starts it uses the roles of the last user that created or updated the datafeed. To get a preview that accurately reflects the behavior of the datafeed, use the appropriate credentials. You can also use secondary authorization headers to supply the credentials.- Parameters:
fn
- a function that initializes a builder to create thePreviewDatafeedRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
putCalendar
public PutCalendarResponse putCalendar(PutCalendarRequest request) throws IOException, ElasticsearchException Create a calendar.- Throws:
IOException
ElasticsearchException
- See Also:
-
putCalendar
public final PutCalendarResponse putCalendar(Function<PutCalendarRequest.Builder, ObjectBuilder<PutCalendarRequest>> fn) throws IOException, ElasticsearchExceptionCreate a calendar.- Parameters:
fn
- a function that initializes a builder to create thePutCalendarRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
putCalendarJob
public PutCalendarJobResponse putCalendarJob(PutCalendarJobRequest request) throws IOException, ElasticsearchException Add anomaly detection job to calendar.- Throws:
IOException
ElasticsearchException
- See Also:
-
putCalendarJob
public final PutCalendarJobResponse putCalendarJob(Function<PutCalendarJobRequest.Builder, ObjectBuilder<PutCalendarJobRequest>> fn) throws IOException, ElasticsearchExceptionAdd anomaly detection job to calendar.- Parameters:
fn
- a function that initializes a builder to create thePutCalendarJobRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
putDataFrameAnalytics
public PutDataFrameAnalyticsResponse putDataFrameAnalytics(PutDataFrameAnalyticsRequest request) throws IOException, ElasticsearchException Create a data frame analytics job. This API creates a data frame analytics job that performs an analysis on the source indices and stores the outcome in a destination index. By default, the query used in the source configuration is{"match_all": {}}
.If the destination index does not exist, it is created automatically when you start the job.
If you supply only a subset of the regression or classification parameters, hyperparameter optimization occurs. It determines a value for each of the undefined parameters.
- Throws:
IOException
ElasticsearchException
- See Also:
-
putDataFrameAnalytics
public final PutDataFrameAnalyticsResponse putDataFrameAnalytics(Function<PutDataFrameAnalyticsRequest.Builder, ObjectBuilder<PutDataFrameAnalyticsRequest>> fn) throws IOException, ElasticsearchExceptionCreate a data frame analytics job. This API creates a data frame analytics job that performs an analysis on the source indices and stores the outcome in a destination index. By default, the query used in the source configuration is{"match_all": {}}
.If the destination index does not exist, it is created automatically when you start the job.
If you supply only a subset of the regression or classification parameters, hyperparameter optimization occurs. It determines a value for each of the undefined parameters.
- Parameters:
fn
- a function that initializes a builder to create thePutDataFrameAnalyticsRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
putDatafeed
public PutDatafeedResponse putDatafeed(PutDatafeedRequest request) throws IOException, ElasticsearchException Create a datafeed. Datafeeds retrieve data from Elasticsearch for analysis by an anomaly detection job. You can associate only one datafeed with each anomaly detection job. The datafeed contains a query that runs at a defined interval (frequency
). If you are concerned about delayed data, you can add a delay (query_delay') at each interval. By default, the datafeed uses the following query:
{"match_all": {"boost": 1}}`.When Elasticsearch security features are enabled, your datafeed remembers which roles the user who created it had at the time of creation and runs the query using those same roles. If you provide secondary authorization headers, those credentials are used instead. You must use Kibana, this API, or the create anomaly detection jobs API to create a datafeed. Do not add a datafeed directly to the
.ml-config
index. Do not give userswrite
privileges on the.ml-config
index.- Throws:
IOException
ElasticsearchException
- See Also:
-
putDatafeed
public final PutDatafeedResponse putDatafeed(Function<PutDatafeedRequest.Builder, ObjectBuilder<PutDatafeedRequest>> fn) throws IOException, ElasticsearchExceptionCreate a datafeed. Datafeeds retrieve data from Elasticsearch for analysis by an anomaly detection job. You can associate only one datafeed with each anomaly detection job. The datafeed contains a query that runs at a defined interval (frequency
). If you are concerned about delayed data, you can add a delay (query_delay') at each interval. By default, the datafeed uses the following query:
{"match_all": {"boost": 1}}`.When Elasticsearch security features are enabled, your datafeed remembers which roles the user who created it had at the time of creation and runs the query using those same roles. If you provide secondary authorization headers, those credentials are used instead. You must use Kibana, this API, or the create anomaly detection jobs API to create a datafeed. Do not add a datafeed directly to the
.ml-config
index. Do not give userswrite
privileges on the.ml-config
index.- Parameters:
fn
- a function that initializes a builder to create thePutDatafeedRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
putFilter
public PutFilterResponse putFilter(PutFilterRequest request) throws IOException, ElasticsearchException Create a filter. A filter contains a list of strings. It can be used by one or more anomaly detection jobs. Specifically, filters are referenced in thecustom_rules
property of detector configuration objects.- Throws:
IOException
ElasticsearchException
- See Also:
-
putFilter
public final PutFilterResponse putFilter(Function<PutFilterRequest.Builder, ObjectBuilder<PutFilterRequest>> fn) throws IOException, ElasticsearchExceptionCreate a filter. A filter contains a list of strings. It can be used by one or more anomaly detection jobs. Specifically, filters are referenced in thecustom_rules
property of detector configuration objects.- Parameters:
fn
- a function that initializes a builder to create thePutFilterRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
putJob
Create an anomaly detection job.If you include a
datafeed_config
, you must have read index privileges on the source index. If you include adatafeed_config
but do not provide a query, the datafeed uses{"match_all": {"boost": 1}}
.- Throws:
IOException
ElasticsearchException
- See Also:
-
putJob
public final PutJobResponse putJob(Function<PutJobRequest.Builder, ObjectBuilder<PutJobRequest>> fn) throws IOException, ElasticsearchExceptionCreate an anomaly detection job.If you include a
datafeed_config
, you must have read index privileges on the source index. If you include adatafeed_config
but do not provide a query, the datafeed uses{"match_all": {"boost": 1}}
.- Parameters:
fn
- a function that initializes a builder to create thePutJobRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
putTrainedModel
public PutTrainedModelResponse putTrainedModel(PutTrainedModelRequest request) throws IOException, ElasticsearchException Create a trained model. Enable you to supply a trained model that is not created by data frame analytics.- Throws:
IOException
ElasticsearchException
- See Also:
-
putTrainedModel
public final PutTrainedModelResponse putTrainedModel(Function<PutTrainedModelRequest.Builder, ObjectBuilder<PutTrainedModelRequest>> fn) throws IOException, ElasticsearchExceptionCreate a trained model. Enable you to supply a trained model that is not created by data frame analytics.- Parameters:
fn
- a function that initializes a builder to create thePutTrainedModelRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
putTrainedModelAlias
public PutTrainedModelAliasResponse putTrainedModelAlias(PutTrainedModelAliasRequest request) throws IOException, ElasticsearchException Create or update a trained model alias. A trained model alias is a logical name used to reference a single trained model. You can use aliases instead of trained model identifiers to make it easier to reference your models. For example, you can use aliases in inference aggregations and processors. An alias must be unique and refer to only a single trained model. However, you can have multiple aliases for each trained model. If you use this API to update an alias such that it references a different trained model ID and the model uses a different type of data frame analytics, an error occurs. For example, this situation occurs if you have a trained model for regression analysis and a trained model for classification analysis; you cannot reassign an alias from one type of trained model to another. If you use this API to update an alias and there are very few input fields in common between the old and new trained models for the model alias, the API returns a warning.- Throws:
IOException
ElasticsearchException
- See Also:
-
putTrainedModelAlias
public final PutTrainedModelAliasResponse putTrainedModelAlias(Function<PutTrainedModelAliasRequest.Builder, ObjectBuilder<PutTrainedModelAliasRequest>> fn) throws IOException, ElasticsearchExceptionCreate or update a trained model alias. A trained model alias is a logical name used to reference a single trained model. You can use aliases instead of trained model identifiers to make it easier to reference your models. For example, you can use aliases in inference aggregations and processors. An alias must be unique and refer to only a single trained model. However, you can have multiple aliases for each trained model. If you use this API to update an alias such that it references a different trained model ID and the model uses a different type of data frame analytics, an error occurs. For example, this situation occurs if you have a trained model for regression analysis and a trained model for classification analysis; you cannot reassign an alias from one type of trained model to another. If you use this API to update an alias and there are very few input fields in common between the old and new trained models for the model alias, the API returns a warning.- Parameters:
fn
- a function that initializes a builder to create thePutTrainedModelAliasRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
putTrainedModelDefinitionPart
public PutTrainedModelDefinitionPartResponse putTrainedModelDefinitionPart(PutTrainedModelDefinitionPartRequest request) throws IOException, ElasticsearchException Create part of a trained model definition.- Throws:
IOException
ElasticsearchException
- See Also:
-
putTrainedModelDefinitionPart
public final PutTrainedModelDefinitionPartResponse putTrainedModelDefinitionPart(Function<PutTrainedModelDefinitionPartRequest.Builder, ObjectBuilder<PutTrainedModelDefinitionPartRequest>> fn) throws IOException, ElasticsearchExceptionCreate part of a trained model definition.- Parameters:
fn
- a function that initializes a builder to create thePutTrainedModelDefinitionPartRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
putTrainedModelVocabulary
public PutTrainedModelVocabularyResponse putTrainedModelVocabulary(PutTrainedModelVocabularyRequest request) throws IOException, ElasticsearchException Create a trained model vocabulary. This API is supported only for natural language processing (NLP) models. The vocabulary is stored in the index as described ininference_config.*.vocabulary
of the trained model definition.- Throws:
IOException
ElasticsearchException
- See Also:
-
putTrainedModelVocabulary
public final PutTrainedModelVocabularyResponse putTrainedModelVocabulary(Function<PutTrainedModelVocabularyRequest.Builder, ObjectBuilder<PutTrainedModelVocabularyRequest>> fn) throws IOException, ElasticsearchExceptionCreate a trained model vocabulary. This API is supported only for natural language processing (NLP) models. The vocabulary is stored in the index as described ininference_config.*.vocabulary
of the trained model definition.- Parameters:
fn
- a function that initializes a builder to create thePutTrainedModelVocabularyRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
resetJob
public ResetJobResponse resetJob(ResetJobRequest request) throws IOException, ElasticsearchException Reset an anomaly detection job. All model state and results are deleted. The job is ready to start over as if it had just been created. It is not currently possible to reset multiple jobs using wildcards or a comma separated list.- Throws:
IOException
ElasticsearchException
- See Also:
-
resetJob
public final ResetJobResponse resetJob(Function<ResetJobRequest.Builder, ObjectBuilder<ResetJobRequest>> fn) throws IOException, ElasticsearchExceptionReset an anomaly detection job. All model state and results are deleted. The job is ready to start over as if it had just been created. It is not currently possible to reset multiple jobs using wildcards or a comma separated list.- Parameters:
fn
- a function that initializes a builder to create theResetJobRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
revertModelSnapshot
public RevertModelSnapshotResponse revertModelSnapshot(RevertModelSnapshotRequest request) throws IOException, ElasticsearchException Revert to a snapshot. The machine learning features react quickly to anomalous input, learning new behaviors in data. Highly anomalous input increases the variance in the models whilst the system learns whether this is a new step-change in behavior or a one-off event. In the case where this anomalous input is known to be a one-off, then it might be appropriate to reset the model state to a time before this event. For example, you might consider reverting to a saved snapshot after Black Friday or a critical system failure.- Throws:
IOException
ElasticsearchException
- See Also:
-
revertModelSnapshot
public final RevertModelSnapshotResponse revertModelSnapshot(Function<RevertModelSnapshotRequest.Builder, ObjectBuilder<RevertModelSnapshotRequest>> fn) throws IOException, ElasticsearchExceptionRevert to a snapshot. The machine learning features react quickly to anomalous input, learning new behaviors in data. Highly anomalous input increases the variance in the models whilst the system learns whether this is a new step-change in behavior or a one-off event. In the case where this anomalous input is known to be a one-off, then it might be appropriate to reset the model state to a time before this event. For example, you might consider reverting to a saved snapshot after Black Friday or a critical system failure.- Parameters:
fn
- a function that initializes a builder to create theRevertModelSnapshotRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
setUpgradeMode
public SetUpgradeModeResponse setUpgradeMode(SetUpgradeModeRequest request) throws IOException, ElasticsearchException Set upgrade_mode for ML indices. Sets a cluster wide upgrade_mode setting that prepares machine learning indices for an upgrade. When upgrading your cluster, in some circumstances you must restart your nodes and reindex your machine learning indices. In those circumstances, there must be no machine learning jobs running. You can close the machine learning jobs, do the upgrade, then open all the jobs again. Alternatively, you can use this API to temporarily halt tasks associated with the jobs and datafeeds and prevent new jobs from opening. You can also use this API during upgrades that do not require you to reindex your machine learning indices, though stopping jobs is not a requirement in that case. You can see the current value for the upgrade_mode setting by using the get machine learning info API.- Throws:
IOException
ElasticsearchException
- See Also:
-
setUpgradeMode
public final SetUpgradeModeResponse setUpgradeMode(Function<SetUpgradeModeRequest.Builder, ObjectBuilder<SetUpgradeModeRequest>> fn) throws IOException, ElasticsearchExceptionSet upgrade_mode for ML indices. Sets a cluster wide upgrade_mode setting that prepares machine learning indices for an upgrade. When upgrading your cluster, in some circumstances you must restart your nodes and reindex your machine learning indices. In those circumstances, there must be no machine learning jobs running. You can close the machine learning jobs, do the upgrade, then open all the jobs again. Alternatively, you can use this API to temporarily halt tasks associated with the jobs and datafeeds and prevent new jobs from opening. You can also use this API during upgrades that do not require you to reindex your machine learning indices, though stopping jobs is not a requirement in that case. You can see the current value for the upgrade_mode setting by using the get machine learning info API.- Parameters:
fn
- a function that initializes a builder to create theSetUpgradeModeRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
setUpgradeMode
Set upgrade_mode for ML indices. Sets a cluster wide upgrade_mode setting that prepares machine learning indices for an upgrade. When upgrading your cluster, in some circumstances you must restart your nodes and reindex your machine learning indices. In those circumstances, there must be no machine learning jobs running. You can close the machine learning jobs, do the upgrade, then open all the jobs again. Alternatively, you can use this API to temporarily halt tasks associated with the jobs and datafeeds and prevent new jobs from opening. You can also use this API during upgrades that do not require you to reindex your machine learning indices, though stopping jobs is not a requirement in that case. You can see the current value for the upgrade_mode setting by using the get machine learning info API.- Throws:
IOException
ElasticsearchException
- See Also:
-
startDataFrameAnalytics
public StartDataFrameAnalyticsResponse startDataFrameAnalytics(StartDataFrameAnalyticsRequest request) throws IOException, ElasticsearchException Start a data frame analytics job. A data frame analytics job can be started and stopped multiple times throughout its lifecycle. If the destination index does not exist, it is created automatically the first time you start the data frame analytics job. Theindex.number_of_shards
andindex.number_of_replicas
settings for the destination index are copied from the source index. If there are multiple source indices, the destination index copies the highest setting values. The mappings for the destination index are also copied from the source indices. If there are any mapping conflicts, the job fails to start. If the destination index exists, it is used as is. You can therefore set up the destination index in advance with custom settings and mappings.- Throws:
IOException
ElasticsearchException
- See Also:
-
startDataFrameAnalytics
public final StartDataFrameAnalyticsResponse startDataFrameAnalytics(Function<StartDataFrameAnalyticsRequest.Builder, ObjectBuilder<StartDataFrameAnalyticsRequest>> fn) throws IOException, ElasticsearchExceptionStart a data frame analytics job. A data frame analytics job can be started and stopped multiple times throughout its lifecycle. If the destination index does not exist, it is created automatically the first time you start the data frame analytics job. Theindex.number_of_shards
andindex.number_of_replicas
settings for the destination index are copied from the source index. If there are multiple source indices, the destination index copies the highest setting values. The mappings for the destination index are also copied from the source indices. If there are any mapping conflicts, the job fails to start. If the destination index exists, it is used as is. You can therefore set up the destination index in advance with custom settings and mappings.- Parameters:
fn
- a function that initializes a builder to create theStartDataFrameAnalyticsRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
startDatafeed
public StartDatafeedResponse startDatafeed(StartDatafeedRequest request) throws IOException, ElasticsearchException Start datafeeds.A datafeed must be started in order to retrieve data from Elasticsearch. A datafeed can be started and stopped multiple times throughout its lifecycle.
Before you can start a datafeed, the anomaly detection job must be open. Otherwise, an error occurs.
If you restart a stopped datafeed, it continues processing input data from the next millisecond after it was stopped. If new data was indexed for that exact millisecond between stopping and starting, it will be ignored.
When Elasticsearch security features are enabled, your datafeed remembers which roles the last user to create or update it had at the time of creation or update and runs the query using those same roles. If you provided secondary authorization headers when you created or updated the datafeed, those credentials are used instead.
- Throws:
IOException
ElasticsearchException
- See Also:
-
startDatafeed
public final StartDatafeedResponse startDatafeed(Function<StartDatafeedRequest.Builder, ObjectBuilder<StartDatafeedRequest>> fn) throws IOException, ElasticsearchExceptionStart datafeeds.A datafeed must be started in order to retrieve data from Elasticsearch. A datafeed can be started and stopped multiple times throughout its lifecycle.
Before you can start a datafeed, the anomaly detection job must be open. Otherwise, an error occurs.
If you restart a stopped datafeed, it continues processing input data from the next millisecond after it was stopped. If new data was indexed for that exact millisecond between stopping and starting, it will be ignored.
When Elasticsearch security features are enabled, your datafeed remembers which roles the last user to create or update it had at the time of creation or update and runs the query using those same roles. If you provided secondary authorization headers when you created or updated the datafeed, those credentials are used instead.
- Parameters:
fn
- a function that initializes a builder to create theStartDatafeedRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
startTrainedModelDeployment
public StartTrainedModelDeploymentResponse startTrainedModelDeployment(StartTrainedModelDeploymentRequest request) throws IOException, ElasticsearchException Start a trained model deployment. It allocates the model to every machine learning node.- Throws:
IOException
ElasticsearchException
- See Also:
-
startTrainedModelDeployment
public final StartTrainedModelDeploymentResponse startTrainedModelDeployment(Function<StartTrainedModelDeploymentRequest.Builder, ObjectBuilder<StartTrainedModelDeploymentRequest>> fn) throws IOException, ElasticsearchExceptionStart a trained model deployment. It allocates the model to every machine learning node.- Parameters:
fn
- a function that initializes a builder to create theStartTrainedModelDeploymentRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
stopDataFrameAnalytics
public StopDataFrameAnalyticsResponse stopDataFrameAnalytics(StopDataFrameAnalyticsRequest request) throws IOException, ElasticsearchException Stop data frame analytics jobs. A data frame analytics job can be started and stopped multiple times throughout its lifecycle.- Throws:
IOException
ElasticsearchException
- See Also:
-
stopDataFrameAnalytics
public final StopDataFrameAnalyticsResponse stopDataFrameAnalytics(Function<StopDataFrameAnalyticsRequest.Builder, ObjectBuilder<StopDataFrameAnalyticsRequest>> fn) throws IOException, ElasticsearchExceptionStop data frame analytics jobs. A data frame analytics job can be started and stopped multiple times throughout its lifecycle.- Parameters:
fn
- a function that initializes a builder to create theStopDataFrameAnalyticsRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
stopDatafeed
public StopDatafeedResponse stopDatafeed(StopDatafeedRequest request) throws IOException, ElasticsearchException Stop datafeeds. A datafeed that is stopped ceases to retrieve data from Elasticsearch. A datafeed can be started and stopped multiple times throughout its lifecycle.- Throws:
IOException
ElasticsearchException
- See Also:
-
stopDatafeed
public final StopDatafeedResponse stopDatafeed(Function<StopDatafeedRequest.Builder, ObjectBuilder<StopDatafeedRequest>> fn) throws IOException, ElasticsearchExceptionStop datafeeds. A datafeed that is stopped ceases to retrieve data from Elasticsearch. A datafeed can be started and stopped multiple times throughout its lifecycle.- Parameters:
fn
- a function that initializes a builder to create theStopDatafeedRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
stopTrainedModelDeployment
public StopTrainedModelDeploymentResponse stopTrainedModelDeployment(StopTrainedModelDeploymentRequest request) throws IOException, ElasticsearchException Stop a trained model deployment.- Throws:
IOException
ElasticsearchException
- See Also:
-
stopTrainedModelDeployment
public final StopTrainedModelDeploymentResponse stopTrainedModelDeployment(Function<StopTrainedModelDeploymentRequest.Builder, ObjectBuilder<StopTrainedModelDeploymentRequest>> fn) throws IOException, ElasticsearchExceptionStop a trained model deployment.- Parameters:
fn
- a function that initializes a builder to create theStopTrainedModelDeploymentRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
updateDataFrameAnalytics
public UpdateDataFrameAnalyticsResponse updateDataFrameAnalytics(UpdateDataFrameAnalyticsRequest request) throws IOException, ElasticsearchException Update a data frame analytics job.- Throws:
IOException
ElasticsearchException
- See Also:
-
updateDataFrameAnalytics
public final UpdateDataFrameAnalyticsResponse updateDataFrameAnalytics(Function<UpdateDataFrameAnalyticsRequest.Builder, ObjectBuilder<UpdateDataFrameAnalyticsRequest>> fn) throws IOException, ElasticsearchExceptionUpdate a data frame analytics job.- Parameters:
fn
- a function that initializes a builder to create theUpdateDataFrameAnalyticsRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
updateDatafeed
public UpdateDatafeedResponse updateDatafeed(UpdateDatafeedRequest request) throws IOException, ElasticsearchException Update a datafeed. You must stop and start the datafeed for the changes to be applied. When Elasticsearch security features are enabled, your datafeed remembers which roles the user who updated it had at the time of the update and runs the query using those same roles. If you provide secondary authorization headers, those credentials are used instead.- Throws:
IOException
ElasticsearchException
- See Also:
-
updateDatafeed
public final UpdateDatafeedResponse updateDatafeed(Function<UpdateDatafeedRequest.Builder, ObjectBuilder<UpdateDatafeedRequest>> fn) throws IOException, ElasticsearchExceptionUpdate a datafeed. You must stop and start the datafeed for the changes to be applied. When Elasticsearch security features are enabled, your datafeed remembers which roles the user who updated it had at the time of the update and runs the query using those same roles. If you provide secondary authorization headers, those credentials are used instead.- Parameters:
fn
- a function that initializes a builder to create theUpdateDatafeedRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
updateFilter
public UpdateFilterResponse updateFilter(UpdateFilterRequest request) throws IOException, ElasticsearchException Update a filter. Updates the description of a filter, adds items, or removes items from the list.- Throws:
IOException
ElasticsearchException
- See Also:
-
updateFilter
public final UpdateFilterResponse updateFilter(Function<UpdateFilterRequest.Builder, ObjectBuilder<UpdateFilterRequest>> fn) throws IOException, ElasticsearchExceptionUpdate a filter. Updates the description of a filter, adds items, or removes items from the list.- Parameters:
fn
- a function that initializes a builder to create theUpdateFilterRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
updateJob
public UpdateJobResponse updateJob(UpdateJobRequest request) throws IOException, ElasticsearchException Update an anomaly detection job. Updates certain properties of an anomaly detection job.- Throws:
IOException
ElasticsearchException
- See Also:
-
updateJob
public final UpdateJobResponse updateJob(Function<UpdateJobRequest.Builder, ObjectBuilder<UpdateJobRequest>> fn) throws IOException, ElasticsearchExceptionUpdate an anomaly detection job. Updates certain properties of an anomaly detection job.- Parameters:
fn
- a function that initializes a builder to create theUpdateJobRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
updateModelSnapshot
public UpdateModelSnapshotResponse updateModelSnapshot(UpdateModelSnapshotRequest request) throws IOException, ElasticsearchException Update a snapshot. Updates certain properties of a snapshot.- Throws:
IOException
ElasticsearchException
- See Also:
-
updateModelSnapshot
public final UpdateModelSnapshotResponse updateModelSnapshot(Function<UpdateModelSnapshotRequest.Builder, ObjectBuilder<UpdateModelSnapshotRequest>> fn) throws IOException, ElasticsearchExceptionUpdate a snapshot. Updates certain properties of a snapshot.- Parameters:
fn
- a function that initializes a builder to create theUpdateModelSnapshotRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
updateTrainedModelDeployment
public UpdateTrainedModelDeploymentResponse updateTrainedModelDeployment(UpdateTrainedModelDeploymentRequest request) throws IOException, ElasticsearchException Update a trained model deployment.- Throws:
IOException
ElasticsearchException
- See Also:
-
updateTrainedModelDeployment
public final UpdateTrainedModelDeploymentResponse updateTrainedModelDeployment(Function<UpdateTrainedModelDeploymentRequest.Builder, ObjectBuilder<UpdateTrainedModelDeploymentRequest>> fn) throws IOException, ElasticsearchExceptionUpdate a trained model deployment.- Parameters:
fn
- a function that initializes a builder to create theUpdateTrainedModelDeploymentRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
upgradeJobSnapshot
public UpgradeJobSnapshotResponse upgradeJobSnapshot(UpgradeJobSnapshotRequest request) throws IOException, ElasticsearchException Upgrade a snapshot. Upgrade an anomaly detection model snapshot to the latest major version. Over time, older snapshot formats are deprecated and removed. Anomaly detection jobs support only snapshots that are from the current or previous major version. This API provides a means to upgrade a snapshot to the current major version. This aids in preparing the cluster for an upgrade to the next major version. Only one snapshot per anomaly detection job can be upgraded at a time and the upgraded snapshot cannot be the current snapshot of the anomaly detection job.- Throws:
IOException
ElasticsearchException
- See Also:
-
upgradeJobSnapshot
public final UpgradeJobSnapshotResponse upgradeJobSnapshot(Function<UpgradeJobSnapshotRequest.Builder, ObjectBuilder<UpgradeJobSnapshotRequest>> fn) throws IOException, ElasticsearchExceptionUpgrade a snapshot. Upgrade an anomaly detection model snapshot to the latest major version. Over time, older snapshot formats are deprecated and removed. Anomaly detection jobs support only snapshots that are from the current or previous major version. This API provides a means to upgrade a snapshot to the current major version. This aids in preparing the cluster for an upgrade to the next major version. Only one snapshot per anomaly detection job can be upgraded at a time and the upgraded snapshot cannot be the current snapshot of the anomaly detection job.- Parameters:
fn
- a function that initializes a builder to create theUpgradeJobSnapshotRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
validate
public ValidateResponse validate(ValidateRequest request) throws IOException, ElasticsearchException Validate an anomaly detection job.- Throws:
IOException
ElasticsearchException
- See Also:
-
validate
public final ValidateResponse validate(Function<ValidateRequest.Builder, ObjectBuilder<ValidateRequest>> fn) throws IOException, ElasticsearchExceptionValidate an anomaly detection job.- Parameters:
fn
- a function that initializes a builder to create theValidateRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
validate
Validate an anomaly detection job.- Throws:
IOException
ElasticsearchException
- See Also:
-
validateDetector
public ValidateDetectorResponse validateDetector(ValidateDetectorRequest request) throws IOException, ElasticsearchException Validate an anomaly detection job.- Throws:
IOException
ElasticsearchException
- See Also:
-
validateDetector
public final ValidateDetectorResponse validateDetector(Function<ValidateDetectorRequest.Builder, ObjectBuilder<ValidateDetectorRequest>> fn) throws IOException, ElasticsearchExceptionValidate an anomaly detection job.- Parameters:
fn
- a function that initializes a builder to create theValidateDetectorRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
validateDetector
Validate an anomaly detection job.- Throws:
IOException
ElasticsearchException
- See Also:
-