{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-msk/json-schema/amazon-msk-create-replicator-request-schema.json",
  "title": "CreateReplicatorRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-msk-replication-api-openapi.yml#/components/schemas/CreateReplicatorRequest",
  "type": "object",
  "properties": {
    "Description": {
      "type": "string",
      "description": "A summary description of the replicator."
    },
    "KafkaClusters": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/KafkaCluster"
      },
      "description": "Kafka Clusters to use in setting up sources / targets for replication."
    },
    "ReplicationInfoList": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ReplicationInfo"
      },
      "description": "A list of replication configurations, where each configuration targets a given source cluster to target cluster replication flow."
    },
    "ReplicatorName": {
      "type": "string",
      "description": "The name of the replicator. Alpha-numeric characters with '-' are allowed."
    },
    "ServiceExecutionRoleArn": {
      "type": "string",
      "description": "The ARN of the IAM role used by the replicator to access resources in the customer's account (e.g source and target clusters)"
    },
    "Tags": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "List of tags to attach to created Replicator."
    },
    "LogDelivery": {
      "$ref": "#/$defs/LogDelivery"
    }
  },
  "required": [
    "KafkaClusters",
    "ReplicationInfoList",
    "ReplicatorName",
    "ServiceExecutionRoleArn"
  ],
  "$defs": {
    "AmazonMskCluster": {
      "type": "object",
      "properties": {
        "MskClusterArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of an Amazon MSK cluster."
        }
      },
      "required": [
        "MskClusterArn"
      ]
    },
    "ApacheKafkaCluster": {
      "type": "object",
      "properties": {
        "ApacheKafkaClusterId": {
          "type": "string",
          "description": "The ID of the Apache Kafka cluster."
        },
        "BootstrapBrokerString": {
          "type": "string",
          "description": "The bootstrap broker string of the Apache Kafka cluster."
        }
      },
      "required": [
        "ApacheKafkaClusterId",
        "BootstrapBrokerString"
      ]
    },
    "ConsumerGroupReplication": {
      "type": "object",
      "properties": {
        "ConsumerGroupsToExclude": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "List of regular expression patterns indicating the consumer groups that should not be replicated."
        },
        "ConsumerGroupsToReplicate": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "List of regular expression patterns indicating the consumer groups to copy."
        },
        "DetectAndCopyNewConsumerGroups": {
          "type": "boolean",
          "description": "Enables synchronization of consumer groups to target cluster."
        },
        "SynchroniseConsumerGroupOffsets": {
          "type": "boolean",
          "description": "Enables synchronization of consumer group offsets to target cluster. The translated offsets will be written to topic __consumer_offsets."
        },
        "ConsumerGroupOffsetSyncMode": {
          "type": "string",
          "enum": [
            "LEGACY",
            "ENHANCED"
          ],
          "description": "The consumer group offset synchronization mode. With LEGACY, offsets are synchronized when producers write to the source cluster. With ENHANCED, consumer offsets are synchronized regardless of producer location. ENHANCED requires a corresponding replicator that replicates data from the target cluster to the source cluster."
        }
      },
      "required": [
        "ConsumerGroupsToReplicate"
      ]
    },
    "KafkaCluster": {
      "type": "object",
      "properties": {
        "AmazonMskCluster": {
          "$ref": "#/$defs/AmazonMskCluster"
        },
        "ApacheKafkaCluster": {
          "$ref": "#/$defs/ApacheKafkaCluster"
        },
        "VpcConfig": {
          "$ref": "#/$defs/KafkaClusterClientVpcConfig"
        },
        "ClientAuthentication": {
          "$ref": "#/$defs/KafkaClusterClientAuthentication"
        },
        "EncryptionInTransit": {
          "$ref": "#/$defs/KafkaClusterEncryptionInTransit"
        }
      }
    },
    "KafkaClusterClientAuthentication": {
      "type": "object",
      "properties": {
        "SaslScram": {
          "$ref": "#/$defs/KafkaClusterSaslScramAuthentication"
        },
        "MTLS": {
          "$ref": "#/$defs/KafkaClusterMTLSAuthentication"
        },
        "SaslOAuthBearer": {
          "$ref": "#/$defs/KafkaClusterSaslOAuthBearerAuthentication"
        }
      }
    },
    "KafkaClusterClientVpcConfig": {
      "type": "object",
      "properties": {
        "SecurityGroupIds": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The security groups to attach to the ENIs for the broker nodes."
        },
        "SubnetIds": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The list of subnets in the client VPC to connect to."
        }
      },
      "required": [
        "SubnetIds"
      ]
    },
    "KafkaClusterEncryptionInTransit": {
      "type": "object",
      "properties": {
        "EncryptionType": {
          "type": "string",
          "enum": [
            "TLS"
          ],
          "description": "The type of encryption in transit to the Apache Kafka cluster."
        },
        "RootCaCertificate": {
          "type": "string",
          "description": "The root CA certificate."
        }
      },
      "required": [
        "EncryptionType"
      ]
    },
    "KafkaClusterMTLSAuthentication": {
      "type": "object",
      "properties": {
        "SecretArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the Secrets Manager secret."
        }
      },
      "required": [
        "SecretArn"
      ]
    },
    "KafkaClusterOAuthClientCredentials": {
      "type": "object",
      "properties": {
        "TokenRequestSecretArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the Secrets Manager secret containing the OAuth client credentials."
        }
      },
      "required": [
        "TokenRequestSecretArn"
      ]
    },
    "KafkaClusterOAuthClientCredentialsAssertion": {
      "type": "object",
      "properties": {
        "Audience": {
          "type": "string",
          "description": "The audience for the JWT client assertion."
        },
        "SigningAlgorithm": {
          "type": "string",
          "enum": [
            "RS256",
            "ES384"
          ],
          "description": "The signing algorithm for the JWT client assertion."
        },
        "TokenRequestSecretArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the Secrets Manager secret containing the signing key."
        }
      },
      "required": [
        "Audience",
        "SigningAlgorithm"
      ]
    },
    "KafkaClusterOAuthIamJwtBearer": {
      "type": "object",
      "properties": {
        "Audience": {
          "type": "string",
          "description": "The audience for the JWT Bearer assertion."
        },
        "SigningAlgorithm": {
          "type": "string",
          "enum": [
            "RS256",
            "ES384"
          ],
          "description": "The signing algorithm for the JWT Bearer assertion."
        },
        "TokenRequestSecretArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the Secrets Manager secret containing the signing key."
        }
      },
      "required": [
        "Audience",
        "SigningAlgorithm"
      ]
    },
    "KafkaClusterSaslOAuthBearerAuthentication": {
      "type": "object",
      "properties": {
        "TokenEndpointUrl": {
          "type": "string",
          "description": "The HTTPS URL of the OAuth token endpoint that vends OAuth Bearer tokens per RFC 6749."
        },
        "ClientCredentials": {
          "$ref": "#/$defs/KafkaClusterOAuthClientCredentials"
        },
        "IamJwtBearer": {
          "$ref": "#/$defs/KafkaClusterOAuthIamJwtBearer"
        },
        "ClientCredentialsAssertion": {
          "$ref": "#/$defs/KafkaClusterOAuthClientCredentialsAssertion"
        },
        "TokenEndpointAuthenticationMethod": {
          "type": "string",
          "enum": [
            "POST",
            "BASIC",
            "NONE"
          ],
          "description": "How client credentials are sent to the identity provider. Valid values are POST, BASIC, or NONE."
        },
        "Scope": {
          "type": "string",
          "description": "OAuth scope to request."
        },
        "TokenEndpointTlsCertificateArn": {
          "type": "string",
          "description": "Secrets Manager ARN containing a custom CA certificate for the identity provider."
        }
      },
      "required": [
        "TokenEndpointUrl",
        "TokenEndpointAuthenticationMethod"
      ]
    },
    "KafkaClusterSaslScramAuthentication": {
      "type": "object",
      "properties": {
        "Mechanism": {
          "type": "string",
          "enum": [
            "SHA256",
            "SHA512"
          ],
          "description": "The SASL/SCRAM authentication mechanism."
        },
        "SecretArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the Secrets Manager secret."
        }
      },
      "required": [
        "Mechanism",
        "SecretArn"
      ]
    },
    "LogDelivery": {
      "type": "object",
      "properties": {
        "ReplicatorLogDelivery": {
          "$ref": "#/$defs/ReplicatorLogDelivery"
        }
      }
    },
    "ReplicationInfo": {
      "type": "object",
      "properties": {
        "ConsumerGroupReplication": {
          "$ref": "#/$defs/ConsumerGroupReplication"
        },
        "SourceKafkaClusterArn": {
          "type": "string",
          "description": "The ARN of the source Kafka cluster."
        },
        "SourceKafkaClusterId": {
          "type": "string",
          "description": "The ID of the source Kafka cluster."
        },
        "TargetCompressionType": {
          "type": "string",
          "enum": [
            "NONE",
            "GZIP",
            "SNAPPY",
            "LZ4",
            "ZSTD"
          ],
          "description": "The compression type to use when producing records to target cluster."
        },
        "TargetKafkaClusterArn": {
          "type": "string",
          "description": "The ARN of the target Kafka cluster."
        },
        "TargetKafkaClusterId": {
          "type": "string",
          "description": "The ID of the target Kafka cluster."
        },
        "TopicReplication": {
          "$ref": "#/$defs/TopicReplication"
        }
      },
      "required": [
        "ConsumerGroupReplication",
        "TargetCompressionType",
        "TopicReplication"
      ]
    },
    "ReplicationStartingPosition": {
      "type": "object",
      "properties": {
        "Type": {
          "type": "string",
          "enum": [
            "LATEST",
            "EARLIEST"
          ],
          "description": "The type of replication starting position."
        }
      }
    },
    "ReplicationTopicNameConfiguration": {
      "type": "object",
      "properties": {
        "Type": {
          "type": "string",
          "enum": [
            "PREFIXED_WITH_SOURCE_CLUSTER_ALIAS",
            "IDENTICAL"
          ],
          "description": "The type of replicated topic name."
        }
      }
    },
    "ReplicatorCloudWatchLogs": {
      "type": "object",
      "properties": {
        "Enabled": {
          "type": "boolean",
          "description": "Whether log delivery to CloudWatch Logs is enabled."
        },
        "LogGroup": {
          "type": "string",
          "description": "The CloudWatch log group that is the destination for log delivery."
        }
      },
      "required": [
        "Enabled"
      ]
    },
    "ReplicatorFirehose": {
      "type": "object",
      "properties": {
        "Enabled": {
          "type": "boolean",
          "description": "Whether log delivery to Firehose is enabled."
        },
        "DeliveryStream": {
          "type": "string",
          "description": "The Firehose delivery stream that is the destination for log delivery."
        }
      },
      "required": [
        "Enabled"
      ]
    },
    "ReplicatorLogDelivery": {
      "type": "object",
      "properties": {
        "CloudWatchLogs": {
          "$ref": "#/$defs/ReplicatorCloudWatchLogs"
        },
        "Firehose": {
          "$ref": "#/$defs/ReplicatorFirehose"
        },
        "S3": {
          "$ref": "#/$defs/ReplicatorS3"
        }
      }
    },
    "ReplicatorS3": {
      "type": "object",
      "properties": {
        "Enabled": {
          "type": "boolean",
          "description": "Whether log delivery to S3 is enabled."
        },
        "Bucket": {
          "type": "string",
          "description": "The S3 bucket that is the destination for log delivery."
        },
        "Prefix": {
          "type": "string",
          "description": "The S3 prefix that is the destination for log delivery."
        }
      },
      "required": [
        "Enabled"
      ]
    },
    "TopicReplication": {
      "type": "object",
      "properties": {
        "CopyAccessControlListsForTopics": {
          "type": "boolean",
          "description": "Whether to periodically configure remote topic ACLs to match their corresponding upstream topics."
        },
        "CopyTopicConfigurations": {
          "type": "boolean",
          "description": "Whether to periodically configure remote topics to match their corresponding upstream topics."
        },
        "DetectAndCopyNewTopics": {
          "type": "boolean",
          "description": "Whether to periodically check for new topics and partitions."
        },
        "StartingPosition": {
          "$ref": "#/$defs/ReplicationStartingPosition"
        },
        "TopicNameConfiguration": {
          "$ref": "#/$defs/ReplicationTopicNameConfiguration"
        },
        "TopicsToExclude": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "List of regular expression patterns indicating the topics that should not be replicated."
        },
        "TopicsToReplicate": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "List of regular expression patterns indicating the topics to copy."
        }
      },
      "required": [
        "TopicsToReplicate"
      ]
    }
  }
}