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:
- API specification
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PreviewDatafeedRequest.Builder
Builder forPreviewDatafeedRequest
.Nested classes/interfaces inherited from class co.elastic.clients.elasticsearch._types.RequestBase
RequestBase.AbstractBuilder<BuilderT extends RequestBase.AbstractBuilder<BuilderT>>
-
Field Summary
Fields Modifier and Type Field Description static JsonpDeserializer<PreviewDatafeedRequest>
_DESERIALIZER
Json deserializer forPreviewDatafeedRequest
static SimpleEndpoint<PreviewDatafeedRequest,?>
_ENDPOINT
Endpoint "ml.preview_datafeed
". -
Method Summary
Modifier and Type Method Description static <TDocument>
Endpoint<PreviewDatafeedRequest,PreviewDatafeedResponse<TDocument>,ErrorResponse>createPreviewDatafeedEndpoint(JsonpDeserializer<TDocument> tDocumentDeserializer)
Create an "ml.preview_datafeed
" endpoint.DatafeedConfig
datafeedConfig()
The datafeed definition to preview.java.lang.String
datafeedId()
A numerical character string that uniquely identifies the datafeed.JobConfig
jobConfig()
The configuration details for the anomaly detection job that is associated with the datafeed.static PreviewDatafeedRequest
of(java.util.function.Function<PreviewDatafeedRequest.Builder,ObjectBuilder<PreviewDatafeedRequest>> fn)
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
setupPreviewDatafeedRequestDeserializer(ObjectDeserializer<PreviewDatafeedRequest.Builder> op)
Methods inherited from class co.elastic.clients.elasticsearch._types.RequestBase
toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Field Details
-
_DESERIALIZER
Json deserializer forPreviewDatafeedRequest
-
_ENDPOINT
Endpoint "ml.preview_datafeed
".
-
-
Method Details
-
of
public static PreviewDatafeedRequest of(java.util.function.Function<PreviewDatafeedRequest.Builder,ObjectBuilder<PreviewDatafeedRequest>> fn) -
datafeedConfig
The datafeed definition to preview.API name:
datafeed_config
-
datafeedId
@Nullable public final java.lang.String 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
-
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
-
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>,ErrorResponse> createPreviewDatafeedEndpoint(JsonpDeserializer<TDocument> tDocumentDeserializer)Create an "ml.preview_datafeed
" endpoint.
-