Connector

class Connector : KotlinCustomResource

Provides an Amazon MSK Connect Connector resource.

Example Usage

Basic configuration

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.mskconnect.Connector;
import com.pulumi.aws.mskconnect.ConnectorArgs;
import com.pulumi.aws.mskconnect.inputs.ConnectorCapacityArgs;
import com.pulumi.aws.mskconnect.inputs.ConnectorCapacityAutoscalingArgs;
import com.pulumi.aws.mskconnect.inputs.ConnectorCapacityAutoscalingScaleInPolicyArgs;
import com.pulumi.aws.mskconnect.inputs.ConnectorCapacityAutoscalingScaleOutPolicyArgs;
import com.pulumi.aws.mskconnect.inputs.ConnectorKafkaClusterArgs;
import com.pulumi.aws.mskconnect.inputs.ConnectorKafkaClusterApacheKafkaClusterArgs;
import com.pulumi.aws.mskconnect.inputs.ConnectorKafkaClusterApacheKafkaClusterVpcArgs;
import com.pulumi.aws.mskconnect.inputs.ConnectorKafkaClusterClientAuthenticationArgs;
import com.pulumi.aws.mskconnect.inputs.ConnectorKafkaClusterEncryptionInTransitArgs;
import com.pulumi.aws.mskconnect.inputs.ConnectorPluginArgs;
import com.pulumi.aws.mskconnect.inputs.ConnectorPluginCustomPluginArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new Connector("example", ConnectorArgs.builder()
.kafkaconnectVersion("2.7.1")
.capacity(ConnectorCapacityArgs.builder()
.autoscaling(ConnectorCapacityAutoscalingArgs.builder()
.mcuCount(1)
.minWorkerCount(1)
.maxWorkerCount(2)
.scaleInPolicy(ConnectorCapacityAutoscalingScaleInPolicyArgs.builder()
.cpuUtilizationPercentage(20)
.build())
.scaleOutPolicy(ConnectorCapacityAutoscalingScaleOutPolicyArgs.builder()
.cpuUtilizationPercentage(80)
.build())
.build())
.build())
.connectorConfiguration(Map.ofEntries(
Map.entry("connector.class", "com.github.jcustenborder.kafka.connect.simulator.SimulatorSinkConnector"),
Map.entry("tasks.max", "1"),
Map.entry("topics", "example")
))
.kafkaCluster(ConnectorKafkaClusterArgs.builder()
.apacheKafkaCluster(ConnectorKafkaClusterApacheKafkaClusterArgs.builder()
.bootstrapServers(aws_msk_cluster.example().bootstrap_brokers_tls())
.vpc(ConnectorKafkaClusterApacheKafkaClusterVpcArgs.builder()
.securityGroups(aws_security_group.example().id())
.subnets(
aws_subnet.example1().id(),
aws_subnet.example2().id(),
aws_subnet.example3().id())
.build())
.build())
.build())
.kafkaClusterClientAuthentication(ConnectorKafkaClusterClientAuthenticationArgs.builder()
.authenticationType("NONE")
.build())
.kafkaClusterEncryptionInTransit(ConnectorKafkaClusterEncryptionInTransitArgs.builder()
.encryptionType("TLS")
.build())
.plugins(ConnectorPluginArgs.builder()
.customPlugin(ConnectorPluginCustomPluginArgs.builder()
.arn(aws_mskconnect_custom_plugin.example().arn())
.revision(aws_mskconnect_custom_plugin.example().latest_revision())
.build())
.build())
.serviceExecutionRoleArn(aws_iam_role.example().arn())
.build());
}
}

Import

MSK Connect Connector can be imported using the connector's arn, e.g.,

$ pulumi import aws:mskconnect/connector:Connector example 'arn:aws:kafkaconnect:eu-central-1:123456789012:connector/example/264edee4-17a3-412e-bd76-6681cfc93805-3'

Properties

Link copied to clipboard
val arn: Output<String>

The Amazon Resource Name (ARN) of the custom plugin.

Link copied to clipboard

Information about the capacity allocated to the connector. See below.

Link copied to clipboard

A map of keys to values that represent the configuration for the connector.

Link copied to clipboard
val description: Output<String>?

A summary description of the connector.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard

Specifies which Apache Kafka cluster to connect to. See below.

Link copied to clipboard

Details of the client authentication used by the Apache Kafka cluster. See below.

Link copied to clipboard

Details of encryption in transit to the Apache Kafka cluster. See below.

Link copied to clipboard

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

Link copied to clipboard

Details about log delivery. See below.

Link copied to clipboard
val name: Output<String>

The name of the connector.

Link copied to clipboard

Specifies which plugins to use for the connector. See below.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The Amazon Resource Name (ARN) of the IAM role used by the connector to access the Amazon Web Services resources that it needs. The types of resources depends on the logic of the connector. For example, a connector that has Amazon S3 as a destination must have permissions that allow it to write to the S3 destination bucket.

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard
val version: Output<String>

The current version of the connector.

Link copied to clipboard

Specifies which worker configuration to use with the connector. See below.