{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-iot-sitewise/json-schema/amazon-iot-sitewise-create-bulk-import-job-request-schema.json",
  "title": "CreateBulkImportJobRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-iot-sitewise-jobs-api-openapi.yml#/components/schemas/CreateBulkImportJobRequest",
  "type": "object",
  "properties": {
    "jobName": {
      "type": "string",
      "description": "The unique name that helps identify the job request."
    },
    "jobRoleArn": {
      "type": "string",
      "description": "The ARN of the IAM role that allows IoT SiteWise to read Amazon S3 data."
    },
    "files": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/File"
      },
      "description": "The files in the specified Amazon S3 bucket that contain your data. You can specify up to 100 files for each bulk import job. Each file supports the following size limits: Parquet files – Up to 256 MiB. Other file formats – Up to 5 GiB."
    },
    "errorReportLocation": {
      "$ref": "#/$defs/ErrorReportLocation"
    },
    "jobConfiguration": {
      "$ref": "#/$defs/JobConfiguration"
    },
    "adaptiveIngestion": {
      "type": "boolean",
      "description": "If set to true, ingest new data into IoT SiteWise storage. Measurements with notifications, metrics and transforms are computed. If set to false, historical data is ingested into IoT SiteWise as is."
    },
    "deleteFilesAfterImport": {
      "type": "boolean",
      "description": "If set to true, your data files is deleted from S3, after ingestion into IoT SiteWise storage."
    },
    "datasetId": {
      "type": "string",
      "description": "The ID of the session dataset to ingest data into. Specify this field, together with workspaceName, to ingest data into a session dataset in a workspace."
    },
    "workspaceName": {
      "type": "string",
      "description": "The name of the workspace that contains the session dataset. Specify this field together with datasetId."
    }
  },
  "required": [
    "jobName",
    "jobRoleArn",
    "files",
    "errorReportLocation"
  ],
  "$defs": {
    "Annotation": {
      "type": "object",
      "properties": {}
    },
    "Csv": {
      "type": "object",
      "properties": {
        "columnNames": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "ALIAS",
              "ASSET_ID",
              "PROPERTY_ID",
              "DATA_TYPE",
              "TIMESTAMP_SECONDS",
              "TIMESTAMP_NANO_OFFSET",
              "QUALITY",
              "VALUE"
            ]
          },
          "description": "The column names specified in the .csv file."
        }
      },
      "required": [
        "columnNames"
      ]
    },
    "ErrorReportLocation": {
      "type": "object",
      "properties": {
        "bucket": {
          "type": "string",
          "description": "The name of the Amazon S3 bucket to which errors associated with the bulk import job are sent."
        },
        "prefix": {
          "type": "string",
          "description": "Amazon S3 uses the prefix as a folder name to organize data in the bucket. Each Amazon S3 object has a key that is its unique identifier in the bucket. Each object in a bucket has exactly one key. The prefix must end with a forward slash (/). For more information, see Organizing objects using prefixes in the Amazon Simple Storage Service User Guide."
        }
      },
      "required": [
        "bucket",
        "prefix"
      ]
    },
    "File": {
      "type": "object",
      "properties": {
        "bucket": {
          "type": "string",
          "description": "The name of the Amazon S3 bucket from which data is imported."
        },
        "key": {
          "type": "string",
          "description": "The key of the Amazon S3 object that contains your data. Each object has a key that is a unique identifier. Each object has exactly one key."
        },
        "versionId": {
          "type": "string",
          "description": "The version ID to identify a specific version of the Amazon S3 object that contains your data."
        },
        "alias": {
          "type": "string",
          "description": "The alias associated with the file's time series."
        },
        "startTime": {
          "$ref": "#/$defs/TimeInNanos"
        },
        "fileFormat": {
          "$ref": "#/$defs/FileFormat"
        }
      },
      "required": [
        "bucket",
        "key"
      ]
    },
    "FileFormat": {
      "type": "object",
      "properties": {
        "csv": {
          "$ref": "#/$defs/Csv"
        },
        "parquet": {
          "$ref": "#/$defs/Parquet"
        },
        "mp4": {
          "$ref": "#/$defs/Mp4"
        },
        "annotation": {
          "$ref": "#/$defs/Annotation"
        }
      }
    },
    "JobConfiguration": {
      "type": "object",
      "properties": {
        "fileFormat": {
          "$ref": "#/$defs/FileFormat"
        }
      }
    },
    "Mp4": {
      "type": "object",
      "properties": {}
    },
    "Parquet": {
      "type": "object",
      "properties": {}
    },
    "TimeInNanos": {
      "type": "object",
      "properties": {
        "timeInSeconds": {
          "type": "integer",
          "description": "The timestamp date, in seconds, in the Unix epoch format. Fractional nanosecond data is provided by offsetInNanos."
        },
        "offsetInNanos": {
          "type": "integer",
          "description": "The nanosecond offset from timeInSeconds."
        }
      },
      "required": [
        "timeInSeconds"
      ]
    }
  }
}