yaml
type: "io.kestra.plugin.elasticsearch.Put"

Put an ElasticSearch document.

Examples

Put a document with a Map.

yaml
id: elasticsearch_put
namespace: company.team

tasks:
  - id: put
    type: io.kestra.plugin.elasticsearch.Put
    connection:
      hosts:
       - "http://localhost:9200"
    index: "my_index"
    key: "my_id"
    value:
      name: "John Doe"
      city: "Paris"

Put a document from a JSON string.

yaml
id: elasticsearch_put
namespace: company.team

inputs:
  - id: value
    type: JSON
    defaults: {"name": "John Doe", "city": "Paris"}

tasks:
  - id: put
    type: io.kestra.plugin.elasticsearch.Put
    connection:
      hosts:
       - "http://localhost:9200"
    index: "my_index"
    key: "my_id"
    value: "{{ inputs.value }}"

Properties

connection

The connection properties.

index

  • Type: string
  • Dynamic: ✔️
  • Required: ✔️

The elasticsearch index.

contentType

  • Type: string
  • Dynamic:
  • Required:
  • Default: JSON
  • Possible Values:
    • CBOR
    • JSON
    • SMILE
    • YAML

The content type of value.

key

  • Type: string
  • Dynamic: ✔️
  • Required:

The elasticsearch id.

opType

  • Type: string
  • Dynamic:
  • Required:
  • Possible Values:
    • INDEX
    • CREATE
    • UPDATE
    • DELETE

Sets the type of operation to perform.

refreshPolicy

  • Type: string
  • Dynamic:
  • Required:
  • Default: NONE
  • Possible Values:
    • IMMEDIATE
    • WAIT_UNTIL
    • NONE

Should this request trigger a refresh.

an immediate refresh IMMEDIATE, wait for a refresh WAIT_UNTIL, or proceed ignore refreshes entirely NONE.

routing

  • Type: string
  • Dynamic: ✔️
  • Required:

Controls the shard routing of the request.

Using this value to hash the shard and not the id.

value

  • Type: object
  • Dynamic: ✔️
  • Required:

The elasticsearch value.

Can be a string. In this case, the contentType will be used or a raw Map.

Outputs

id

  • Type: string
  • Required:

result

  • Type: string
  • Required:
  • Possible Values:
    • Created
    • Updated
    • Deleted
    • NotFound
    • NoOp

version

  • Type: integer
  • Required:

Definitions

io.kestra.plugin.elasticsearch.ElasticsearchConnection

  • hosts
    • Type: array
    • SubType: string
    • Dynamic: ✔️
    • Required: ✔️
    • Min items: 1
  • basicAuth
  • headers
    • Type: array
    • SubType: string
    • Dynamic: ✔️
    • Required:
  • pathPrefix
    • Type: string
    • Dynamic: ✔️
    • Required:
  • strictDeprecationMode
    • Type: boolean
    • Dynamic:
    • Required:
  • trustAllSsl
    • Type: boolean
    • Dynamic:
    • Required:

io.kestra.plugin.elasticsearch.ElasticsearchConnection-BasicAuth

  • password
    • Type: string
    • Dynamic: ✔️
    • Required:
  • username
    • Type: string
    • Dynamic: ✔️
    • Required: