{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-timestream/json-schema/amazon-timestream-update-table-request-schema.json",
  "title": "UpdateTableRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-timestream-tables-api-openapi.yml#/components/schemas/UpdateTableRequest",
  "type": "object",
  "properties": {
    "DatabaseName": {
      "type": "string",
      "description": "The name of the Timestream database."
    },
    "TableName": {
      "type": "string",
      "description": "The name of the Timestream table."
    },
    "RetentionProperties": {
      "$ref": "#/$defs/RetentionProperties"
    },
    "MagneticStoreWriteProperties": {
      "$ref": "#/$defs/MagneticStoreWriteProperties"
    },
    "Schema": {
      "$ref": "#/$defs/Schema"
    }
  },
  "required": [
    "DatabaseName",
    "TableName"
  ],
  "$defs": {
    "IngestTimestreamS3Configuration": {
      "type": "object",
      "properties": {
        "BucketName": {
          "type": "string",
          "description": "The bucket name of the customer S3 bucket."
        },
        "ObjectKeyPrefix": {
          "type": "string",
          "description": "The object key preview for the customer S3 location."
        },
        "EncryptionOption": {
          "type": "string",
          "enum": [
            "SSE_S3",
            "SSE_KMS"
          ],
          "description": "The encryption option for the customer S3 location. Options are S3 server-side encryption with an S3 managed key or Amazon Web Services managed key."
        },
        "KmsKeyId": {
          "type": "string",
          "description": "The KMS key ID for the customer S3 location when encrypting with an Amazon Web Services managed key."
        }
      }
    },
    "MagneticStoreRejectedDataLocation": {
      "type": "object",
      "properties": {
        "S3Configuration": {
          "$ref": "#/$defs/IngestTimestreamS3Configuration"
        }
      }
    },
    "MagneticStoreWriteProperties": {
      "type": "object",
      "properties": {
        "EnableMagneticStoreWrites": {
          "type": "boolean",
          "description": "A flag to enable magnetic store writes."
        },
        "MagneticStoreRejectedDataLocation": {
          "$ref": "#/$defs/MagneticStoreRejectedDataLocation"
        }
      },
      "required": [
        "EnableMagneticStoreWrites"
      ]
    },
    "PartitionKey": {
      "type": "object",
      "properties": {
        "Type": {
          "type": "string",
          "enum": [
            "DIMENSION",
            "MEASURE"
          ],
          "description": "The type of the partition key. Options are DIMENSION (dimension key) and MEASURE (measure key)."
        },
        "Name": {
          "type": "string",
          "description": "The name of the attribute used for a dimension key."
        },
        "EnforcementInRecord": {
          "type": "string",
          "enum": [
            "REQUIRED",
            "OPTIONAL"
          ],
          "description": "The level of enforcement for the specification of a dimension key in ingested records. Options are REQUIRED (dimension key must be specified) and OPTIONAL (dimension key does not have to be specified)."
        }
      },
      "required": [
        "Type"
      ]
    },
    "RetentionProperties": {
      "type": "object",
      "properties": {
        "MemoryStoreRetentionPeriodInHours": {
          "type": "integer",
          "description": "The duration for which data must be stored in the memory store."
        },
        "MagneticStoreRetentionPeriodInDays": {
          "type": "integer",
          "description": "The duration for which data must be stored in the magnetic store."
        }
      },
      "required": [
        "MemoryStoreRetentionPeriodInHours",
        "MagneticStoreRetentionPeriodInDays"
      ]
    },
    "Schema": {
      "type": "object",
      "properties": {
        "CompositePartitionKey": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PartitionKey"
          },
          "description": "A non-empty list of partition keys defining the attributes used to partition the table data. The order of the list determines the partition hierarchy. The name and type of each partition key as well as the partition key order cannot be changed after the table is created. However, the enforcement level of each partition key can be changed."
        }
      }
    }
  }
}