{
 "additionalIdentifiers": [
  [
   "/properties/ReplicatorName"
  ]
 ],
 "additionalProperties": false,
 "createOnlyProperties": [
  "/properties/ReplicatorName",
  "/properties/Description",
  "/properties/KafkaClusters",
  "/properties/ServiceExecutionRoleArn",
  "/properties/ReplicationInfoList/*/SourceKafkaClusterArn",
  "/properties/ReplicationInfoList/*/SourceKafkaClusterId",
  "/properties/ReplicationInfoList/*/TargetKafkaClusterArn",
  "/properties/ReplicationInfoList/*/TargetKafkaClusterId",
  "/properties/ReplicationInfoList/*/TargetCompressionType",
  "/properties/ReplicationInfoList/*/ConsumerGroupReplication/ConsumerGroupOffsetSyncMode",
  "/properties/ReplicationInfoList/*/TopicReplication/StartingPosition",
  "/properties/ReplicationInfoList/*/TopicReplication/TopicNameConfiguration"
 ],
 "definitions": {
  "AmazonMskCluster": {
   "additionalProperties": false,
   "properties": {
    "MskClusterArn": {
     "pattern": "arn:(aws|aws-us-gov|aws-cn):kafka:.*",
     "type": "string"
    }
   },
   "required": [
    "MskClusterArn"
   ],
   "type": "object"
  },
  "ApacheKafkaCluster": {
   "additionalProperties": false,
   "properties": {
    "ApacheKafkaClusterId": {
     "type": "string"
    },
    "BootstrapBrokerString": {
     "type": "string"
    }
   },
   "required": [
    "ApacheKafkaClusterId",
    "BootstrapBrokerString"
   ],
   "type": "object"
  },
  "CloudWatchLogs": {
   "additionalProperties": false,
   "properties": {
    "Enabled": {
     "type": "boolean"
    },
    "LogGroup": {
     "type": "string"
    }
   },
   "required": [
    "Enabled"
   ],
   "type": "object"
  },
  "ConsumerGroupOffsetSyncMode": {
   "enum": [
    "LEGACY",
    "ENHANCED"
   ],
   "type": "string"
  },
  "ConsumerGroupReplication": {
   "additionalProperties": false,
   "properties": {
    "ConsumerGroupOffsetSyncMode": {
     "$ref": "#/definitions/ConsumerGroupOffsetSyncMode"
    },
    "ConsumerGroupsToExclude": {
     "insertionOrder": false,
     "items": {
      "maxLength": 256,
      "minLength": 0,
      "type": "string"
     },
     "maxItems": 100,
     "minItems": 1,
     "type": "array",
     "uniqueItems": true
    },
    "ConsumerGroupsToReplicate": {
     "insertionOrder": false,
     "items": {
      "maxLength": 256,
      "minLength": 0,
      "type": "string"
     },
     "maxItems": 100,
     "minItems": 0,
     "type": "array",
     "uniqueItems": true
    },
    "DetectAndCopyNewConsumerGroups": {
     "type": "boolean"
    },
    "SynchroniseConsumerGroupOffsets": {
     "type": "boolean"
    }
   },
   "required": [
    "ConsumerGroupsToReplicate"
   ],
   "type": "object"
  },
  "Firehose": {
   "additionalProperties": false,
   "properties": {
    "DeliveryStream": {
     "type": "string"
    },
    "Enabled": {
     "type": "boolean"
    }
   },
   "required": [
    "Enabled"
   ],
   "type": "object"
  },
  "KafkaCluster": {
   "additionalProperties": false,
   "properties": {
    "AmazonMskCluster": {
     "$ref": "#/definitions/AmazonMskCluster"
    },
    "ApacheKafkaCluster": {
     "$ref": "#/definitions/ApacheKafkaCluster"
    },
    "ClientAuthentication": {
     "$ref": "#/definitions/KafkaClusterClientAuthentication"
    },
    "EncryptionInTransit": {
     "$ref": "#/definitions/KafkaClusterEncryptionInTransit"
    },
    "VpcConfig": {
     "$ref": "#/definitions/KafkaClusterClientVpcConfig"
    }
   },
   "required": [],
   "type": "object"
  },
  "KafkaClusterClientAuthentication": {
   "additionalProperties": false,
   "properties": {
    "SaslScram": {
     "$ref": "#/definitions/KafkaClusterSaslScramAuthentication"
    }
   },
   "required": [
    "SaslScram"
   ],
   "type": "object"
  },
  "KafkaClusterClientVpcConfig": {
   "additionalProperties": false,
   "properties": {
    "SecurityGroupIds": {
     "format": "AWS::EC2::SecurityGroup.Ids",
     "insertionOrder": false,
     "items": {
      "format": "AWS::EC2::SecurityGroup.Id",
      "type": "string"
     },
     "maxItems": 16,
     "minItems": 1,
     "type": "array",
     "uniqueItems": true
    },
    "SubnetIds": {
     "insertionOrder": false,
     "items": {
      "type": "string"
     },
     "maxItems": 3,
     "minItems": 2,
     "type": "array",
     "uniqueItems": true
    }
   },
   "required": [
    "SubnetIds"
   ],
   "type": "object"
  },
  "KafkaClusterEncryptionInTransit": {
   "additionalProperties": false,
   "properties": {
    "EncryptionType": {
     "$ref": "#/definitions/KafkaClusterEncryptionInTransitType"
    },
    "RootCaCertificate": {
     "type": "string"
    }
   },
   "required": [
    "EncryptionType"
   ],
   "type": "object"
  },
  "KafkaClusterEncryptionInTransitType": {
   "enum": [
    "TLS"
   ],
   "type": "string"
  },
  "KafkaClusterSaslScramAuthentication": {
   "additionalProperties": false,
   "properties": {
    "Mechanism": {
     "$ref": "#/definitions/KafkaClusterSaslScramMechanism"
    },
    "SecretArn": {
     "type": "string"
    }
   },
   "required": [
    "Mechanism",
    "SecretArn"
   ],
   "type": "object"
  },
  "KafkaClusterSaslScramMechanism": {
   "enum": [
    "SHA256",
    "SHA512"
   ],
   "type": "string"
  },
  "LogDelivery": {
   "additionalProperties": false,
   "properties": {
    "ReplicatorLogDelivery": {
     "$ref": "#/definitions/ReplicatorLogDelivery"
    }
   },
   "required": [],
   "type": "object"
  },
  "ReplicationInfo": {
   "additionalProperties": false,
   "properties": {
    "ConsumerGroupReplication": {
     "$ref": "#/definitions/ConsumerGroupReplication"
    },
    "SourceKafkaClusterArn": {
     "pattern": "arn:(aws|aws-us-gov|aws-cn):kafka:.*",
     "type": "string"
    },
    "SourceKafkaClusterId": {
     "type": "string"
    },
    "TargetCompressionType": {
     "enum": [
      "NONE",
      "GZIP",
      "SNAPPY",
      "LZ4",
      "ZSTD"
     ],
     "type": "string"
    },
    "TargetKafkaClusterArn": {
     "pattern": "arn:(aws|aws-us-gov|aws-cn):kafka:.*",
     "type": "string"
    },
    "TargetKafkaClusterId": {
     "type": "string"
    },
    "TopicReplication": {
     "$ref": "#/definitions/TopicReplication"
    }
   },
   "required": [
    "TopicReplication",
    "ConsumerGroupReplication",
    "TargetCompressionType"
   ],
   "type": "object"
  },
  "ReplicationStartingPosition": {
   "additionalProperties": false,
   "properties": {
    "Type": {
     "$ref": "#/definitions/ReplicationStartingPositionType"
    }
   },
   "required": [],
   "type": "object"
  },
  "ReplicationStartingPositionType": {
   "enum": [
    "LATEST",
    "EARLIEST"
   ],
   "type": "string"
  },
  "ReplicationTopicNameConfiguration": {
   "additionalProperties": false,
   "properties": {
    "Type": {
     "$ref": "#/definitions/ReplicationTopicNameConfigurationType"
    }
   },
   "required": [],
   "type": "object"
  },
  "ReplicationTopicNameConfigurationType": {
   "enum": [
    "PREFIXED_WITH_SOURCE_CLUSTER_ALIAS",
    "IDENTICAL"
   ],
   "type": "string"
  },
  "ReplicatorLogDelivery": {
   "additionalProperties": false,
   "properties": {
    "CloudWatchLogs": {
     "$ref": "#/definitions/CloudWatchLogs"
    },
    "Firehose": {
     "$ref": "#/definitions/Firehose"
    },
    "S3": {
     "$ref": "#/definitions/S3"
    }
   },
   "required": [],
   "type": "object"
  },
  "S3": {
   "additionalProperties": false,
   "properties": {
    "Bucket": {
     "type": "string"
    },
    "Enabled": {
     "type": "boolean"
    },
    "Prefix": {
     "type": "string"
    }
   },
   "required": [
    "Enabled"
   ],
   "type": "object"
  },
  "Tag": {
   "additionalProperties": false,
   "properties": {
    "Key": {
     "maxLength": 128,
     "minLength": 1,
     "type": "string"
    },
    "Value": {
     "maxLength": 256,
     "type": "string"
    }
   },
   "required": [
    "Value",
    "Key"
   ],
   "type": "object"
  },
  "TopicReplication": {
   "additionalProperties": false,
   "properties": {
    "CopyAccessControlListsForTopics": {
     "type": "boolean"
    },
    "CopyTopicConfigurations": {
     "type": "boolean"
    },
    "DetectAndCopyNewTopics": {
     "type": "boolean"
    },
    "StartingPosition": {
     "$ref": "#/definitions/ReplicationStartingPosition"
    },
    "TopicNameConfiguration": {
     "$ref": "#/definitions/ReplicationTopicNameConfiguration"
    },
    "TopicsToExclude": {
     "insertionOrder": false,
     "items": {
      "maxLength": 249,
      "minLength": 0,
      "type": "string"
     },
     "maxItems": 100,
     "minItems": 1,
     "type": "array",
     "uniqueItems": true
    },
    "TopicsToReplicate": {
     "insertionOrder": false,
     "items": {
      "maxLength": 249,
      "minLength": 0,
      "type": "string"
     },
     "maxItems": 100,
     "minItems": 1,
     "type": "array",
     "uniqueItems": true
    }
   },
   "required": [
    "TopicsToReplicate"
   ],
   "type": "object"
  }
 },
 "primaryIdentifier": [
  "/properties/ReplicatorArn"
 ],
 "properties": {
  "CurrentVersion": {
   "type": "string"
  },
  "Description": {
   "maxLength": 1024,
   "minLength": 0,
   "type": "string"
  },
  "KafkaClusters": {
   "insertionOrder": false,
   "items": {
    "$ref": "#/definitions/KafkaCluster"
   },
   "maxItems": 2,
   "minItems": 2,
   "type": "array",
   "uniqueItems": true
  },
  "LogDelivery": {
   "$ref": "#/definitions/LogDelivery"
  },
  "ReplicationInfoList": {
   "insertionOrder": false,
   "items": {
    "$ref": "#/definitions/ReplicationInfo"
   },
   "maxItems": 1,
   "minItems": 1,
   "type": "array",
   "uniqueItems": true
  },
  "ReplicatorArn": {
   "pattern": "arn:(aws|aws-us-gov|aws-cn):kafka:.*",
   "type": "string"
  },
  "ReplicatorName": {
   "maxLength": 128,
   "minLength": 1,
   "pattern": "^[0-9A-Za-z][0-9A-Za-z-]{0,}$",
   "type": "string"
  },
  "ServiceExecutionRoleArn": {
   "format": "AWS::IAM::Role.Arn",
   "pattern": "arn:(aws|aws-us-gov|aws-cn):iam:.*",
   "type": "string"
  },
  "Tags": {
   "insertionOrder": false,
   "items": {
    "$ref": "#/definitions/Tag"
   },
   "type": "array",
   "uniqueItems": true
  }
 },
 "readOnlyProperties": [
  "/properties/ReplicatorArn",
  "/properties/CurrentVersion"
 ],
 "required": [
  "ReplicatorName",
  "ReplicationInfoList",
  "KafkaClusters",
  "ServiceExecutionRoleArn"
 ],
 "sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-msk-replicator.git",
 "tagging": {
  "cloudFormationSystemTags": true,
  "tagOnCreate": true,
  "tagProperty": "/properties/Tags",
  "tagUpdatable": true,
  "taggable": true
 },
 "typeName": "AWS::MSK::Replicator"
}
