{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/aws-healthlake/json-schema/aws-healthlake-describe-data-transformation-job-response-schema.json",
  "title": "DescribeDataTransformationJobResponse",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/aws-healthlake-data-transformation-job-api-openapi.yml#/components/schemas/DescribeDataTransformationJobResponse",
  "type": "object",
  "properties": {
    "TransformationJobProperties": {
      "$ref": "#/$defs/TransformationJobProperties"
    }
  },
  "required": [
    "TransformationJobProperties"
  ],
  "$defs": {
    "DataTransformationS3Configuration": {
      "type": "object",
      "properties": {
        "S3Uri": {
          "type": "string",
          "description": "The Amazon S3 URI where HealthLake writes the converted output files."
        },
        "KmsKeyId": {
          "type": "string",
          "description": "The Amazon Web Services Key Management Service (Amazon Web Services KMS) key identifier used to encrypt the transformation job output written to Amazon S3."
        }
      },
      "required": [
        "S3Uri",
        "KmsKeyId"
      ]
    },
    "TransformationInputDataConfig": {
      "type": "object",
      "properties": {
        "S3Uri": {
          "type": "string",
          "description": "The Amazon S3 URI of the input data to transform."
        },
        "SourceFormat": {
          "type": "string",
          "enum": [
            "CCDA",
            "CSV"
          ],
          "description": "The format of the source data files (C-CDA or CSV)."
        }
      },
      "required": [
        "S3Uri"
      ]
    },
    "TransformationJobProgressReport": {
      "type": "object",
      "properties": {
        "TotalFilesScanned": {
          "type": "integer",
          "description": "The total number of source files scanned by the job."
        },
        "TotalFilesConverted": {
          "type": "integer",
          "description": "The total number of source files successfully converted."
        },
        "TotalFilesFailed": {
          "type": "integer",
          "description": "The total number of source files that failed conversion."
        },
        "TotalResourcesGenerated": {
          "type": "integer",
          "description": "The total number of FHIR R4 resources generated across all converted files."
        }
      },
      "required": [
        "TotalFilesScanned",
        "TotalFilesConverted",
        "TotalFilesFailed",
        "TotalResourcesGenerated"
      ]
    },
    "TransformationJobProperties": {
      "type": "object",
      "properties": {
        "JobId": {
          "type": "string",
          "description": "The unique identifier of the data transformation job."
        },
        "JobStatus": {
          "type": "string",
          "enum": [
            "SUBMITTED",
            "QUEUED",
            "IN_PROGRESS",
            "COMPLETED",
            "COMPLETED_WITH_ERRORS",
            "FAILED"
          ],
          "description": "The current status of the data transformation job."
        },
        "InputDataConfig": {
          "$ref": "#/$defs/TransformationInputDataConfig"
        },
        "OutputDataConfig": {
          "$ref": "#/$defs/TransformationOutputDataConfig"
        },
        "DataAccessRoleArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the Amazon Web Services Identity and Access Management (IAM) role that grants HealthLake access to the specified Amazon S3 locations. HealthLake assumes this role to read input files and write output files."
        },
        "SubmitTime": {
          "type": "string",
          "format": "date-time",
          "description": "The timestamp when the job was submitted."
        },
        "JobName": {
          "type": "string",
          "description": "The name of the data transformation job."
        },
        "ProfileId": {
          "type": "string",
          "description": "The unique identifier of the data transformation profile used for this job."
        },
        "ProfileName": {
          "type": "string",
          "description": "The name of the data transformation profile used for this job."
        },
        "ProfileVersion": {
          "type": "integer",
          "description": "The version number of the data transformation profile used for this job."
        },
        "EndTime": {
          "type": "string",
          "format": "date-time",
          "description": "The timestamp when the job completed or failed."
        },
        "DriftDetectionEnabled": {
          "type": "boolean",
          "description": "Specifies whether drift detection is enabled for this job. When enabled, HealthLake writes a drift report to the output Amazon S3 location alongside the converted files."
        },
        "ProvenanceEnabled": {
          "type": "boolean",
          "description": "Specifies whether FHIR R4 Provenance resource generation is enabled for this transformation job. When provenance is enabled, the service also generates related DocumentReference and Device resources."
        },
        "Message": {
          "type": "string",
          "description": "An informational message about the job, such as an error description if the job failed."
        },
        "JobProgressReport": {
          "$ref": "#/$defs/TransformationJobProgressReport"
        }
      },
      "required": [
        "JobId",
        "JobStatus",
        "InputDataConfig",
        "OutputDataConfig",
        "DataAccessRoleArn",
        "SubmitTime"
      ]
    },
    "TransformationOutputDataConfig": {
      "type": "object",
      "properties": {
        "S3Configuration": {
          "$ref": "#/$defs/DataTransformationS3Configuration"
        }
      },
      "required": [
        "S3Configuration"
      ]
    }
  }
}