{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-msk/json-schema/amazon-msk-create-channel-request-schema.json",
  "title": "CreateChannelRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-msk-channels-api-openapi.yml#/components/schemas/CreateChannelRequest",
  "type": "object",
  "properties": {
    "ChannelName": {
      "type": "string",
      "description": "The name of the channel. Must be unique within the cluster."
    },
    "ClusterArn": {
      "type": "string",
      "description": "The Amazon Resource Name (ARN) that uniquely identifies the cluster."
    },
    "EncryptionConfiguration": {
      "$ref": "#/$defs/EncryptionConfiguration"
    },
    "IcebergDestinationConfiguration": {
      "$ref": "#/$defs/IcebergDestinationConfiguration"
    },
    "S3DestinationConfiguration": {
      "$ref": "#/$defs/S3DestinationConfiguration"
    },
    "Tags": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "The tags attached to the channel."
    },
    "TopicConfigurationList": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/TopicConfiguration"
      },
      "description": "The list of topic configurations for the channel. Currently exactly one topic must be specified."
    },
    "LoggingInfo": {
      "$ref": "#/$defs/ChannelLoggingInfo"
    }
  },
  "required": [
    "ChannelName",
    "ClusterArn",
    "TopicConfigurationList"
  ],
  "$defs": {
    "Catalog": {
      "type": "object",
      "properties": {
        "CatalogArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the federated AWS Glue Data Catalog that projects the S3 Tables bucket. If omitted, MSK derives the catalog ARN from warehouseLocation."
        },
        "WarehouseLocation": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the S3 Tables bucket that backs the Apache Iceberg warehouse."
        }
      }
    },
    "ChannelLoggingInfo": {
      "type": "object",
      "properties": {
        "CloudWatchLogs": {
          "$ref": "#/$defs/CloudWatchLogs"
        },
        "Firehose": {
          "$ref": "#/$defs/Firehose"
        },
        "S3": {
          "$ref": "#/$defs/S3"
        }
      }
    },
    "CloudWatchLogs": {
      "type": "object",
      "properties": {
        "Enabled": {
          "type": "boolean"
        },
        "LogGroup": {
          "type": "string"
        }
      },
      "required": [
        "Enabled"
      ]
    },
    "DeadLetterQueueS3": {
      "type": "object",
      "properties": {
        "BucketArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the dead-letter Amazon S3 bucket."
        },
        "ErrorOutputPrefix": {
          "type": "string",
          "description": "An optional prefix prepended to every dead-letter Amazon S3 object key."
        },
        "ExpectedBucketOwner": {
          "type": "string",
          "description": "Optional 12-digit AWS account ID expected to own the dead-letter Amazon S3 bucket."
        }
      },
      "required": [
        "BucketArn"
      ]
    },
    "DestinationTable": {
      "type": "object",
      "properties": {
        "DestinationDatabaseName": {
          "type": "string",
          "description": "The name of the destination namespace (database) in the AWS Glue Data Catalog."
        },
        "DestinationTableName": {
          "type": "string",
          "description": "The name of the destination Apache Iceberg table."
        },
        "PartitionSpec": {
          "$ref": "#/$defs/PartitionSpec"
        }
      }
    },
    "EncryptionConfiguration": {
      "type": "object",
      "properties": {
        "KmsKeyArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the AWS KMS key used to encrypt the data."
        }
      },
      "required": [
        "KmsKeyArn"
      ]
    },
    "Firehose": {
      "type": "object",
      "properties": {
        "DeliveryStream": {
          "type": "string"
        },
        "Enabled": {
          "type": "boolean"
        }
      },
      "required": [
        "Enabled"
      ]
    },
    "IcebergDestinationConfiguration": {
      "type": "object",
      "properties": {
        "AppendOnly": {
          "type": "boolean",
          "description": "Whether the destination is append-only. Must be true; updates and deletes are not supported."
        },
        "Catalog": {
          "$ref": "#/$defs/Catalog"
        },
        "DataFreshnessInSeconds": {
          "type": "integer",
          "description": "The maximum time, in seconds, that records buffer in MSK before being flushed to the destination. Allowed range: 300 to 900. Default: 600."
        },
        "DeadLetterQueueS3": {
          "$ref": "#/$defs/DeadLetterQueueS3"
        },
        "DestinationTableList": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/DestinationTable"
          },
          "description": "The destination Iceberg tables. Currently exactly one table must be specified."
        },
        "SchemaEvolution": {
          "$ref": "#/$defs/SchemaEvolution"
        },
        "ServiceExecutionRoleArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the IAM role that MSK assumes to access the destination table, the AWS Glue Data Catalog, and the dead-letter Amazon S3 bucket."
        },
        "TableCreation": {
          "$ref": "#/$defs/TableCreation"
        },
        "CompressionType": {
          "type": "string",
          "enum": [
            "ZSTD",
            "SNAPPY"
          ],
          "description": "The compression codec for Iceberg table data files. Defaults to ZSTD."
        }
      },
      "required": [
        "AppendOnly",
        "DeadLetterQueueS3",
        "DestinationTableList",
        "SchemaEvolution",
        "ServiceExecutionRoleArn",
        "TableCreation"
      ]
    },
    "PartitionSource": {
      "type": "object",
      "properties": {
        "SourceName": {
          "type": "string",
          "description": "Source name."
        }
      }
    },
    "PartitionSpec": {
      "type": "object",
      "properties": {
        "PartitionStrategy": {
          "type": "string",
          "enum": [
            "TIME_HOUR"
          ],
          "description": "The partitioning strategy applied to records written to the table."
        },
        "SourceList": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PartitionSource"
          },
          "description": "The source columns used by the partitioning strategy. For TIME_HOUR, must contain exactly one source column whose value is a timestamp."
        }
      },
      "required": [
        "PartitionStrategy"
      ]
    },
    "RecordConverter": {
      "type": "object",
      "properties": {
        "ValueConverter": {
          "type": "string",
          "enum": [
            "BYTE_ARRAY",
            "JSON",
            "JSON_SCHEMA_GSR",
            "STRING"
          ],
          "description": "The deserialization format applied to Apache Kafka record values."
        }
      },
      "required": [
        "ValueConverter"
      ]
    },
    "RecordSchema": {
      "type": "object",
      "properties": {
        "GsrArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the AWS Glue Schema Registry schema (not registry) used to validate records for the destination Apache Iceberg table."
        }
      },
      "required": [
        "GsrArn"
      ]
    },
    "S3": {
      "type": "object",
      "properties": {
        "Bucket": {
          "type": "string"
        },
        "Enabled": {
          "type": "boolean"
        },
        "Prefix": {
          "type": "string"
        }
      },
      "required": [
        "Enabled"
      ]
    },
    "S3DestinationConfiguration": {
      "type": "object",
      "properties": {
        "DataFreshnessInSeconds": {
          "type": "integer",
          "description": "The maximum time, in seconds, that records buffer in MSK before being flushed to the destination. Allowed range: 300 to 900. Default: 600."
        },
        "DeadLetterQueueS3": {
          "$ref": "#/$defs/DeadLetterQueueS3"
        },
        "ServiceExecutionRoleArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the IAM role that MSK assumes to write to the destination Amazon S3 bucket and the dead-letter bucket."
        },
        "Storage": {
          "$ref": "#/$defs/S3Storage"
        }
      },
      "required": [
        "DeadLetterQueueS3",
        "ServiceExecutionRoleArn",
        "Storage"
      ]
    },
    "S3Storage": {
      "type": "object",
      "properties": {
        "BucketArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the destination Amazon S3 bucket."
        },
        "CompressionType": {
          "type": "string",
          "enum": [
            "NONE",
            "GZIP",
            "ZSTD"
          ],
          "description": "The compression codec applied to delivered Amazon S3 objects."
        },
        "OutputPrefix": {
          "type": "string",
          "description": "An optional prefix prepended to every Amazon S3 object key written by the channel."
        },
        "OutputKeyTemplate": {
          "type": "string",
          "description": "An optional template that controls the Amazon S3 object key for each delivered record. Supports the placeholders !{partition-id}, !{sequence-number}, and !{kafka-offset}."
        },
        "StorageClass": {
          "type": "string",
          "enum": [
            "STANDARD",
            "INTELLIGENT_TIERING",
            "GLACIER_IR"
          ],
          "description": "The Amazon S3 storage class for delivered objects."
        },
        "ExpectedBucketOwner": {
          "type": "string",
          "description": "Optional 12-digit AWS account ID expected to own the Amazon S3 bucket."
        }
      },
      "required": [
        "BucketArn",
        "CompressionType",
        "StorageClass"
      ]
    },
    "SchemaEvolution": {
      "type": "object",
      "properties": {
        "EnableSchemaEvolution": {
          "type": "boolean",
          "description": "Whether to allow MSK to evolve the destination table's schema. Must be false for the current release."
        }
      }
    },
    "TableCreation": {
      "type": "object",
      "properties": {
        "EnableTableCreation": {
          "type": "boolean",
          "description": "Whether MSK creates the destination table on the customer's behalf. Must be true for the current release."
        }
      }
    },
    "TopicConfiguration": {
      "type": "object",
      "properties": {
        "RecordConverter": {
          "$ref": "#/$defs/RecordConverter"
        },
        "RecordSchema": {
          "$ref": "#/$defs/RecordSchema"
        },
        "TopicArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) that uniquely identifies the topic."
        }
      },
      "required": [
        "RecordConverter",
        "TopicArn"
      ]
    }
  }
}