Class PutAliasRequest

java.lang.Object
org.opensearch.client.opensearch._types.RequestBase
org.opensearch.client.opensearch.indices.PutAliasRequest
All Implemented Interfaces:
JsonpSerializable, PlainJsonSerializable, ToCopyableBuilder<PutAliasRequest.Builder,PutAliasRequest>

@JsonpDeserializable @Generated("org.opensearch.client.codegen.CodeGenerator") public final class PutAliasRequest extends RequestBase implements PlainJsonSerializable, ToCopyableBuilder<PutAliasRequest.Builder,PutAliasRequest>
Creates or updates an alias.
  • Field Details

  • Method Details

    • of

    • alias

      @Nullable public final String alias()
      API name: alias
    • clusterManagerTimeout

      @Nullable public final Time clusterManagerTimeout()
      Operation timeout for connection to cluster-manager node.

      API name: cluster_manager_timeout

    • filter

      @Nullable public final Query filter()
      API name: filter
    • index

      @Nonnull public final List<String> index()
      Comma-separated list of data streams or indexes to add. Supports wildcards (*). Wildcard patterns that match both data streams and indexes return an error.

      API name: index

    • indexRouting

      @Nullable public final String indexRouting()
      API name: index_routing
    • isHidden

      @Nullable public final Boolean isHidden()
      If true, the alias will be hidden`.

      API name: is_hidden

    • isWriteIndex

      @Nullable public final Boolean isWriteIndex()
      If true, sets the write index or data stream for the alias. If an alias points to multiple indexes or data streams and is_write_index isn't set, the alias rejects write requests. If an index alias points to one index and is_write_index isn't set, the index automatically acts as the write index. Data stream aliases don't automatically set a write data stream, even if the alias points to one data stream.

      API name: is_write_index

    • masterTimeout

      @Deprecated @Nullable public final Time masterTimeout()
      Deprecated.
      Period to wait for a connection to the cluster-manager node. If no response is received before the timeout expires, the request fails and returns an error.

      API name: master_timeout

    • name

      @Nullable public final String name()
      Alias to update. If the alias doesn't exist, the request creates it. Index alias names support date math.

      API name: name

    • routing

      @Nullable public final String routing()
      API name: routing
    • searchRouting

      @Nullable public final String searchRouting()
      API name: search_routing
    • timeout

      @Nullable public final Time timeout()
      Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.

      API name: timeout

    • serialize

      public void serialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
      Serialize this object to JSON.
      Specified by:
      serialize in interface JsonpSerializable
    • serializeInternal

      protected void serializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
    • toBuilder

      @Nonnull public PutAliasRequest.Builder toBuilder()
      Description copied from interface: ToCopyableBuilder
      Create a new builder ToCopyableBuilder that is initialised with the current state of this object.
      Specified by:
      toBuilder in interface ToCopyableBuilder<PutAliasRequest.Builder,PutAliasRequest>
      Returns:
      a new builder instance.
    • builder

      @Nonnull public static PutAliasRequest.Builder builder()
    • setupPutAliasRequestDeserializer

      protected static void setupPutAliasRequestDeserializer(ObjectDeserializer<PutAliasRequest.Builder> op)
    • applyQueryParameters

      protected void applyQueryParameters(@Nonnull Map<String,String> params)
      Overrides:
      applyQueryParameters in class RequestBase
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object