# CfnConnectorProps

Properties for defining a `CfnConnector`.

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

- Source: Generated at build time
- Type last changed: v2.234.0 · 8 Jan 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_kafkaconnect as kafkaconnect } from 'aws-cdk-lib';
const cfnConnectorProps: kafkaconnect.CfnConnectorProps = {
  capacity: {
    autoScaling: {
      maxWorkerCount: 123,
      mcuCount: 123,
      minWorkerCount: 123,
      scaleInPolicy: {
        cpuUtilizationPercentage: 123,
      },
      scaleOutPolicy: {
        cpuUtilizationPercentage: 123,
      },

      // the properties below are optional
      maxAutoscalingTaskCount: 123,
    },
    provisionedCapacity: {
      mcuCount: 123,
      workerCount: 123,
    },
  },
  connectorConfiguration: {
    connectorConfigurationKey: 'connectorConfiguration',
  },
  connectorName: 'connectorName',
  kafkaCluster: {
    apacheKafkaCluster: {
      bootstrapServers: 'bootstrapServers',
      vpc: {
        securityGroups: ['securityGroups'],
        subnets: ['subnets'],
      },
    },
  },
  kafkaClusterClientAuthentication: {
    authenticationType: 'authenticationType',
  },
  kafkaClusterEncryptionInTransit: {
    encryptionType: 'encryptionType',
  },
  kafkaConnectVersion: 'kafkaConnectVersion',
  plugins: [{
    customPlugin: {
      customPluginArn: 'customPluginArn',
      revision: 123,
    },
  }],
  serviceExecutionRoleArn: 'serviceExecutionRoleArn',

  // the properties below are optional
  connectorDescription: 'connectorDescription',
  logDelivery: {
    workerLogDelivery: {
      cloudWatchLogs: {
        enabled: false,

        // the properties below are optional
        logGroup: 'logGroup',
      },
      firehose: {
        enabled: false,

        // the properties below are optional
        deliveryStream: 'deliveryStream',
      },
      s3: {
        enabled: false,

        // the properties below are optional
        bucket: 'bucket',
        prefix: 'prefix',
      },
    },
  },
  networkType: 'networkType',
  tags: [{
    key: 'key',
    value: 'value',
  }],
  workerConfiguration: {
    revision: 123,
    workerConfigurationArn: 'workerConfigurationArn',
  },
};
```

Python:

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

cfn_connector_props = kafkaconnect.CfnConnectorProps(
    capacity=kafkaconnect.CfnConnector.CapacityProperty(
        auto_scaling=kafkaconnect.CfnConnector.AutoScalingProperty(
            max_worker_count=123,
            mcu_count=123,
            min_worker_count=123,
            scale_in_policy=kafkaconnect.CfnConnector.ScaleInPolicyProperty(
                cpu_utilization_percentage=123
            ),
            scale_out_policy=kafkaconnect.CfnConnector.ScaleOutPolicyProperty(
                cpu_utilization_percentage=123
            ),

            # the properties below are optional
            max_autoscaling_task_count=123
        ),
        provisioned_capacity=kafkaconnect.CfnConnector.ProvisionedCapacityProperty(
            mcu_count=123,
            worker_count=123
        )
    ),
    connector_configuration={
        "connector_configuration_key": "connectorConfiguration"
    },
    connector_name="connectorName",
    kafka_cluster=kafkaconnect.CfnConnector.KafkaClusterProperty(
        apache_kafka_cluster=kafkaconnect.CfnConnector.ApacheKafkaClusterProperty(
            bootstrap_servers="bootstrapServers",
            vpc=kafkaconnect.CfnConnector.VpcProperty(
                security_groups=["securityGroups"],
                subnets=["subnets"]
            )
        )
    ),
    kafka_cluster_client_authentication=kafkaconnect.CfnConnector.KafkaClusterClientAuthenticationProperty(
        authentication_type="authenticationType"
    ),
    kafka_cluster_encryption_in_transit=kafkaconnect.CfnConnector.KafkaClusterEncryptionInTransitProperty(
        encryption_type="encryptionType"
    ),
    kafka_connect_version="kafkaConnectVersion",
    plugins=[kafkaconnect.CfnConnector.PluginProperty(
        custom_plugin=kafkaconnect.CfnConnector.CustomPluginProperty(
            custom_plugin_arn="customPluginArn",
            revision=123
        )
    )],
    service_execution_role_arn="serviceExecutionRoleArn",

    # the properties below are optional
    connector_description="connectorDescription",
    log_delivery=kafkaconnect.CfnConnector.LogDeliveryProperty(
        worker_log_delivery=kafkaconnect.CfnConnector.WorkerLogDeliveryProperty(
            cloud_watch_logs=kafkaconnect.CfnConnector.CloudWatchLogsLogDeliveryProperty(
                enabled=False,

                # the properties below are optional
                log_group="logGroup"
            ),
            firehose=kafkaconnect.CfnConnector.FirehoseLogDeliveryProperty(
                enabled=False,

                # the properties below are optional
                delivery_stream="deliveryStream"
            ),
            s3=kafkaconnect.CfnConnector.S3LogDeliveryProperty(
                enabled=False,

                # the properties below are optional
                bucket="bucket",
                prefix="prefix"
            )
        )
    ),
    network_type="networkType",
    tags=[CfnTag(
        key="key",
        value="value"
    )],
    worker_configuration=kafkaconnect.CfnConnector.WorkerConfigurationProperty(
        revision=123,
        worker_configuration_arn="workerConfigurationArn"
    )
)
```

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

