# CfnTopicProps

Properties for defining a `CfnTopic`.

Used as props by: [CfnTopic](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_msk.CfnTopic.html)

- Source: Generated at build time
- Type last changed: v2.239.0 · 19 Feb 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 cfnTopicProps: msk.CfnTopicProps = {
  clusterArn: 'clusterArn',
  partitionCount: 123,
  replicationFactor: 123,
  topicName: 'topicName',

  // the properties below are optional
  configs: 'configs',
};
```

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

cfn_topic_props = msk.CfnTopicProps(
    cluster_arn="clusterArn",
    partition_count=123,
    replication_factor=123,
    topic_name="topicName",

    # the properties below are optional
    configs="configs"
)
```

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.*;

CfnTopicProps cfnTopicProps = CfnTopicProps.builder()
        .clusterArn("clusterArn")
        .partitionCount(123)
        .replicationFactor(123)
        .topicName("topicName")

        // the properties below are optional
        .configs("configs")
        .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 cfnTopicProps = new CfnTopicProps {
    ClusterArn = "clusterArn",
    PartitionCount = 123,
    ReplicationFactor = 123,
    TopicName = "topicName",

    // the properties below are optional
    Configs = "configs"
};
```

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"

cfnTopicProps := &CfnTopicProps{
	ClusterArn: jsii.String("clusterArn"),
	PartitionCount: jsii.Number(123),
	ReplicationFactor: jsii.Number(123),
	TopicName: jsii.String("topicName"),

	// the properties below are optional
	Configs: jsii.String("configs"),
}
```

## Properties

- `clusterArn`: string (required) — The Amazon Resource Name (ARN) of the MSK cluster.

- `configs`: string — Base64 encoded configuration properties of the topic.

- `partitionCount`: number (required) — The number of partitions for the topic.

- `replicationFactor`: number (required) — The replication factor for the topic.

- `topicName`: string (required) — The name of the topic.
