{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-fsx/json-schema/amazon-fsx-create-volume-request-schema.json",
  "title": "CreateVolumeRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-fsx-volume-api-openapi.yml#/components/schemas/CreateVolumeRequest",
  "type": "object",
  "properties": {
    "ClientRequestToken": {
      "type": "string"
    },
    "VolumeType": {
      "type": "string",
      "enum": [
        "ONTAP",
        "OPENZFS"
      ],
      "description": "Specifies the type of volume to create; ONTAP and OPENZFS are the only valid volume types."
    },
    "Name": {
      "type": "string",
      "description": "Specifies the name of the volume that you're creating."
    },
    "OntapConfiguration": {
      "$ref": "#/$defs/CreateOntapVolumeConfiguration"
    },
    "Tags": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Tag"
      }
    },
    "OpenZFSConfiguration": {
      "$ref": "#/$defs/CreateOpenZFSVolumeConfiguration"
    }
  },
  "required": [
    "VolumeType",
    "Name"
  ],
  "$defs": {
    "AutocommitPeriod": {
      "type": "object",
      "properties": {
        "Type": {
          "type": "string",
          "enum": [
            "MINUTES",
            "HOURS",
            "DAYS",
            "MONTHS",
            "YEARS",
            "NONE"
          ],
          "description": "Defines the type of time for the autocommit period of a file in an FSx for ONTAP SnapLock volume. Setting this value to NONE disables autocommit. The default value is NONE."
        },
        "Value": {
          "type": "integer",
          "description": "Defines the amount of time for the autocommit period of a file in an FSx for ONTAP SnapLock volume. The following ranges are valid: Minutes: 5 - 65,535 Hours: 1 - 65,535 Days: 1 - 3,650 Months: 1 - 120 Years: 1 - 10"
        }
      },
      "required": [
        "Type"
      ]
    },
    "CreateAggregateConfiguration": {
      "type": "object",
      "properties": {
        "Aggregates": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Used to specify the names of aggregates on which the volume will be created."
        },
        "ConstituentsPerAggregate": {
          "type": "integer",
          "description": "Used to explicitly set the number of constituents within the FlexGroup per storage aggregate. This field is optional when creating a FlexGroup volume. If unspecified, the default value will be 8. This field cannot be provided when creating a FlexVol volume."
        }
      }
    },
    "CreateOntapVolumeConfiguration": {
      "type": "object",
      "properties": {
        "JunctionPath": {
          "type": "string",
          "description": "Specifies the location in the SVM's namespace where the volume is mounted. This parameter is required. The JunctionPath must have a leading forward slash, such as /vol3."
        },
        "SecurityStyle": {
          "type": "string",
          "enum": [
            "UNIX",
            "NTFS",
            "MIXED"
          ],
          "description": "Specifies the security style for the volume. If a volume's security style is not specified, it is automatically set to the root volume's security style. The security style determines the type of permissions that FSx for ONTAP uses to control data access. Specify one of the following values: UNIX if the file system is managed by a UNIX administrator, the majority of users are NFS clients, and an application accessing the data uses a UNIX user as the service account. NTFS if the file system is managed by a Windows administrator, the majority of users are SMB clients, and an application accessing"
        },
        "SizeInMegabytes": {
          "type": "integer",
          "description": "Use SizeInBytes instead. Specifies the size of the volume, in megabytes (MB), that you are creating."
        },
        "StorageEfficiencyEnabled": {
          "type": "boolean",
          "description": "Set to true to enable deduplication, compression, and compaction storage efficiency features on the volume, or set to false to disable them. StorageEfficiencyEnabled is required when creating a RW volume (OntapVolumeType set to RW)."
        },
        "StorageVirtualMachineId": {
          "type": "string",
          "description": "Specifies the ONTAP SVM in which to create the volume."
        },
        "TieringPolicy": {
          "$ref": "#/$defs/TieringPolicy"
        },
        "OntapVolumeType": {
          "type": "string",
          "enum": [
            "RW",
            "DP"
          ],
          "description": "Specifies the type of volume you are creating. Valid values are the following: RW specifies a read/write volume. RW is the default. DP specifies a data-protection volume. A DP volume is read-only and can be used as the destination of a NetApp SnapMirror relationship. For more information, see Volume types in the Amazon FSx for NetApp ONTAP User Guide."
        },
        "SnapshotPolicy": {
          "type": "string",
          "description": "Specifies the snapshot policy for the volume. There are three built-in snapshot policies: default: This is the default policy. A maximum of six hourly snapshots taken five minutes past the hour. A maximum of two daily snapshots taken Monday through Saturday at 10 minutes after midnight. A maximum of two weekly snapshots taken every Sunday at 15 minutes after midnight. default-1weekly: This policy is the same as the default policy except that it only retains one snapshot from the weekly schedule. none: This policy does not take any snapshots. This policy can be assigned to volumes to prevent au"
        },
        "CopyTagsToBackups": {
          "type": "boolean",
          "description": "A boolean flag indicating whether tags for the volume should be copied to backups. This value defaults to false. If it's set to true, all tags for the volume are copied to all automatic and user-initiated backups where the user doesn't specify tags. If this value is true, and you specify one or more tags, only the specified tags are copied to backups. If you specify one or more tags when creating a user-initiated backup, no tags are copied from the volume, regardless of this value."
        },
        "SnaplockConfiguration": {
          "$ref": "#/$defs/CreateSnaplockConfiguration"
        },
        "VolumeStyle": {
          "type": "string",
          "enum": [
            "FLEXVOL",
            "FLEXGROUP"
          ],
          "description": "Use to specify the style of an ONTAP volume. FSx for ONTAP offers two styles of volumes that you can use for different purposes, FlexVol and FlexGroup volumes. For more information, see Volume styles in the Amazon FSx for NetApp ONTAP User Guide."
        },
        "AggregateConfiguration": {
          "$ref": "#/$defs/CreateAggregateConfiguration"
        },
        "SizeInBytes": {
          "type": "integer",
          "description": "Specifies the configured size of the volume, in bytes."
        }
      },
      "required": [
        "StorageVirtualMachineId"
      ]
    },
    "CreateOpenZFSOriginSnapshotConfiguration": {
      "type": "object",
      "properties": {
        "SnapshotARN": {
          "type": "string"
        },
        "CopyStrategy": {
          "type": "string",
          "enum": [
            "CLONE",
            "FULL_COPY",
            "INCREMENTAL_COPY"
          ],
          "description": "Specifies the strategy used when copying data from the snapshot to the new volume. CLONE - The new volume references the data in the origin snapshot. Cloning a snapshot is faster than copying data from the snapshot to a new volume and doesn't consume disk throughput. However, the origin snapshot can't be deleted if there is a volume using its copied data. FULL_COPY - Copies all data from the snapshot to the new volume. Specify this option to create the volume from a snapshot on another FSx for OpenZFS file system. The INCREMENTAL_COPY option is only for updating an existing volume by using a s"
        }
      },
      "required": [
        "SnapshotARN",
        "CopyStrategy"
      ]
    },
    "CreateOpenZFSVolumeConfiguration": {
      "type": "object",
      "properties": {
        "ParentVolumeId": {
          "type": "string",
          "description": "The ID of the volume to use as the parent volume of the volume that you are creating."
        },
        "StorageCapacityReservationGiB": {
          "type": "integer",
          "description": "Specifies the amount of storage in gibibytes (GiB) to reserve from the parent volume. Setting StorageCapacityReservationGiB guarantees that the specified amount of storage space on the parent volume will always be available for the volume. You can't reserve more storage than the parent volume has. To not specify a storage capacity reservation, set this to 0 or -1. For more information, see Volume properties in the Amazon FSx for OpenZFS User Guide."
        },
        "StorageCapacityQuotaGiB": {
          "type": "integer",
          "description": "Sets the maximum storage size in gibibytes (GiB) for the volume. You can specify a quota that is larger than the storage on the parent volume. A volume quota limits the amount of storage that the volume can consume to the configured amount, but does not guarantee the space will be available on the parent volume. To guarantee quota space, you must also set StorageCapacityReservationGiB. To not specify a storage capacity quota, set this to -1. For more information, see Volume properties in the Amazon FSx for OpenZFS User Guide."
        },
        "RecordSizeKiB": {
          "type": "integer",
          "description": "Specifies the suggested block size for a volume in a ZFS dataset, in kibibytes (KiB). For file systems using the Intelligent-Tiering storage class, valid values are 128, 256, 512, 1024, 2048, or 4096 KiB, with a default of 1024 KiB. For all other file systems, valid values are 4, 8, 16, 32, 64, 128, 256, 512, or 1024 KiB, with a default of 128 KiB. We recommend using the default setting for the majority of use cases. Generally, workloads that write in fixed small or large record sizes may benefit from setting a custom record size, like database workloads (small record size) or media streaming "
        },
        "DataCompressionType": {
          "type": "string",
          "enum": [
            "NONE",
            "ZSTD",
            "LZ4"
          ],
          "description": "Specifies the method used to compress the data on the volume. The compression type is NONE by default. NONE - Doesn't compress the data on the volume. NONE is the default. ZSTD - Compresses the data in the volume using the Zstandard (ZSTD) compression algorithm. ZSTD compression provides a higher level of data compression and higher read throughput performance than LZ4 compression. LZ4 - Compresses the data in the volume using the LZ4 compression algorithm. LZ4 compression provides a lower level of compression and higher write throughput performance than ZSTD compression. For more information "
        },
        "CopyTagsToSnapshots": {
          "type": "boolean",
          "description": "A Boolean value indicating whether tags for the volume should be copied to snapshots. This value defaults to false. If this value is set to true, and you do not specify any tags, all tags for the original volume are copied over to snapshots. If this value is set to true, and you do specify one or more tags, only the specified tags for the original volume are copied over to snapshots. If you specify one or more tags when creating a new snapshot, no tags are copied over from the original volume, regardless of this value."
        },
        "OriginSnapshot": {
          "$ref": "#/$defs/CreateOpenZFSOriginSnapshotConfiguration"
        },
        "ReadOnly": {
          "type": "boolean",
          "description": "A Boolean value indicating whether the volume is read-only."
        },
        "NfsExports": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/OpenZFSNfsExport"
          },
          "description": "The configuration object for mounting a Network File System (NFS) file system."
        },
        "UserAndGroupQuotas": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/OpenZFSUserOrGroupQuota"
          },
          "description": "Configures how much storage users and groups can use on the volume."
        }
      },
      "required": [
        "ParentVolumeId"
      ]
    },
    "CreateSnaplockConfiguration": {
      "type": "object",
      "properties": {
        "AuditLogVolume": {
          "type": "boolean",
          "description": "Enables or disables the audit log volume for an FSx for ONTAP SnapLock volume. The default value is false. If you set AuditLogVolume to true, the SnapLock volume is created as an audit log volume. The minimum retention period for an audit log volume is six months. For more information, see SnapLock audit log volumes."
        },
        "AutocommitPeriod": {
          "$ref": "#/$defs/AutocommitPeriod"
        },
        "PrivilegedDelete": {
          "type": "string",
          "enum": [
            "DISABLED",
            "ENABLED",
            "PERMANENTLY_DISABLED"
          ],
          "description": "Enables, disables, or permanently disables privileged delete on an FSx for ONTAP SnapLock Enterprise volume. Enabling privileged delete allows SnapLock administrators to delete WORM files even if they have active retention periods. PERMANENTLY_DISABLED is a terminal state. If privileged delete is permanently disabled on a SnapLock volume, you can't re-enable it. The default value is DISABLED. For more information, see Privileged delete."
        },
        "RetentionPeriod": {
          "$ref": "#/$defs/SnaplockRetentionPeriod"
        },
        "SnaplockType": {
          "type": "string",
          "enum": [
            "COMPLIANCE",
            "ENTERPRISE"
          ],
          "description": "Specifies the retention mode of an FSx for ONTAP SnapLock volume. After it is set, it can't be changed. You can choose one of the following retention modes: COMPLIANCE: Files transitioned to write once, read many (WORM) on a Compliance volume can't be deleted until their retention periods expire. This retention mode is used to address government or industry-specific mandates or to protect against ransomware attacks. For more information, see SnapLock Compliance. ENTERPRISE: Files transitioned to WORM on an Enterprise volume can be deleted by authorized users before their retention periods expi"
        },
        "VolumeAppendModeEnabled": {
          "type": "boolean",
          "description": "Enables or disables volume-append mode on an FSx for ONTAP SnapLock volume. Volume-append mode allows you to create WORM-appendable files and write data to them incrementally. The default value is false. For more information, see Volume-append mode."
        }
      },
      "required": [
        "SnaplockType"
      ]
    },
    "OpenZFSClientConfiguration": {
      "type": "object",
      "properties": {
        "Clients": {
          "type": "string",
          "description": "A value that specifies who can mount the file system. You can provide a wildcard character (*), an IP address (0.0.0.0), or a CIDR address (192.0.2.0/24). By default, Amazon FSx uses the wildcard character when specifying the client."
        },
        "Options": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The options to use when mounting the file system. For a list of options that you can use with Network File System (NFS), see the exports(5) - Linux man page. When choosing your options, consider the following: crossmnt is used by default. If you don't specify crossmnt when changing the client configuration, you won't be able to see or access snapshots in your file system's snapshot directory. sync is used by default. If you instead specify async, the system acknowledges writes before writing to disk. If the system crashes before the writes are finished, you lose the unwritten data."
        }
      },
      "required": [
        "Clients",
        "Options"
      ]
    },
    "OpenZFSNfsExport": {
      "type": "object",
      "properties": {
        "ClientConfigurations": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/OpenZFSClientConfiguration"
          },
          "description": "A list of configuration objects that contain the client and options for mounting the OpenZFS file system."
        }
      },
      "required": [
        "ClientConfigurations"
      ]
    },
    "OpenZFSUserOrGroupQuota": {
      "type": "object",
      "properties": {
        "Type": {
          "type": "string",
          "enum": [
            "USER",
            "GROUP"
          ],
          "description": "Specifies whether the quota applies to a user or group."
        },
        "Id": {
          "type": "integer",
          "description": "The ID of the user or group that the quota applies to."
        },
        "StorageCapacityQuotaGiB": {
          "type": "integer",
          "description": "The user or group's storage quota, in gibibytes (GiB)."
        }
      },
      "required": [
        "Type",
        "Id",
        "StorageCapacityQuotaGiB"
      ]
    },
    "RetentionPeriod": {
      "type": "object",
      "properties": {
        "Type": {
          "type": "string",
          "enum": [
            "SECONDS",
            "MINUTES",
            "HOURS",
            "DAYS",
            "MONTHS",
            "YEARS",
            "INFINITE",
            "UNSPECIFIED"
          ],
          "description": "Defines the type of time for the retention period of an FSx for ONTAP SnapLock volume. Set it to one of the valid types. If you set it to INFINITE, the files are retained forever. If you set it to UNSPECIFIED, the files are retained until you set an explicit retention period."
        },
        "Value": {
          "type": "integer",
          "description": "Defines the amount of time for the retention period of an FSx for ONTAP SnapLock volume. You can't set a value for INFINITE or UNSPECIFIED. For all other options, the following ranges are valid: Seconds: 0 - 65,535 Minutes: 0 - 65,535 Hours: 0 - 24 Days: 0 - 365 Months: 0 - 12 Years: 0 - 100"
        }
      },
      "required": [
        "Type"
      ]
    },
    "SnaplockRetentionPeriod": {
      "type": "object",
      "properties": {
        "DefaultRetention": {
          "$ref": "#/$defs/RetentionPeriod"
        },
        "MinimumRetention": {
          "$ref": "#/$defs/RetentionPeriod"
        },
        "MaximumRetention": {
          "$ref": "#/$defs/RetentionPeriod"
        }
      },
      "required": [
        "DefaultRetention",
        "MinimumRetention",
        "MaximumRetention"
      ]
    },
    "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"
      ]
    },
    "TieringPolicy": {
      "type": "object",
      "properties": {
        "CoolingPeriod": {
          "type": "integer",
          "description": "Specifies the number of days that user data in a volume must remain inactive before it is considered \"cold\" and moved to the capacity pool. Used with the AUTO and SNAPSHOT_ONLY tiering policies. Enter a whole number between 2 and 183. Default values are 31 days for AUTO and 2 days for SNAPSHOT_ONLY."
        },
        "Name": {
          "type": "string",
          "enum": [
            "SNAPSHOT_ONLY",
            "AUTO",
            "ALL",
            "NONE"
          ],
          "description": "Specifies the tiering policy used to transition data. Default value is SNAPSHOT_ONLY. SNAPSHOT_ONLY - moves cold snapshots to the capacity pool storage tier. AUTO - moves cold user data and snapshots to the capacity pool storage tier based on your access patterns. ALL - moves all user data blocks in both the active file system and Snapshot copies to the storage pool tier. NONE - keeps a volume's data in the primary storage tier, preventing it from being moved to the capacity pool tier."
        }
      }
    }
  }
}