{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-fsx/json-schema/amazon-fsx-create-data-repository-task-request-schema.json",
  "title": "CreateDataRepositoryTaskRequest",
  "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/CreateDataRepositoryTaskRequest",
  "type": "object",
  "properties": {
    "Type": {
      "type": "string",
      "enum": [
        "EXPORT_TO_REPOSITORY",
        "IMPORT_METADATA_FROM_REPOSITORY",
        "RELEASE_DATA_FROM_FILESYSTEM",
        "AUTO_RELEASE_DATA"
      ],
      "description": "Specifies the type of data repository task to create. 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."
    },
    "Paths": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "A list of paths for the data repository task to use when the task is processed. If a path that you provide isn't valid, the task fails. If you don't provide paths, the default behavior is to export all files to S3 (for export tasks), import all files from S3 (for import tasks), or release all exported files that meet the last accessed time criteria (for release tasks). For export tasks, the list contains paths on the FSx for Lustre file system from which the files are exported to the Amazon S3 bucket. The default path is the file system root directory. The paths you provide need to be relative"
    },
    "FileSystemId": {
      "type": "string"
    },
    "Report": {
      "$ref": "#/$defs/CompletionReport"
    },
    "ClientRequestToken": {
      "type": "string"
    },
    "Tags": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Tag"
      }
    },
    "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."
    },
    "ReleaseConfiguration": {
      "$ref": "#/$defs/ReleaseConfiguration"
    }
  },
  "required": [
    "Type",
    "FileSystemId",
    "Report"
  ],
  "$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"
      ]
    },
    "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"
      ]
    }
  }
}