{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-fsx/json-schema/amazon-fsx-create-data-repository-association-request-schema.json",
  "title": "CreateDataRepositoryAssociationRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-fsx-data-repository-association-api-openapi.yml#/components/schemas/CreateDataRepositoryAssociationRequest",
  "type": "object",
  "properties": {
    "FileSystemId": {
      "type": "string"
    },
    "FileSystemPath": {
      "type": "string",
      "description": "A path on the file system that points to a high-level directory (such as /ns1/) or subdirectory (such as /ns1/subdir/) that will be mapped 1-1 with DataRepositoryPath. The leading forward slash in the name is required. Two data repository associations cannot have overlapping file system paths. For example, if a data repository is associated with file system path /ns1/, then you cannot link another data repository with file system path /ns1/ns2. This path specifies where in your file system files will be exported from or imported to. This file system directory can be linked to only one Amazon S"
    },
    "DataRepositoryPath": {
      "type": "string",
      "description": "The path to the Amazon S3 data repository that will be linked to the file system. The path can be an S3 bucket or prefix in the format s3://bucket-name/prefix/ (where prefix is optional). This path specifies where in the S3 data repository files will be imported from or exported to."
    },
    "BatchImportMetaDataOnCreate": {
      "type": "boolean",
      "description": "Set to true to run an import data repository task to import metadata from the data repository to the file system after the data repository association is created. Default is false."
    },
    "ImportedFileChunkSize": {
      "type": "integer",
      "description": "For files imported from a data repository, this value determines the stripe count and maximum amount of data per file (in MiB) stored on a single physical disk. The maximum number of disks that a single file can be striped across is limited by the total number of disks that make up the file system. The default chunk size is 1,024 MiB (1 GiB) and can go as high as 512,000 MiB (500 GiB). Amazon S3 objects have a maximum size of 5 TB."
    },
    "S3": {
      "$ref": "#/$defs/S3DataRepositoryConfiguration"
    },
    "ClientRequestToken": {
      "type": "string"
    },
    "Tags": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Tag"
      }
    }
  },
  "required": [
    "FileSystemId",
    "DataRepositoryPath"
  ],
  "$defs": {
    "AutoExportPolicy": {
      "type": "object",
      "properties": {
        "Events": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "NEW",
              "CHANGED",
              "DELETED"
            ]
          },
          "description": "The AutoExportPolicy can have the following event values: NEW - New files and directories are automatically exported to the data repository as they are added to the file system. CHANGED - Changes to files and directories on the file system are automatically exported to the data repository. DELETED - Files and directories are automatically deleted on the data repository when they are deleted on the file system. You can define any combination of event types for your AutoExportPolicy."
        }
      }
    },
    "AutoImportPolicy": {
      "type": "object",
      "properties": {
        "Events": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "NEW",
              "CHANGED",
              "DELETED"
            ]
          },
          "description": "The AutoImportPolicy can have the following event values: NEW - Amazon FSx automatically imports metadata of files added to the linked S3 bucket that do not currently exist in the FSx file system. CHANGED - Amazon FSx automatically updates file metadata and invalidates existing file content on the file system as files change in the data repository. DELETED - Amazon FSx automatically deletes files on the file system as corresponding files are deleted in the data repository. You can define any combination of event types for your AutoImportPolicy."
        }
      }
    },
    "S3DataRepositoryConfiguration": {
      "type": "object",
      "properties": {
        "AutoImportPolicy": {
          "$ref": "#/$defs/AutoImportPolicy"
        },
        "AutoExportPolicy": {
          "$ref": "#/$defs/AutoExportPolicy"
        }
      }
    },
    "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"
      ]
    }
  }
}