{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-fsx/json-schema/amazon-fsx-create-file-cache-request-schema.json",
  "title": "CreateFileCacheRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-fsx-file-cache-api-openapi.yml#/components/schemas/CreateFileCacheRequest",
  "type": "object",
  "properties": {
    "ClientRequestToken": {
      "type": "string",
      "description": "An idempotency token for resource creation, in a string of up to 63 ASCII characters. This token is automatically filled on your behalf when you use the Command Line Interface (CLI) or an Amazon Web Services SDK. By using the idempotent operation, you can retry a CreateFileCache operation without the risk of creating an extra cache. This approach can be useful when an initial call fails in a way that makes it unclear whether a cache was created. Examples are if a transport level timeout occurred, or your connection was reset. If you use the same client request token and the initial call create"
    },
    "FileCacheType": {
      "type": "string",
      "enum": [
        "LUSTRE"
      ],
      "description": "The type of cache that you're creating, which must be LUSTRE."
    },
    "FileCacheTypeVersion": {
      "type": "string",
      "description": "Sets the Lustre version for the cache that you're creating, which must be 2.12."
    },
    "StorageCapacity": {
      "type": "integer",
      "description": "The storage capacity of the cache in gibibytes (GiB). Valid values are 1200 GiB, 2400 GiB, and increments of 2400 GiB."
    },
    "SubnetIds": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "SecurityGroupIds": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "A list of IDs specifying the security groups to apply to all network interfaces created for Amazon File Cache access. This list isn't returned in later requests to describe the cache."
    },
    "Tags": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Tag"
      }
    },
    "CopyTagsToDataRepositoryAssociations": {
      "type": "boolean",
      "description": "A boolean flag indicating whether tags for the cache should be copied to data repository associations. This value defaults to false."
    },
    "KmsKeyId": {
      "type": "string",
      "description": "Specifies the ID of the Key Management Service (KMS) key to use for encrypting data on an Amazon File Cache. If a KmsKeyId isn't specified, the Amazon FSx-managed KMS key for your account is used. For more information, see Encrypt in the Key Management Service API Reference."
    },
    "LustreConfiguration": {
      "$ref": "#/$defs/CreateFileCacheLustreConfiguration"
    },
    "DataRepositoryAssociations": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/FileCacheDataRepositoryAssociation"
      },
      "description": "A list of up to 8 configurations for data repository associations (DRAs) to be created during the cache creation. The DRAs link the cache to either an Amazon S3 data repository or a Network File System (NFS) data repository that supports the NFSv3 protocol. The DRA configurations must meet the following requirements: All configurations on the list must be of the same data repository type, either all S3 or all NFS. A cache can't link to different data repository types at the same time. An NFS DRA must link to an NFS file system that supports the NFSv3 protocol. DRA automatic import and automati"
    }
  },
  "required": [
    "FileCacheType",
    "FileCacheTypeVersion",
    "StorageCapacity",
    "SubnetIds"
  ],
  "$defs": {
    "CreateFileCacheLustreConfiguration": {
      "type": "object",
      "properties": {
        "PerUnitStorageThroughput": {
          "type": "integer",
          "description": "Provisions the amount of read and write throughput for each 1 tebibyte (TiB) of cache storage capacity, in MB/s/TiB. The only supported value is 1000."
        },
        "DeploymentType": {
          "type": "string",
          "enum": [
            "CACHE_1"
          ],
          "description": "Specifies the cache deployment type, which must be CACHE_1."
        },
        "WeeklyMaintenanceStartTime": {
          "type": "string"
        },
        "MetadataConfiguration": {
          "$ref": "#/$defs/FileCacheLustreMetadataConfiguration"
        }
      },
      "required": [
        "PerUnitStorageThroughput",
        "DeploymentType",
        "MetadataConfiguration"
      ]
    },
    "FileCacheDataRepositoryAssociation": {
      "type": "object",
      "properties": {
        "FileCachePath": {
          "type": "string",
          "description": "A path on the cache 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 cache paths. For example, if a data repository is associated with cache path /ns1/, then you cannot link another data repository with cache path /ns1/ns2. This path specifies where in your cache files will be exported from. This cache directory can be linked to only one data repository, and no data repository other can be linked"
        },
        "DataRepositoryPath": {
          "type": "string",
          "description": "The path to the S3 or NFS data repository that links to the cache. You must provide one of the following paths: The path can be an NFS data repository that links to the cache. The path can be in one of two formats: If you are not using the DataRepositorySubdirectories parameter, the path is to an NFS Export directory (or one of its subdirectories) in the format nfs://nfs-domain-name/exportpath. You can therefore link a single NFS Export to a single data repository association. If you are using the DataRepositorySubdirectories parameter, the path is the domain name of the NFS file system in the"
        },
        "DataRepositorySubdirectories": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "A list of NFS Exports that will be linked with this data repository association. The Export paths are in the format /exportpath1. To use this parameter, you must configure DataRepositoryPath as the domain name of the NFS file system. The NFS file system domain name in effect is the root of the subdirectories. Note that DataRepositorySubdirectories is not supported for S3 data repositories."
        },
        "NFS": {
          "$ref": "#/$defs/FileCacheNFSConfiguration"
        }
      },
      "required": [
        "FileCachePath",
        "DataRepositoryPath"
      ]
    },
    "FileCacheLustreMetadataConfiguration": {
      "type": "object",
      "properties": {
        "StorageCapacity": {
          "type": "integer",
          "description": "The storage capacity of the Lustre MDT (Metadata Target) storage volume in gibibytes (GiB). The only supported value is 2400 GiB."
        }
      },
      "required": [
        "StorageCapacity"
      ]
    },
    "FileCacheNFSConfiguration": {
      "type": "object",
      "properties": {
        "Version": {
          "type": "string",
          "enum": [
            "NFS3"
          ],
          "description": "The version of the NFS (Network File System) protocol of the NFS data repository. The only supported value is NFS3, which indicates that the data repository must support the NFSv3 protocol."
        },
        "DnsIps": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "A list of up to 2 IP addresses of DNS servers used to resolve the NFS file system domain name. The provided IP addresses can either be the IP addresses of a DNS forwarder or resolver that the customer manages and runs inside the customer VPC, or the IP addresses of the on-premises DNS servers."
        }
      },
      "required": [
        "Version"
      ]
    },
    "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"
      ]
    }
  }
}