{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-fsx/json-schema/amazon-fsx-create-data-repository-task-response-schema.json",
  "title": "CreateDataRepositoryTaskResponse",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-fsx-data-repository-task-api-openapi.yml#/components/schemas/CreateDataRepositoryTaskResponse",
  "type": "object",
  "properties": {
    "DataRepositoryTask": {
      "$ref": "#/$defs/DataRepositoryTask"
    }
  },
  "$defs": {
    "CompletionReport": {
      "type": "object",
      "properties": {
        "Enabled": {
          "type": "boolean",
          "description": "Set Enabled to True to generate a CompletionReport when the task completes. If set to true, then you need to provide a report Scope, Path, and Format. Set Enabled to False if you do not want a CompletionReport generated when the task completes."
        },
        "Path": {
          "type": "string",
          "description": "Required if Enabled is set to true. Specifies the location of the report on the file system's linked S3 data repository. An absolute path that defines where the completion report will be stored in the destination location. The Path you provide must be located within the file system’s ExportPath. An example Path value is \"s3://amzn-s3-demo-bucket/myExportPath/optionalPrefix\". The report provides the following information for each file in the report: FilePath, FileStatus, and ErrorCode."
        },
        "Format": {
          "type": "string",
          "enum": [
            "REPORT_CSV_20191124"
          ],
          "description": "Required if Enabled is set to true. Specifies the format of the CompletionReport. REPORT_CSV_20191124 is the only format currently supported. When Format is set to REPORT_CSV_20191124, the CompletionReport is provided in CSV format, and is delivered to {path}/task-{id}/failures.csv."
        },
        "Scope": {
          "type": "string",
          "enum": [
            "FAILED_FILES_ONLY"
          ],
          "description": "Required if Enabled is set to true. Specifies the scope of the CompletionReport; FAILED_FILES_ONLY is the only scope currently supported. When Scope is set to FAILED_FILES_ONLY, the CompletionReport only contains information about files that the data repository task failed to process."
        }
      },
      "required": [
        "Enabled"
      ]
    },
    "DataRepositoryTask": {
      "type": "object",
      "properties": {
        "TaskId": {
          "type": "string",
          "description": "The system-generated, unique 17-digit ID of the data repository task."
        },
        "Lifecycle": {
          "type": "string",
          "enum": [
            "PENDING",
            "EXECUTING",
            "FAILED",
            "SUCCEEDED",
            "CANCELED",
            "CANCELING"
          ],
          "description": "The lifecycle status of the data repository task, as follows: PENDING - The task has not started. EXECUTING - The task is in process. FAILED - The task was not able to be completed. For example, there may be files the task failed to process. The DataRepositoryTaskFailureDetails property provides more information about task failures. SUCCEEDED - The task has completed successfully. CANCELED - The task was canceled and it did not complete. CANCELING - The task is in process of being canceled. You cannot delete an FSx for Lustre file system if there are data repository tasks for the file system i"
        },
        "Type": {
          "type": "string",
          "enum": [
            "EXPORT_TO_REPOSITORY",
            "IMPORT_METADATA_FROM_REPOSITORY",
            "RELEASE_DATA_FROM_FILESYSTEM",
            "AUTO_RELEASE_DATA"
          ],
          "description": "The type of data repository task. EXPORT_TO_REPOSITORY tasks export from your Amazon FSx for Lustre file system to a linked data repository. IMPORT_METADATA_FROM_REPOSITORY tasks import metadata changes from a linked S3 bucket to your Amazon FSx for Lustre file system. RELEASE_DATA_FROM_FILESYSTEM tasks release files in your Amazon FSx for Lustre file system that have been exported to a linked S3 bucket and that meet your specified release criteria. AUTO_RELEASE_DATA tasks automatically release files from an Amazon File Cache resource."
        },
        "CreationTime": {
          "type": "string",
          "format": "date-time"
        },
        "StartTime": {
          "type": "string",
          "format": "date-time",
          "description": "The time the system began processing the task."
        },
        "EndTime": {
          "type": "string",
          "format": "date-time",
          "description": "The time the system completed processing the task, populated after the task is complete."
        },
        "ResourceARN": {
          "type": "string"
        },
        "Tags": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Tag"
          }
        },
        "FileSystemId": {
          "type": "string",
          "description": "The globally unique ID of the file system."
        },
        "Paths": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "An array of paths that specify the data for the data repository task to process. For example, in an EXPORT_TO_REPOSITORY task, the paths specify which data to export to the linked data repository. (Default) If Paths is not specified, Amazon FSx uses the file system root directory."
        },
        "FailureDetails": {
          "$ref": "#/$defs/DataRepositoryTaskFailureDetails"
        },
        "Status": {
          "$ref": "#/$defs/DataRepositoryTaskStatus"
        },
        "Report": {
          "$ref": "#/$defs/CompletionReport"
        },
        "CapacityToRelease": {
          "type": "integer",
          "description": "Specifies the amount of data to release, in GiB, by an Amazon File Cache AUTO_RELEASE_DATA task that automatically releases files from the cache."
        },
        "FileCacheId": {
          "type": "string",
          "description": "The system-generated, unique ID of the cache."
        },
        "ReleaseConfiguration": {
          "$ref": "#/$defs/ReleaseConfiguration"
        }
      },
      "required": [
        "TaskId",
        "Lifecycle",
        "Type",
        "CreationTime"
      ]
    },
    "DataRepositoryTaskFailureDetails": {
      "type": "object",
      "properties": {
        "Message": {
          "type": "string"
        }
      }
    },
    "DataRepositoryTaskStatus": {
      "type": "object",
      "properties": {
        "TotalCount": {
          "type": "integer",
          "description": "The total number of files that the task will process. While a task is executing, the sum of SucceededCount plus FailedCount may not equal TotalCount. When the task is complete, TotalCount equals the sum of SucceededCount plus FailedCount."
        },
        "SucceededCount": {
          "type": "integer",
          "description": "A running total of the number of files that the task has successfully processed."
        },
        "FailedCount": {
          "type": "integer",
          "description": "A running total of the number of files that the task failed to process."
        },
        "LastUpdatedTime": {
          "type": "string",
          "format": "date-time",
          "description": "The time at which the task status was last updated."
        },
        "ReleasedCapacity": {
          "type": "integer",
          "description": "The total amount of data, in GiB, released by an Amazon File Cache AUTO_RELEASE_DATA task that automatically releases files from the cache."
        }
      }
    },
    "DurationSinceLastAccess": {
      "type": "object",
      "properties": {
        "Unit": {
          "type": "string",
          "enum": [
            "DAYS"
          ],
          "description": "The unit of time used by the Value parameter to determine if a file can be released, based on when it was last accessed. DAYS is the only supported value. This is a required parameter."
        },
        "Value": {
          "type": "integer",
          "description": "An integer that represents the minimum amount of time (in days) since a file was last accessed in the file system. Only exported files with a MAX(atime, ctime, mtime) timestamp that is more than this amount of time in the past (relative to the task create time) will be released. The default of Value is 0. This is a required parameter. If an exported file meets the last accessed time criteria, its file or directory path must also be specified in the Paths parameter of the operation in order for the file to be released."
        }
      }
    },
    "ReleaseConfiguration": {
      "type": "object",
      "properties": {
        "DurationSinceLastAccess": {
          "$ref": "#/$defs/DurationSinceLastAccess"
        }
      }
    },
    "Tag": {
      "type": "object",
      "properties": {
        "Key": {
          "type": "string",
          "description": "A value that specifies the TagKey, the name of the tag. Tag keys must be unique for the resource to which they are attached."
        },
        "Value": {
          "type": "string",
          "description": "A value that specifies the TagValue, the value assigned to the corresponding tag key. Tag values can be null and don't have to be unique in a tag set. For example, you can have a key-value pair in a tag set of finances : April and also of payroll : April."
        }
      },
      "required": [
        "Key",
        "Value"
      ]
    }
  }
}