{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-opensearch/json-schema/amazon-opensearch-create-ingestion-job-request-schema.json",
  "title": "CreateIngestionJobRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-opensearch-ingestion-job-api-openapi.yml#/components/schemas/CreateIngestionJobRequest",
  "type": "object",
  "properties": {
    "collectionId": {
      "type": "string",
      "description": "The unique identifier of the collection to ingest data into."
    },
    "ingestionJobName": {
      "type": "string",
      "description": "The name of the ingestion job. The name must be unique within the collection."
    },
    "indexName": {
      "type": "string",
      "description": "The name of the index to ingest documents into."
    },
    "failureIndexName": {
      "type": "string",
      "description": "The name of the index where documents that fail to be ingested are recorded."
    },
    "source": {
      "$ref": "#/$defs/IngestionJobSource"
    },
    "tags": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AossTag"
      },
      "description": "An arbitrary set of tags (key–value pairs) to associate with the ingestion job."
    },
    "clientToken": {
      "type": "string",
      "description": "Unique, case-sensitive identifier to ensure idempotency of the request."
    }
  },
  "required": [
    "collectionId",
    "ingestionJobName",
    "indexName",
    "source"
  ],
  "$defs": {
    "AossTag": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string",
          "description": "The key to use in the tag."
        },
        "value": {
          "type": "string",
          "description": "The value of the tag."
        }
      },
      "required": [
        "key",
        "value"
      ]
    },
    "IngestionJobS3Source": {
      "type": "object",
      "properties": {
        "bucket": {
          "type": "string",
          "description": "The name or Amazon Resource Name (ARN) of the Amazon S3 bucket to ingest data from."
        },
        "bucketOwnerAccountId": {
          "type": "string",
          "description": "The Amazon Web Services account ID that owns the Amazon S3 bucket."
        },
        "keyPrefix": {
          "type": "string",
          "description": "A key prefix that limits ingestion to objects in the Amazon S3 bucket whose keys begin with the prefix."
        }
      }
    },
    "IngestionJobSource": {
      "type": "object",
      "properties": {
        "s3": {
          "$ref": "#/$defs/IngestionJobS3Source"
        }
      },
      "required": [
        "s3"
      ]
    }
  }
}