{
 "additionalProperties": false,
 "createOnlyProperties": [
  "/properties/TableBucketARN",
  "/properties/OpenTableFormat",
  "/properties/IcebergMetadata",
  "/properties/WithoutMetadata",
  "/properties/StorageClassConfiguration"
 ],
 "definitions": {
  "Compaction": {
   "additionalProperties": false,
   "properties": {
    "Status": {
     "enum": [
      "enabled",
      "disabled"
     ],
     "type": "string"
    },
    "TargetFileSizeMB": {
     "minimum": 64,
     "type": "integer"
    }
   },
   "type": "object"
  },
  "IcebergMetadata": {
   "additionalProperties": false,
   "properties": {
    "IcebergPartitionSpec": {
     "$ref": "#/definitions/IcebergPartitionSpec"
    },
    "IcebergSchema": {
     "$ref": "#/definitions/IcebergSchema"
    },
    "IcebergSchemaV2": {
     "$ref": "#/definitions/IcebergSchemaV2"
    },
    "IcebergSortOrder": {
     "$ref": "#/definitions/IcebergSortOrder"
    },
    "TableProperties": {
     "$ref": "#/definitions/TableProperties"
    }
   },
   "type": "object"
  },
  "IcebergPartitionField": {
   "additionalProperties": false,
   "properties": {
    "FieldId": {
     "type": "integer"
    },
    "Name": {
     "type": "string"
    },
    "SourceId": {
     "type": "integer"
    },
    "Transform": {
     "type": "string"
    }
   },
   "required": [
    "SourceId",
    "Transform",
    "Name"
   ],
   "type": "object"
  },
  "IcebergPartitionFieldList": {
   "insertionOrder": false,
   "items": {
    "$ref": "#/definitions/IcebergPartitionField"
   },
   "type": "array"
  },
  "IcebergPartitionSpec": {
   "additionalProperties": false,
   "properties": {
    "Fields": {
     "$ref": "#/definitions/IcebergPartitionFieldList"
    },
    "SpecId": {
     "type": "integer"
    }
   },
   "required": [
    "Fields"
   ],
   "type": "object"
  },
  "IcebergSchema": {
   "additionalProperties": false,
   "properties": {
    "SchemaFieldList": {
     "$ref": "#/definitions/SchemaFieldList"
    }
   },
   "required": [
    "SchemaFieldList"
   ],
   "type": "object"
  },
  "IcebergSchemaV2": {
   "additionalProperties": false,
   "properties": {
    "IdentifierFieldIds": {
     "insertionOrder": false,
     "items": {
      "type": "integer"
     },
     "type": "array"
    },
    "SchemaId": {
     "type": "integer"
    },
    "SchemaV2FieldList": {
     "$ref": "#/definitions/SchemaV2FieldList"
    },
    "SchemaV2FieldType": {
     "enum": [
      "struct"
     ],
     "type": "string"
    }
   },
   "required": [
    "SchemaV2FieldList",
    "SchemaV2FieldType"
   ],
   "type": "object"
  },
  "IcebergSortField": {
   "additionalProperties": false,
   "properties": {
    "Direction": {
     "enum": [
      "asc",
      "desc"
     ],
     "type": "string"
    },
    "NullOrder": {
     "enum": [
      "nulls-first",
      "nulls-last"
     ],
     "type": "string"
    },
    "SourceId": {
     "type": "integer"
    },
    "Transform": {
     "type": "string"
    }
   },
   "required": [
    "SourceId",
    "Transform",
    "Direction",
    "NullOrder"
   ],
   "type": "object"
  },
  "IcebergSortFieldList": {
   "insertionOrder": false,
   "items": {
    "$ref": "#/definitions/IcebergSortField"
   },
   "type": "array"
  },
  "IcebergSortOrder": {
   "additionalProperties": false,
   "properties": {
    "Fields": {
     "$ref": "#/definitions/IcebergSortFieldList"
    },
    "OrderId": {
     "type": "integer"
    }
   },
   "required": [
    "Fields"
   ],
   "type": "object"
  },
  "Namespace": {
   "maxLength": 255,
   "minLength": 1,
   "pattern": "^[0-9a-z_]*$",
   "type": "string"
  },
  "OpenTableFormat": {
   "enum": [
    "ICEBERG"
   ],
   "type": "string"
  },
  "SchemaField": {
   "additionalProperties": false,
   "properties": {
    "Id": {
     "type": "integer"
    },
    "Name": {
     "type": "string"
    },
    "Required": {
     "type": "boolean"
    },
    "Type": {
     "type": "string"
    }
   },
   "required": [
    "Name",
    "Type"
   ],
   "type": "object"
  },
  "SchemaFieldList": {
   "insertionOrder": false,
   "items": {
    "$ref": "#/definitions/SchemaField"
   },
   "type": "array"
  },
  "SchemaV2Field": {
   "additionalProperties": false,
   "properties": {
    "Doc": {
     "type": "string"
    },
    "Id": {
     "type": "integer"
    },
    "Name": {
     "type": "string"
    },
    "Required": {
     "type": "boolean"
    },
    "Type": {
     "oneOf": [
      {
       "type": "string"
      },
      {
       "type": "object"
      }
     ]
    }
   },
   "required": [
    "Id",
    "Name",
    "Type",
    "Required"
   ],
   "type": "object"
  },
  "SchemaV2FieldList": {
   "insertionOrder": false,
   "items": {
    "$ref": "#/definitions/SchemaV2Field"
   },
   "type": "array"
  },
  "SnapshotManagement": {
   "additionalProperties": false,
   "properties": {
    "MaxSnapshotAgeHours": {
     "minimum": 1,
     "type": "integer"
    },
    "MinSnapshotsToKeep": {
     "minimum": 1,
     "type": "integer"
    },
    "Status": {
     "enum": [
      "enabled",
      "disabled"
     ],
     "type": "string"
    }
   },
   "type": "object"
  },
  "StorageClassConfiguration": {
   "additionalProperties": false,
   "properties": {
    "StorageClass": {
     "enum": [
      "STANDARD",
      "INTELLIGENT_TIERING"
     ],
     "type": "string"
    }
   },
   "type": "object"
  },
  "TableARN": {
   "examples": [
    "arn:aws:s3tables:us-west-2:123456789012:bucket/mytablebucket/table/813aadd1-a378-4d0f-8467-e3247306f309"
   ],
   "type": "string"
  },
  "TableBucketARN": {
   "examples": [
    "arn:aws:s3tables:us-west-2:123456789012:bucket/mytablebucket"
   ],
   "pattern": "^(arn:aws[-a-z0-9]*:[a-z0-9]+:[-a-z0-9]*:[0-9]{12}:bucket/[a-z0-9_-]{3,63})$",
   "type": "string"
  },
  "TableName": {
   "type": "string"
  },
  "TableProperties": {
   "additionalProperties": false,
   "patternProperties": {
    "^.+$": {
     "type": "string"
    }
   },
   "type": "object"
  },
  "Tag": {
   "additionalProperties": false,
   "properties": {
    "Key": {
     "maxLength": 128,
     "minLength": 1,
     "type": "string"
    },
    "Value": {
     "maxLength": 256,
     "type": "string"
    }
   },
   "required": [
    "Key",
    "Value"
   ],
   "type": "object"
  },
  "VersionToken": {
   "type": "string"
  },
  "WarehouseLocation": {
   "type": "string"
  },
  "WithoutMetadata": {
   "enum": [
    "Yes"
   ],
   "type": "string"
  }
 },
 "primaryIdentifier": [
  "/properties/TableARN"
 ],
 "properties": {
  "Compaction": {
   "$ref": "#/definitions/Compaction"
  },
  "IcebergMetadata": {
   "$ref": "#/definitions/IcebergMetadata"
  },
  "Namespace": {
   "$ref": "#/definitions/Namespace"
  },
  "OpenTableFormat": {
   "$ref": "#/definitions/OpenTableFormat"
  },
  "SnapshotManagement": {
   "$ref": "#/definitions/SnapshotManagement"
  },
  "StorageClassConfiguration": {
   "$ref": "#/definitions/StorageClassConfiguration"
  },
  "TableARN": {
   "$ref": "#/definitions/TableARN"
  },
  "TableBucketARN": {
   "$ref": "#/definitions/TableBucketARN"
  },
  "TableName": {
   "$ref": "#/definitions/TableName"
  },
  "Tags": {
   "insertionOrder": false,
   "items": {
    "$ref": "#/definitions/Tag"
   },
   "type": "array",
   "uniqueItems": true
  },
  "VersionToken": {
   "$ref": "#/definitions/VersionToken"
  },
  "WarehouseLocation": {
   "$ref": "#/definitions/WarehouseLocation"
  },
  "WithoutMetadata": {
   "$ref": "#/definitions/WithoutMetadata"
  }
 },
 "readOnlyProperties": [
  "/properties/TableARN",
  "/properties/WarehouseLocation",
  "/properties/VersionToken"
 ],
 "required": [
  "TableBucketARN",
  "Namespace",
  "TableName",
  "OpenTableFormat"
 ],
 "tagging": {
  "cloudFormationSystemTags": true,
  "tagOnCreate": true,
  "tagProperty": "/properties/Tags",
  "tagUpdatable": true,
  "taggable": true
 },
 "typeName": "AWS::S3Tables::Table",
 "writeOnlyProperties": [
  "/properties/IcebergMetadata",
  "/properties/WithoutMetadata"
 ]
}
