Class PutComponentTemplateRequest

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

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

  • Method Details

    • of

    • allowAutoCreate

      @Nullable public final Boolean allowAutoCreate()
      This setting overrides the action.auto_create_index cluster setting. When set to true in a component template, indexes are automatically created using that template. When set to false, data streams matching the component template must always be explicitly created.

      API name: allow_auto_create

    • clusterManagerTimeout

      @Nullable public final Time clusterManagerTimeout()
      The amount of time to wait for a response from the cluster manager node. For more information about supported time units, see Common parameters.

      API name: cluster_manager_timeout

    • create

      @Nullable public final Boolean create()
      When true, this request cannot replace or update existing component templates.

      API name: create

    • masterTimeout

      @Deprecated @Nullable public final Time masterTimeout()
      Deprecated.
      A duration. Units can be nanos, micros, ms (milliseconds), s (seconds), m (minutes), h (hours) and d (days). Also accepts 0 without a unit and -1 to indicate an unspecified value.

      API name: master_timeout

    • meta

      @Nonnull public final Map<String,JsonData> meta()
      API name: _meta
    • name

      @Nonnull public final String name()
      Required - The name of the component template to create. OpenSearch includes the following built-in component templates: logs-mappings, logs-settings, metrics-mappings, metrics-settings, synthetics-mapping, and synthetics-settings. OpenSearch uses these templates to configure backing indexes for its data streams. If you want to overwrite one of these templates, set the replacement template version to a higher value than the current version. If you want to disable all built-in component and index templates, set stack.templates.enabled to false using the Cluster Update Settings API.

      API name: name

    • template

      @Nonnull public final IndexState template()
      Required - API name: template
    • timeout

      @Nullable public final Time timeout()
      A duration. Units can be nanos, micros, ms (milliseconds), s (seconds), m (minutes), h (hours) and d (days). Also accepts 0 without a unit and -1 to indicate an unspecified value.

      API name: timeout

    • version

      @Nullable public final Long version()
      API name: version
    • 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 PutComponentTemplateRequest.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<PutComponentTemplateRequest.Builder,PutComponentTemplateRequest>
      Returns:
      a new builder instance.
    • builder

      @Nonnull public static PutComponentTemplateRequest.Builder builder()
    • setupPutComponentTemplateRequestDeserializer

      protected static void setupPutComponentTemplateRequestDeserializer(ObjectDeserializer<PutComponentTemplateRequest.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