Class PreviewDatafeedRequest
java.lang.Object
co.elastic.clients.elasticsearch._types.RequestBase
co.elastic.clients.elasticsearch.ml.PreviewDatafeedRequest
- All Implemented Interfaces:
JsonpSerializable
@JsonpDeserializable
public class PreviewDatafeedRequest
extends RequestBase
implements JsonpSerializable
Previews 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.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class co.elastic.clients.elasticsearch._types.RequestBase
RequestBase.AbstractBuilder<BuilderT extends RequestBase.AbstractBuilder<BuilderT>>
-
Field Summary
Modifier and TypeFieldDescriptionstatic final JsonpDeserializer<PreviewDatafeedRequest>
Json deserializer forPreviewDatafeedRequest
static final SimpleEndpoint<PreviewDatafeedRequest,
?> Endpoint "ml.preview_datafeed
". -
Method Summary
Modifier and TypeMethodDescriptionstatic <TDocument>
Endpoint<PreviewDatafeedRequest,PreviewDatafeedResponse<TDocument>, ErrorResponse> createPreviewDatafeedEndpoint
(JsonpDeserializer<TDocument> tDocumentDeserializer) Create an "ml.preview_datafeed
" endpoint.final DatafeedConfig
The datafeed definition to preview.final String
A numerical character string that uniquely identifies the datafeed.final DateTime
end()
The end time when the datafeed preview should stopfinal JobConfig
The configuration details for the anomaly detection job that is associated with the datafeed.static PreviewDatafeedRequest
void
serialize
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected void
serializeInternal
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static void
final DateTime
start()
The start time from where the datafeed preview should beginMethods inherited from class co.elastic.clients.elasticsearch._types.RequestBase
toString
-
Field Details
-
_DESERIALIZER
Json deserializer forPreviewDatafeedRequest
-
_ENDPOINT
Endpoint "ml.preview_datafeed
".
-
-
Method Details
-
of
public static PreviewDatafeedRequest of(Function<PreviewDatafeedRequest.Builder, ObjectBuilder<PreviewDatafeedRequest>> fn) -
datafeedConfig
The datafeed definition to preview.API name:
datafeed_config
-
datafeedId
A numerical character string that uniquely identifies the datafeed. This identifier can contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores. It must start and end with alphanumeric characters. NOTE: If you use this path parameter, you cannot provide datafeed or anomaly detection job configuration details in the request body.API name:
datafeed_id
-
end
The end time when the datafeed preview should stopAPI name:
end
-
jobConfig
The configuration details for the anomaly detection job that is associated with the datafeed. If thedatafeed_config
object does not include ajob_id
that references an existing anomaly detection job, you must supply thisjob_config
object. If you include both ajob_id
and ajob_config
, the latter information is used. You cannot specify ajob_config
object unless you also supply adatafeed_config
object.API name:
job_config
-
start
The start time from where the datafeed preview should beginAPI name:
start
-
serialize
Serialize this object to JSON.- Specified by:
serialize
in interfaceJsonpSerializable
-
serializeInternal
-
setupPreviewDatafeedRequestDeserializer
protected static void setupPreviewDatafeedRequestDeserializer(ObjectDeserializer<PreviewDatafeedRequest.Builder> op) -
createPreviewDatafeedEndpoint
public static <TDocument> Endpoint<PreviewDatafeedRequest,PreviewDatafeedResponse<TDocument>, createPreviewDatafeedEndpointErrorResponse> (JsonpDeserializer<TDocument> tDocumentDeserializer) Create an "ml.preview_datafeed
" endpoint.
-