{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "$id" : "https://voltdb.com/voltsp/schemas/source/s3",
  "title" : "S3 Source Configuration",
  "description" : "The S3 source monitors an Amazon S3 bucket or compatible object storage service for objects.\nIt reads objects from the specified bucket and prefix, and emits them as `S3ObjectMessage` objects\nthat include all file metadata about the S3 object, can also be configured to download the content of the file.\n\nObjects can optionally be deleted after they are processed.\n\nNote: This source should not be parallelized, each worker will read the same file from the same bucket.\n If the worker is restarted it will re-read all files from the same bucket and create duplicates. Please compare eTag value to deduplicate events.\n\nThe `S3ObjectMessage` includes the following metadata:\n- `bucketName`: The name of the S3 bucket\n- `key`: The key (path) of the S3 object\n- `content`: The actual content of the S3 object as a ByteBuffer, can be null\n- `contentType`: The content type of the S3 object\n- `contentLength`: The size of the S3 object in bytes\n- `lastModified`: The timestamp when the S3 object was last modified\n- `eTag`: The entity tag of the S3 object\n- `metadata`: A map of user-defined metadata associated with the S3 object\n",
  "type" : "object",
  "properties" : {
    "s3" : {
      "type" : "object",
      "properties" : {
        "bucketName" : {
          "type" : "string",
          "description" : "The name of the S3 bucket to read objects from."
        },
        "prefix" : {
          "type" : "string",
          "description" : "The prefix to filter objects by. Only objects with keys starting with this prefix will be processed."
        },
        "deleteOnCommit" : {
          "type" : "boolean",
          "description" : "Whether to delete objects from the bucket after they are read.",
          "default" : "false"
        },
        "downloadContent" : {
          "type" : "boolean",
          "description" : "Whether to pull object's content. This can be expensive operation for big files.",
          "default" : "false"
        },
        "s3Resource" : {
          "description" : "Reference to the S3 client resource.",
          "anyOf" : [ {
            "type" : "string"
          }, {
            "$ref" : "resource-s3.schema.json#/properties/s3"
          } ]
        },
        "initialCheckTime" : {
          "type" : "string",
          "format" : "date-time",
          "description" : "The instant time used to compare against the file’s modification time.\n If file's modification time is before given timestamp the file will be ignored.\n Default is epoch time, meaning all files will be processed.\n"
        }
      },
      "required" : [ "bucketName", "s3Resource" ],
      "additionalProperties" : false
    }
  },
  "required" : [ "s3" ],
  "additionalProperties" : false
}
