# KafkaClusterProperty

Information about Kafka Cluster to be used as source / target for replication.

- Source: Generated at build time
- Type last changed: v2.251.0 · 24 Apr 2026

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_msk as msk } from 'aws-cdk-lib';
const kafkaClusterProperty: msk.CfnReplicator.KafkaClusterProperty = {
  amazonMskCluster: {
    mskClusterArn: 'mskClusterArn',
  },
  apacheKafkaCluster: {
    apacheKafkaClusterId: 'apacheKafkaClusterId',
    bootstrapBrokerString: 'bootstrapBrokerString',
  },
  clientAuthentication: {
    mtls: {
      secretArn: 'secretArn',
    },
    saslOAuthBearer: {
      tokenEndpointAuthenticationMethod: 'tokenEndpointAuthenticationMethod',
      tokenEndpointUrl: 'tokenEndpointUrl',

      // the properties below are optional
      clientCredentials: {
        tokenRequestSecretArn: 'tokenRequestSecretArn',
      },
      clientCredentialsAssertion: {
        audience: 'audience',
        signingAlgorithm: 'signingAlgorithm',

        // the properties below are optional
        tokenRequestSecretArn: 'tokenRequestSecretArn',
      },
      iamJwtBearer: {
        audience: 'audience',
        signingAlgorithm: 'signingAlgorithm',

        // the properties below are optional
        tokenRequestSecretArn: 'tokenRequestSecretArn',
      },
      scope: 'scope',
      tokenEndpointTlsCertificateArn: 'tokenEndpointTlsCertificateArn',
    },
    saslScram: {
      mechanism: 'mechanism',
      secretArn: 'secretArn',
    },
  },
  encryptionInTransit: {
    encryptionType: 'encryptionType',

    // the properties below are optional
    rootCaCertificate: 'rootCaCertificate',
  },
  vpcConfig: {
    subnetIds: ['subnetIds'],

    // the properties below are optional
    securityGroupIds: ['securityGroupIds'],
  },
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_msk as msk

kafka_cluster_property = msk.CfnReplicator.KafkaClusterProperty(
    amazon_msk_cluster=msk.CfnReplicator.AmazonMskClusterProperty(
        msk_cluster_arn="mskClusterArn"
    ),
    apache_kafka_cluster=msk.CfnReplicator.ApacheKafkaClusterProperty(
        apache_kafka_cluster_id="apacheKafkaClusterId",
        bootstrap_broker_string="bootstrapBrokerString"
    ),
    client_authentication=msk.CfnReplicator.KafkaClusterClientAuthenticationProperty(
        mtls=msk.CfnReplicator.KafkaClusterMtlsAuthenticationProperty(
            secret_arn="secretArn"
        ),
        sasl_o_auth_bearer=msk.CfnReplicator.KafkaClusterSaslOAuthBearerAuthenticationProperty(
            token_endpoint_authentication_method="tokenEndpointAuthenticationMethod",
            token_endpoint_url="tokenEndpointUrl",

            # the properties below are optional
            client_credentials=msk.CfnReplicator.KafkaClusterOAuthClientCredentialsProperty(
                token_request_secret_arn="tokenRequestSecretArn"
            ),
            client_credentials_assertion=msk.CfnReplicator.KafkaClusterOAuthClientCredentialsAssertionProperty(
                audience="audience",
                signing_algorithm="signingAlgorithm",

                # the properties below are optional
                token_request_secret_arn="tokenRequestSecretArn"
            ),
            iam_jwt_bearer=msk.CfnReplicator.KafkaClusterOAuthIamJwtBearerProperty(
                audience="audience",
                signing_algorithm="signingAlgorithm",

                # the properties below are optional
                token_request_secret_arn="tokenRequestSecretArn"
            ),
            scope="scope",
            token_endpoint_tls_certificate_arn="tokenEndpointTlsCertificateArn"
        ),
        sasl_scram=msk.CfnReplicator.KafkaClusterSaslScramAuthenticationProperty(
            mechanism="mechanism",
            secret_arn="secretArn"
        )
    ),
    encryption_in_transit=msk.CfnReplicator.KafkaClusterEncryptionInTransitProperty(
        encryption_type="encryptionType",

        # the properties below are optional
        root_ca_certificate="rootCaCertificate"
    ),
    vpc_config=msk.CfnReplicator.KafkaClusterClientVpcConfigProperty(
        subnet_ids=["subnetIds"],

        # the properties below are optional
        security_group_ids=["securityGroupIds"]
    )
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.msk.*;

KafkaClusterProperty kafkaClusterProperty = KafkaClusterProperty.builder()
        .amazonMskCluster(AmazonMskClusterProperty.builder()
                .mskClusterArn("mskClusterArn")
                .build())
        .apacheKafkaCluster(ApacheKafkaClusterProperty.builder()
                .apacheKafkaClusterId("apacheKafkaClusterId")
                .bootstrapBrokerString("bootstrapBrokerString")
                .build())
        .clientAuthentication(KafkaClusterClientAuthenticationProperty.builder()
                .mtls(KafkaClusterMtlsAuthenticationProperty.builder()
                        .secretArn("secretArn")
                        .build())
                .saslOAuthBearer(KafkaClusterSaslOAuthBearerAuthenticationProperty.builder()
                        .tokenEndpointAuthenticationMethod("tokenEndpointAuthenticationMethod")
                        .tokenEndpointUrl("tokenEndpointUrl")

                        // the properties below are optional
                        .clientCredentials(KafkaClusterOAuthClientCredentialsProperty.builder()
                                .tokenRequestSecretArn("tokenRequestSecretArn")
                                .build())
                        .clientCredentialsAssertion(KafkaClusterOAuthClientCredentialsAssertionProperty.builder()
                                .audience("audience")
                                .signingAlgorithm("signingAlgorithm")

                                // the properties below are optional
                                .tokenRequestSecretArn("tokenRequestSecretArn")
                                .build())
                        .iamJwtBearer(KafkaClusterOAuthIamJwtBearerProperty.builder()
                                .audience("audience")
                                .signingAlgorithm("signingAlgorithm")

                                // the properties below are optional
                                .tokenRequestSecretArn("tokenRequestSecretArn")
                                .build())
                        .scope("scope")
                        .tokenEndpointTlsCertificateArn("tokenEndpointTlsCertificateArn")
                        .build())
                .saslScram(KafkaClusterSaslScramAuthenticationProperty.builder()
                        .mechanism("mechanism")
                        .secretArn("secretArn")
                        .build())
                .build())
        .encryptionInTransit(KafkaClusterEncryptionInTransitProperty.builder()
                .encryptionType("encryptionType")

                // the properties below are optional
                .rootCaCertificate("rootCaCertificate")
                .build())
        .vpcConfig(KafkaClusterClientVpcConfigProperty.builder()
                .subnetIds(List.of("subnetIds"))

                // the properties below are optional
                .securityGroupIds(List.of("securityGroupIds"))
                .build())
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.MSK;

var kafkaClusterProperty = new KafkaClusterProperty {
    AmazonMskCluster = new AmazonMskClusterProperty {
        MskClusterArn = "mskClusterArn"
    },
    ApacheKafkaCluster = new ApacheKafkaClusterProperty {
        ApacheKafkaClusterId = "apacheKafkaClusterId",
        BootstrapBrokerString = "bootstrapBrokerString"
    },
    ClientAuthentication = new KafkaClusterClientAuthenticationProperty {
        Mtls = new KafkaClusterMtlsAuthenticationProperty {
            SecretArn = "secretArn"
        },
        SaslOAuthBearer = new KafkaClusterSaslOAuthBearerAuthenticationProperty {
            TokenEndpointAuthenticationMethod = "tokenEndpointAuthenticationMethod",
            TokenEndpointUrl = "tokenEndpointUrl",

            // the properties below are optional
            ClientCredentials = new KafkaClusterOAuthClientCredentialsProperty {
                TokenRequestSecretArn = "tokenRequestSecretArn"
            },
            ClientCredentialsAssertion = new KafkaClusterOAuthClientCredentialsAssertionProperty {
                Audience = "audience",
                SigningAlgorithm = "signingAlgorithm",

                // the properties below are optional
                TokenRequestSecretArn = "tokenRequestSecretArn"
            },
            IamJwtBearer = new KafkaClusterOAuthIamJwtBearerProperty {
                Audience = "audience",
                SigningAlgorithm = "signingAlgorithm",

                // the properties below are optional
                TokenRequestSecretArn = "tokenRequestSecretArn"
            },
            Scope = "scope",
            TokenEndpointTlsCertificateArn = "tokenEndpointTlsCertificateArn"
        },
        SaslScram = new KafkaClusterSaslScramAuthenticationProperty {
            Mechanism = "mechanism",
            SecretArn = "secretArn"
        }
    },
    EncryptionInTransit = new KafkaClusterEncryptionInTransitProperty {
        EncryptionType = "encryptionType",

        // the properties below are optional
        RootCaCertificate = "rootCaCertificate"
    },
    VpcConfig = new KafkaClusterClientVpcConfigProperty {
        SubnetIds = new [] { "subnetIds" },

        // the properties below are optional
        SecurityGroupIds = new [] { "securityGroupIds" }
    }
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

kafkaClusterProperty := &KafkaClusterProperty{
	AmazonMskCluster: &AmazonMskClusterProperty{
		MskClusterArn: jsii.String("mskClusterArn"),
	},
	ApacheKafkaCluster: &ApacheKafkaClusterProperty{
		ApacheKafkaClusterId: jsii.String("apacheKafkaClusterId"),
		BootstrapBrokerString: jsii.String("bootstrapBrokerString"),
	},
	ClientAuthentication: &KafkaClusterClientAuthenticationProperty{
		Mtls: &KafkaClusterMtlsAuthenticationProperty{
			SecretArn: jsii.String("secretArn"),
		},
		SaslOAuthBearer: &KafkaClusterSaslOAuthBearerAuthenticationProperty{
			TokenEndpointAuthenticationMethod: jsii.String("tokenEndpointAuthenticationMethod"),
			TokenEndpointUrl: jsii.String("tokenEndpointUrl"),

			// the properties below are optional
			ClientCredentials: &KafkaClusterOAuthClientCredentialsProperty{
				TokenRequestSecretArn: jsii.String("tokenRequestSecretArn"),
			},
			ClientCredentialsAssertion: &KafkaClusterOAuthClientCredentialsAssertionProperty{
				Audience: jsii.String("audience"),
				SigningAlgorithm: jsii.String("signingAlgorithm"),

				// the properties below are optional
				TokenRequestSecretArn: jsii.String("tokenRequestSecretArn"),
			},
			IamJwtBearer: &KafkaClusterOAuthIamJwtBearerProperty{
				Audience: jsii.String("audience"),
				SigningAlgorithm: jsii.String("signingAlgorithm"),

				// the properties below are optional
				TokenRequestSecretArn: jsii.String("tokenRequestSecretArn"),
			},
			Scope: jsii.String("scope"),
			TokenEndpointTlsCertificateArn: jsii.String("tokenEndpointTlsCertificateArn"),
		},
		SaslScram: &KafkaClusterSaslScramAuthenticationProperty{
			Mechanism: jsii.String("mechanism"),
			SecretArn: jsii.String("secretArn"),
		},
	},
	EncryptionInTransit: &KafkaClusterEncryptionInTransitProperty{
		EncryptionType: jsii.String("encryptionType"),

		// the properties below are optional
		RootCaCertificate: jsii.String("rootCaCertificate"),
	},
	VpcConfig: &KafkaClusterClientVpcConfigProperty{
		SubnetIds: []*string{
			jsii.String("subnetIds"),
		},

		// the properties below are optional
		SecurityGroupIds: []*string{
			jsii.String("securityGroupIds"),
		},
	},
}
```

## Properties

- `amazonMskCluster`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnReplicator.AmazonMskClusterProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_msk.CfnReplicator.AmazonMskClusterProperty.html) — Details of an Amazon MSK Cluster.

- `apacheKafkaCluster`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnReplicator.ApacheKafkaClusterProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_msk.CfnReplicator.ApacheKafkaClusterProperty.html) — Details of an Apache Kafka cluster.

- `clientAuthentication`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnReplicator.KafkaClusterClientAuthenticationProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_msk.CfnReplicator.KafkaClusterClientAuthenticationProperty.html) — Details of the client authentication used by the Apache Kafka cluster.

- `encryptionInTransit`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnReplicator.KafkaClusterEncryptionInTransitProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_msk.CfnReplicator.KafkaClusterEncryptionInTransitProperty.html) — Details of encryption in transit to the Apache Kafka cluster.

- `vpcConfig`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnReplicator.KafkaClusterClientVpcConfigProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_msk.CfnReplicator.KafkaClusterClientVpcConfigProperty.html) — Details of an Amazon VPC which has network connectivity to the Apache Kafka cluster.
