# TopicReplicationProperty

Details about topic replication.

- Source: Generated at build time
- Type last changed: v2.154.1 · 23 Aug 2024

## 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 topicReplicationProperty: msk.CfnReplicator.TopicReplicationProperty = {
  topicsToReplicate: ['topicsToReplicate'],

  // the properties below are optional
  copyAccessControlListsForTopics: false,
  copyTopicConfigurations: false,
  detectAndCopyNewTopics: false,
  startingPosition: {
    type: 'type',
  },
  topicNameConfiguration: {
    type: 'type',
  },
  topicsToExclude: ['topicsToExclude'],
};
```

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

topic_replication_property = msk.CfnReplicator.TopicReplicationProperty(
    topics_to_replicate=["topicsToReplicate"],

    # the properties below are optional
    copy_access_control_lists_for_topics=False,
    copy_topic_configurations=False,
    detect_and_copy_new_topics=False,
    starting_position=msk.CfnReplicator.ReplicationStartingPositionProperty(
        type="type"
    ),
    topic_name_configuration=msk.CfnReplicator.ReplicationTopicNameConfigurationProperty(
        type="type"
    ),
    topics_to_exclude=["topicsToExclude"]
)
```

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

TopicReplicationProperty topicReplicationProperty = TopicReplicationProperty.builder()
        .topicsToReplicate(List.of("topicsToReplicate"))

        // the properties below are optional
        .copyAccessControlListsForTopics(false)
        .copyTopicConfigurations(false)
        .detectAndCopyNewTopics(false)
        .startingPosition(ReplicationStartingPositionProperty.builder()
                .type("type")
                .build())
        .topicNameConfiguration(ReplicationTopicNameConfigurationProperty.builder()
                .type("type")
                .build())
        .topicsToExclude(List.of("topicsToExclude"))
        .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 topicReplicationProperty = new TopicReplicationProperty {
    TopicsToReplicate = new [] { "topicsToReplicate" },

    // the properties below are optional
    CopyAccessControlListsForTopics = false,
    CopyTopicConfigurations = false,
    DetectAndCopyNewTopics = false,
    StartingPosition = new ReplicationStartingPositionProperty {
        Type = "type"
    },
    TopicNameConfiguration = new ReplicationTopicNameConfigurationProperty {
        Type = "type"
    },
    TopicsToExclude = new [] { "topicsToExclude" }
};
```

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"

topicReplicationProperty := &TopicReplicationProperty{
	TopicsToReplicate: []*string{
		jsii.String("topicsToReplicate"),
	},

	// the properties below are optional
	CopyAccessControlListsForTopics: jsii.Boolean(false),
	CopyTopicConfigurations: jsii.Boolean(false),
	DetectAndCopyNewTopics: jsii.Boolean(false),
	StartingPosition: &ReplicationStartingPositionProperty{
		Type: jsii.String("type"),
	},
	TopicNameConfiguration: &ReplicationTopicNameConfigurationProperty{
		Type: jsii.String("type"),
	},
	TopicsToExclude: []*string{
		jsii.String("topicsToExclude"),
	},
}
```

## Properties

- `copyAccessControlListsForTopics`: boolean | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — Whether to periodically configure remote topic ACLs to match their corresponding upstream topics.

- `copyTopicConfigurations`: boolean | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — Whether to periodically configure remote topics to match their corresponding upstream topics.

- `detectAndCopyNewTopics`: boolean | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — Whether to periodically check for new topics and partitions.

- `startingPosition`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnReplicator.ReplicationStartingPositionProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_msk.CfnReplicator.ReplicationStartingPositionProperty.html) — Specifies the position in the topics to start replicating from.

- `topicNameConfiguration`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnReplicator.ReplicationTopicNameConfigurationProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_msk.CfnReplicator.ReplicationTopicNameConfigurationProperty.html) — Configuration for specifying replicated topic names will be the same as their corresponding upstream topics or prefixed with source cluster alias.

- `topicsToExclude`: string[] — List of regular expression patterns indicating the topics that should not be replicated.

- `topicsToReplicate`: string[] (required) — List of regular expression patterns indicating the topics to copy.
