{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/elastic/json-schema/elastic-enrich-stats-executing-policy-schema.json",
  "title": "enrich.stats.ExecutingPolicy",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/elastic-enrich-api-openapi.yml#/components/schemas/enrich.stats.ExecutingPolicy",
  "type": "object",
  "properties": {
    "name": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.Name"
        }
      ]
    },
    "task": {
      "allOf": [
        {
          "$ref": "#/$defs/tasks._types.TaskInfo"
        }
      ]
    }
  },
  "required": [
    "name",
    "task"
  ],
  "$defs": {
    "_types.Duration": {
      "description": "A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and\n`d` (days). Also accepts \"0\" without a unit and \"-1\" to indicate an unspecified value.",
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "string",
          "enum": [
            "-1"
          ]
        },
        {
          "type": "string",
          "enum": [
            "0"
          ]
        }
      ]
    },
    "_types.DurationValueUnitNanos": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.UnitNanos"
        }
      ]
    },
    "_types.EpochTimeUnitMillis": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.UnitMillis"
        }
      ]
    },
    "_types.Name": {
      "type": "string"
    },
    "_types.NodeId": {
      "type": "string"
    },
    "_types.TaskId": {
      "type": "string"
    },
    "_types.UnitMillis": {
      "description": "Time unit for milliseconds",
      "type": "number"
    },
    "_types.UnitNanos": {
      "description": "Time unit for nanoseconds",
      "type": "number"
    },
    "tasks._types.TaskInfo": {
      "type": "object",
      "properties": {
        "action": {
          "type": "string"
        },
        "cancelled": {
          "type": "boolean"
        },
        "cancellable": {
          "type": "boolean"
        },
        "description": {
          "description": "Human readable text that identifies the particular request that the task is performing.\nFor example, it might identify the search request being performed by a search task.\nOther kinds of tasks have different descriptions, like `_reindex` which has the source and the destination, or `_bulk` which just has the number of requests and the destination indices.\nMany requests will have only an empty description because more detailed information about the request is not easily available or particularly helpful in identifying the request.",
          "type": "string"
        },
        "headers": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "id": {
          "type": "number"
        },
        "node": {
          "allOf": [
            {
              "$ref": "#/$defs/_types.NodeId"
            }
          ]
        },
        "running_time": {
          "allOf": [
            {
              "$ref": "#/$defs/_types.Duration"
            }
          ]
        },
        "running_time_in_nanos": {
          "allOf": [
            {
              "$ref": "#/$defs/_types.DurationValueUnitNanos"
            }
          ]
        },
        "start_time_in_millis": {
          "allOf": [
            {
              "$ref": "#/$defs/_types.EpochTimeUnitMillis"
            }
          ]
        },
        "status": {
          "description": "The internal status of the task, which varies from task to task.\nThe format also varies.\nWhile the goal is to keep the status for a particular task consistent from version to version, this is not always possible because sometimes the implementation changes.\nFields might be removed from the status for a particular request so any parsing you do of the status might break in minor releases.",
          "type": "object"
        },
        "type": {
          "type": "string"
        },
        "parent_task_id": {
          "allOf": [
            {
              "$ref": "#/$defs/_types.TaskId"
            }
          ]
        }
      },
      "required": [
        "action",
        "cancellable",
        "headers",
        "id",
        "node",
        "running_time_in_nanos",
        "start_time_in_millis",
        "type"
      ]
    }
  }
}