Class PutTrainedModelAliasRequest
java.lang.Object
co.elastic.clients.elasticsearch._types.RequestBase
co.elastic.clients.elasticsearch.ml.PutTrainedModelAliasRequest
public class PutTrainedModelAliasRequest extends RequestBase
Creates or updates 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.
- See Also:
- API specification
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PutTrainedModelAliasRequest.Builder
Builder forPutTrainedModelAliasRequest
.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 Endpoint<PutTrainedModelAliasRequest,PutTrainedModelAliasResponse,ErrorResponse>
_ENDPOINT
Endpoint "ml.put_trained_model_alias
". -
Method Summary
Modifier and Type Method Description java.lang.String
modelAlias()
Required - The alias to create or update.java.lang.String
modelId()
Required - The identifier for the trained model that the alias refers to.static PutTrainedModelAliasRequest
of(java.util.function.Function<PutTrainedModelAliasRequest.Builder,ObjectBuilder<PutTrainedModelAliasRequest>> fn)
java.lang.Boolean
reassign()
Specifies whether the alias gets reassigned to the specified trained model if it is already assigned to a different model.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
_ENDPOINT
public static final Endpoint<PutTrainedModelAliasRequest,PutTrainedModelAliasResponse,ErrorResponse> _ENDPOINTEndpoint "ml.put_trained_model_alias
".
-
-
Method Details
-
of
public static PutTrainedModelAliasRequest of(java.util.function.Function<PutTrainedModelAliasRequest.Builder,ObjectBuilder<PutTrainedModelAliasRequest>> fn) -
modelAlias
public final java.lang.String modelAlias()Required - The alias to create or update. This value cannot end in numbers.API name:
model_alias
-
modelId
public final java.lang.String modelId()Required - The identifier for the trained model that the alias refers to.API name:
model_id
-
reassign
@Nullable public final java.lang.Boolean reassign()Specifies whether the alias gets reassigned to the specified trained model if it is already assigned to a different model. If the alias is already assigned and this parameter is false, the API returns an error.API name:
reassign
-