CfnConnectorProps cfnConnectorProps = CfnConnectorProps.builder()
        .capacity(CapacityProperty.builder()
                .autoScaling(AutoScalingProperty.builder()
                        .maxWorkerCount(123)
                        .mcuCount(123)
                        .minWorkerCount(123)
                        .scaleInPolicy(ScaleInPolicyProperty.builder()
                                .cpuUtilizationPercentage(123)
                                .build())
                        .scaleOutPolicy(ScaleOutPolicyProperty.builder()
                                .cpuUtilizationPercentage(123)
                                .build())

                        // the properties below are optional
                        .maxAutoscalingTaskCount(123)
                        .build())
                .provisionedCapacity(ProvisionedCapacityProperty.builder()
                        .mcuCount(123)
                        .workerCount(123)
                        .build())
                .build())
        .connectorConfiguration(Map.of(
                "connectorConfigurationKey", "connectorConfiguration"))
        .connectorName("connectorName")
        .kafkaCluster(KafkaClusterProperty.builder()
                .apacheKafkaCluster(ApacheKafkaClusterProperty.builder()
                        .bootstrapServers("bootstrapServers")
                        .vpc(VpcProperty.builder()
                                .securityGroups(List.of("securityGroups"))
                                .subnets(List.of("subnets"))
                                .build())
                        .build())
                .build())
        .kafkaClusterClientAuthentication(KafkaClusterClientAuthenticationProperty.builder()
                .authenticationType("authenticationType")
                .build())
        .kafkaClusterEncryptionInTransit(KafkaClusterEncryptionInTransitProperty.builder()
                .encryptionType("encryptionType")
                .build())
        .kafkaConnectVersion("kafkaConnectVersion")
        .plugins(List.of(PluginProperty.builder()
                .customPlugin(CustomPluginProperty.builder()
                        .customPluginArn("customPluginArn")
                        .revision(123)
                        .build())
                .build()))
        .serviceExecutionRoleArn("serviceExecutionRoleArn")

        // the properties below are optional
        .connectorDescription("connectorDescription")
        .logDelivery(LogDeliveryProperty.builder()
                .workerLogDelivery(WorkerLogDeliveryProperty.builder()
                        .cloudWatchLogs(CloudWatchLogsLogDeliveryProperty.builder()
                                .enabled(false)

                                // the properties below are optional
                                .logGroup("logGroup")
                                .build())
                        .firehose(FirehoseLogDeliveryProperty.builder()
                                .enabled(false)

                                // the properties below are optional
                                .deliveryStream("deliveryStream")
                                .build())
                        .s3(S3LogDeliveryProperty.builder()
                                .enabled(false)

                                // the properties below are optional
                                .bucket("bucket")
                                .prefix("prefix")
                                .build())
                        .build())
                .build())
        .networkType("networkType")
        .tags(List.of(CfnTag.builder()
                .key("key")
                .value("value")
                .build()))
        .workerConfiguration(WorkerConfigurationProperty.builder()
                .revision(123)
                .workerConfigurationArn("workerConfigurationArn")
                .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.KafkaConnect;

var cfnConnectorProps = new CfnConnectorProps {
    Capacity = new CapacityProperty {
        AutoScaling = new AutoScalingProperty {
            MaxWorkerCount = 123,
            McuCount = 123,
            MinWorkerCount = 123,
            ScaleInPolicy = new ScaleInPolicyProperty {
                CpuUtilizationPercentage = 123
            },
            ScaleOutPolicy = new ScaleOutPolicyProperty {
                CpuUtilizationPercentage = 123
            },

            // the properties below are optional
            MaxAutoscalingTaskCount = 123
        },
        ProvisionedCapacity = new ProvisionedCapacityProperty {
            McuCount = 123,
            WorkerCount = 123
        }
    },
    ConnectorConfiguration = new Dictionary<string, string> {
        { "connectorConfigurationKey", "connectorConfiguration" }
    },
    ConnectorName = "connectorName",
    KafkaCluster = new KafkaClusterProperty {
        ApacheKafkaCluster = new ApacheKafkaClusterProperty {
            BootstrapServers = "bootstrapServers",
            Vpc = new VpcProperty {
                SecurityGroups = new [] { "securityGroups" },
                Subnets = new [] { "subnets" }
            }
        }
    },
    KafkaClusterClientAuthentication = new KafkaClusterClientAuthenticationProperty {
        AuthenticationType = "authenticationType"
    },
    KafkaClusterEncryptionInTransit = new KafkaClusterEncryptionInTransitProperty {
        EncryptionType = "encryptionType"
    },
    KafkaConnectVersion = "kafkaConnectVersion",
    Plugins = new [] { new PluginProperty {
        CustomPlugin = new CustomPluginProperty {
            CustomPluginArn = "customPluginArn",
            Revision = 123
        }
    } },
    ServiceExecutionRoleArn = "serviceExecutionRoleArn",

    // the properties below are optional
    ConnectorDescription = "connectorDescription",
    LogDelivery = new LogDeliveryProperty {
        WorkerLogDelivery = new WorkerLogDeliveryProperty {
            CloudWatchLogs = new CloudWatchLogsLogDeliveryProperty {
                Enabled = false,

                // the properties below are optional
                LogGroup = "logGroup"
            },
            Firehose = new FirehoseLogDeliveryProperty {
                Enabled = false,

                // the properties below are optional
                DeliveryStream = "deliveryStream"
            },
            S3 = new S3LogDeliveryProperty {
                Enabled = false,

                // the properties below are optional
                Bucket = "bucket",
                Prefix = "prefix"
            }
        }
    },
    NetworkType = "networkType",
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } },
    WorkerConfiguration = new WorkerConfigurationProperty {
        Revision = 123,
        WorkerConfigurationArn = "workerConfigurationArn"
    }
};
```

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"

cfnConnectorProps := &CfnConnectorProps{
	Capacity: &CapacityProperty{
		AutoScaling: &AutoScalingProperty{
			MaxWorkerCount: jsii.Number(123),
			McuCount: jsii.Number(123),
			MinWorkerCount: jsii.Number(123),
			ScaleInPolicy: &ScaleInPolicyProperty{
				CpuUtilizationPercentage: jsii.Number(123),
			},
			ScaleOutPolicy: &ScaleOutPolicyProperty{
				CpuUtilizationPercentage: jsii.Number(123),
			},

			// the properties below are optional
			MaxAutoscalingTaskCount: jsii.Number(123),
		},
		ProvisionedCapacity: &ProvisionedCapacityProperty{
			McuCount: jsii.Number(123),
			WorkerCount: jsii.Number(123),
		},
	},
	ConnectorConfiguration: map[string]*string{
		"connectorConfigurationKey": jsii.String("connectorConfiguration"),
	},
	ConnectorName: jsii.String("connectorName"),
	KafkaCluster: &KafkaClusterProperty{
		ApacheKafkaCluster: &ApacheKafkaClusterProperty{
			BootstrapServers: jsii.String("bootstrapServers"),
			Vpc: &VpcProperty{
				SecurityGroups: []*string{
					jsii.String("securityGroups"),
				},
				Subnets: []*string{
					jsii.String("subnets"),
				},
			},
		},
	},
	KafkaClusterClientAuthentication: &KafkaClusterClientAuthenticationProperty{
		AuthenticationType: jsii.String("authenticationType"),
	},
	KafkaClusterEncryptionInTransit: &KafkaClusterEncryptionInTransitProperty{
		EncryptionType: jsii.String("encryptionType"),
	},
	KafkaConnectVersion: jsii.String("kafkaConnectVersion"),
	Plugins: []interface{}{
		&PluginProperty{
			CustomPlugin: &CustomPluginProperty{
				CustomPluginArn: jsii.String("customPluginArn"),
				Revision: jsii.Number(123),
			},
		},
	},
	ServiceExecutionRoleArn: jsii.String("serviceExecutionRoleArn"),

	// the properties below are optional
	ConnectorDescription: jsii.String("connectorDescription"),
	LogDelivery: &LogDeliveryProperty{
		WorkerLogDelivery: &WorkerLogDeliveryProperty{
			CloudWatchLogs: &CloudWatchLogsLogDeliveryProperty{
				Enabled: jsii.Boolean(false),

				// the properties below are optional
				LogGroup: jsii.String("logGroup"),
			},
			Firehose: &FirehoseLogDeliveryProperty{
				Enabled: jsii.Boolean(false),

				// the properties below are optional
				DeliveryStream: jsii.String("deliveryStream"),
			},
			S3: &S3LogDeliveryProperty{
				Enabled: jsii.Boolean(false),

				// the properties below are optional
				Bucket: jsii.String("bucket"),
				Prefix: jsii.String("prefix"),
			},
		},
	},
	NetworkType: jsii.String("networkType"),
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
	WorkerConfiguration: &WorkerConfigurationProperty{
		Revision: jsii.Number(123),
		WorkerConfigurationArn: jsii.String("workerConfigurationArn"),
	},
}
```

