{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-s3/json-schema/amazon-s3-put-table-maintenance-configuration-request-schema.json",
  "title": "PutTableMaintenanceConfigurationRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-s3-maintenance-api-openapi.yml#/components/schemas/PutTableMaintenanceConfigurationRequest",
  "type": "object",
  "properties": {
    "tableBucketARN": {
      "type": "string",
      "description": "The Amazon Resource Name (ARN) of the table associated with the maintenance configuration."
    },
    "namespace": {
      "type": "string",
      "description": "The namespace of the table."
    },
    "name": {
      "type": "string",
      "description": "The name of the table."
    },
    "type": {
      "type": "string",
      "enum": [
        "icebergCompaction",
        "icebergSnapshotManagement"
      ],
      "description": "The type of the maintenance configuration."
    },
    "value": {
      "$ref": "#/$defs/TableMaintenanceConfigurationValue"
    }
  },
  "required": [
    "tableBucketARN",
    "namespace",
    "name",
    "type",
    "value"
  ],
  "$defs": {
    "IcebergCompactionSettings": {
      "type": "object",
      "properties": {
        "targetFileSizeMB": {
          "type": "integer",
          "description": "The target file size for the table in MB."
        },
        "strategy": {
          "type": "string",
          "enum": [
            "auto",
            "binpack",
            "sort",
            "z-order"
          ],
          "description": "The compaction strategy to use for the table. This determines how files are selected and combined during compaction operations."
        }
      }
    },
    "IcebergSnapshotManagementSettings": {
      "type": "object",
      "properties": {
        "minSnapshotsToKeep": {
          "type": "integer",
          "description": "The minimum number of snapshots to keep."
        },
        "maxSnapshotAgeHours": {
          "type": "integer",
          "description": "The maximum age of a snapshot before it can be expired."
        }
      }
    },
    "TableMaintenanceConfigurationValue": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "enum": [
            "enabled",
            "disabled"
          ],
          "description": "The status of the maintenance configuration."
        },
        "settings": {
          "$ref": "#/$defs/TableMaintenanceSettings"
        }
      }
    },
    "TableMaintenanceSettings": {
      "type": "object",
      "properties": {
        "icebergCompaction": {
          "$ref": "#/$defs/IcebergCompactionSettings"
        },
        "icebergSnapshotManagement": {
          "$ref": "#/$defs/IcebergSnapshotManagementSettings"
        }
      },
      "description": "Exactly one member is set."
    }
  }
}