{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-s3/json-schema/amazon-s3-create-bucket-metadata-configuration-request-schema.json",
  "title": "CreateBucketMetadataConfigurationRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-s3-metadataconfiguration-api-openapi.yml#/components/schemas/CreateBucketMetadataConfigurationRequest",
  "type": "object",
  "properties": {
    "Bucket": {
      "type": "string",
      "description": "The general purpose bucket that you want to create the metadata configuration for."
    },
    "ContentMD5": {
      "type": "string",
      "description": "The Content-MD5 header for the metadata configuration."
    },
    "ChecksumAlgorithm": {
      "type": "string",
      "enum": [
        "CRC32",
        "CRC32C",
        "SHA1",
        "SHA256",
        "CRC64NVME",
        "SHA512",
        "MD5",
        "XXHASH64",
        "XXHASH3",
        "XXHASH128"
      ],
      "description": "The checksum algorithm to use with your metadata configuration."
    },
    "MetadataConfiguration": {
      "$ref": "#/$defs/MetadataConfiguration"
    },
    "ExpectedBucketOwner": {
      "type": "string",
      "description": "The expected owner of the general purpose bucket that corresponds to your metadata configuration."
    }
  },
  "required": [
    "Bucket",
    "MetadataConfiguration"
  ],
  "$defs": {
    "AnnotationTableConfiguration": {
      "type": "object",
      "properties": {
        "ConfigurationState": {
          "type": "string",
          "enum": [
            "ENABLED",
            "DISABLED"
          ],
          "description": "The state of the annotation table. Valid values are ENABLED and DISABLED."
        },
        "EncryptionConfiguration": {
          "$ref": "#/$defs/MetadataTableEncryptionConfiguration"
        },
        "Role": {
          "type": "string",
          "description": "The ARN of the IAM role used to manage the annotation table."
        }
      },
      "required": [
        "ConfigurationState"
      ]
    },
    "InventoryTableConfiguration": {
      "type": "object",
      "properties": {
        "ConfigurationState": {
          "type": "string",
          "enum": [
            "ENABLED",
            "DISABLED"
          ],
          "description": "The configuration state of the inventory table, indicating whether the inventory table is enabled or disabled."
        },
        "EncryptionConfiguration": {
          "$ref": "#/$defs/MetadataTableEncryptionConfiguration"
        }
      },
      "required": [
        "ConfigurationState"
      ]
    },
    "JournalTableConfiguration": {
      "type": "object",
      "properties": {
        "RecordExpiration": {
          "$ref": "#/$defs/RecordExpiration"
        },
        "EncryptionConfiguration": {
          "$ref": "#/$defs/MetadataTableEncryptionConfiguration"
        }
      },
      "required": [
        "RecordExpiration"
      ]
    },
    "MetadataConfiguration": {
      "type": "object",
      "properties": {
        "JournalTableConfiguration": {
          "$ref": "#/$defs/JournalTableConfiguration"
        },
        "InventoryTableConfiguration": {
          "$ref": "#/$defs/InventoryTableConfiguration"
        },
        "AnnotationTableConfiguration": {
          "$ref": "#/$defs/AnnotationTableConfiguration"
        }
      },
      "required": [
        "JournalTableConfiguration"
      ]
    },
    "MetadataTableEncryptionConfiguration": {
      "type": "object",
      "properties": {
        "SseAlgorithm": {
          "type": "string",
          "enum": [
            "aws:kms",
            "AES256"
          ],
          "description": "The encryption type specified for a metadata table. To specify server-side encryption with Key Management Service (KMS) keys (SSE-KMS), use the aws:kms value. To specify server-side encryption with Amazon S3 managed keys (SSE-S3), use the AES256 value."
        },
        "KmsKeyArn": {
          "type": "string",
          "description": "If server-side encryption with Key Management Service (KMS) keys (SSE-KMS) is specified, you must also specify the KMS key Amazon Resource Name (ARN). You must specify a customer-managed KMS key that's located in the same Region as the general purpose bucket that corresponds to the metadata table configuration."
        }
      },
      "required": [
        "SseAlgorithm"
      ]
    },
    "RecordExpiration": {
      "type": "object",
      "properties": {
        "Expiration": {
          "type": "string",
          "enum": [
            "ENABLED",
            "DISABLED"
          ],
          "description": "Specifies whether journal table record expiration is enabled or disabled."
        },
        "Days": {
          "type": "integer",
          "description": "If you enable journal table record expiration, you can set the number of days to retain your journal table records. Journal table records must be retained for a minimum of 7 days. To set this value, specify any whole number from 7 to 2147483647. For example, to retain your journal table records for one year, set this value to 365."
        }
      },
      "required": [
        "Expiration"
      ]
    }
  }
}