## Properties

- `capacity`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnConnector.CapacityProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_kafkaconnect.CfnConnector.CapacityProperty.html) (required) — The connector's compute capacity settings.

- `connectorConfiguration`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | { [key: string]: string } (required) — The configuration of the connector.

- `connectorDescription`: string — The description of the connector.

- `connectorName`: string (required) — The name of the connector.

  The connector name must be unique and can include up to 128 characters. Valid characters you can include in a connector name are: a-z, A-Z, 0-9, and -.

- `kafkaCluster`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnConnector.KafkaClusterProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_kafkaconnect.CfnConnector.KafkaClusterProperty.html) (required) — The details of the Apache Kafka cluster to which the connector is connected.

- `kafkaClusterClientAuthentication`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnConnector.KafkaClusterClientAuthenticationProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_kafkaconnect.CfnConnector.KafkaClusterClientAuthenticationProperty.html) (required) — The type of client authentication used to connect to the Apache Kafka cluster.

  The value is NONE when no client authentication is used.

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

- `kafkaConnectVersion`: string (required) — The version of Kafka Connect.

  It has to be compatible with both the Apache Kafka cluster's version and the plugins.

- `logDelivery`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnConnector.LogDeliveryProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_kafkaconnect.CfnConnector.LogDeliveryProperty.html) — The settings for delivering connector logs to Amazon CloudWatch Logs.

- `networkType`: string — The network type of the connector.

  It gives connectors connectivity to either IPv4 (IPV4) or IPv4 and IPv6 (DUAL) destinations. Defaults to IPV4.

- `plugins`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnConnector.PluginProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_kafkaconnect.CfnConnector.PluginProperty.html)[] (required) — Specifies which plugin to use for the connector.

  You must specify a single-element list. Amazon MSK Connect does not currently support specifying multiple plugins.

- `serviceExecutionRoleArn`: string (required) — The Amazon Resource Name (ARN) of the IAM role used by the connector to access Amazon Web Services resources.

- `tags`: [CfnTag](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.CfnTag.html)[] — A collection of tags associated with a resource.

- `workerConfiguration`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnConnector.WorkerConfigurationProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_kafkaconnect.CfnConnector.WorkerConfigurationProperty.html) — The worker configurations that are in use with the connector.
