Connector class
Provides an Amazon MSK Connect Connector resource.
Example Usage
Basic configuration
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.mskconnect.Connector("example", {
capacity: {
autoscaling: {
scaleInPolicy: {
cpuUtilizationPercentage: 20,
},
scaleOutPolicy: {
cpuUtilizationPercentage: 80,
},
mcuCount: 1,
minWorkerCount: 1,
maxWorkerCount: 2,
},
},
kafkaCluster: {
apacheKafkaCluster: {
vpc: {
securityGroups: [exampleAwsSecurityGroup.id],
subnets: [
example1.id,
example2.id,
example3.id,
],
},
bootstrapServers: exampleAwsMskCluster.bootstrapBrokersTls,
},
},
kafkaClusterClientAuthentication: {
authenticationType: "NONE",
},
kafkaClusterEncryptionInTransit: {
encryptionType: "TLS",
},
plugins: [{
customPlugin: {
arn: exampleAwsMskconnectCustomPlugin.arn,
revision: Number(exampleAwsMskconnectCustomPlugin.latestRevision),
},
}],
name: "example",
kafkaconnectVersion: "2.7.1",
connectorConfiguration: {
"connector.class": "com.github.jcustenborder.kafka.connect.simulator.SimulatorSinkConnector",
"tasks.max": "1",
topics: "example",
},
serviceExecutionRoleArn: exampleAwsIamRole.arn,
});
import pulumi
import pulumi_aws as aws
example = aws.mskconnect.Connector("example",
capacity={
"autoscaling": {
"scale_in_policy": {
"cpu_utilization_percentage": 20,
},
"scale_out_policy": {
"cpu_utilization_percentage": 80,
},
"mcu_count": 1,
"min_worker_count": 1,
"max_worker_count": 2,
},
},
kafka_cluster={
"apache_kafka_cluster": {
"vpc": {
"security_groups": [example_aws_security_group["id"]],
"subnets": [
example1["id"],
example2["id"],
example3["id"],
],
},
"bootstrap_servers": example_aws_msk_cluster["bootstrapBrokersTls"],
},
},
kafka_cluster_client_authentication={
"authentication_type": "NONE",
},
kafka_cluster_encryption_in_transit={
"encryption_type": "TLS",
},
plugins=[{
"custom_plugin": {
"arn": example_aws_mskconnect_custom_plugin["arn"],
"revision": int(example_aws_mskconnect_custom_plugin["latestRevision"]),
},
}],
name="example",
kafkaconnect_version="2.7.1",
connector_configuration={
"connector.class": "com.github.jcustenborder.kafka.connect.simulator.SimulatorSinkConnector",
"tasks.max": "1",
"topics": "example",
},
service_execution_role_arn=example_aws_iam_role["arn"])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.MskConnect.Connector("example", new()
{
Capacity = new Aws.MskConnect.Inputs.ConnectorCapacityArgs
{
Autoscaling = new Aws.MskConnect.Inputs.ConnectorCapacityAutoscalingArgs
{
ScaleInPolicy = new Aws.MskConnect.Inputs.ConnectorCapacityAutoscalingScaleInPolicyArgs
{
CpuUtilizationPercentage = 20,
},
ScaleOutPolicy = new Aws.MskConnect.Inputs.ConnectorCapacityAutoscalingScaleOutPolicyArgs
{
CpuUtilizationPercentage = 80,
},
McuCount = 1,
MinWorkerCount = 1,
MaxWorkerCount = 2,
},
},
KafkaCluster = new Aws.MskConnect.Inputs.ConnectorKafkaClusterArgs
{
ApacheKafkaCluster = new Aws.MskConnect.Inputs.ConnectorKafkaClusterApacheKafkaClusterArgs
{
Vpc = new Aws.MskConnect.Inputs.ConnectorKafkaClusterApacheKafkaClusterVpcArgs
{
SecurityGroups = new[]
{
exampleAwsSecurityGroup.Id,
},
Subnets = new[]
{
example1.Id,
example2.Id,
example3.Id,
},
},
BootstrapServers = exampleAwsMskCluster.BootstrapBrokersTls,
},
},
KafkaClusterClientAuthentication = new Aws.MskConnect.Inputs.ConnectorKafkaClusterClientAuthenticationArgs
{
AuthenticationType = "NONE",
},
KafkaClusterEncryptionInTransit = new Aws.MskConnect.Inputs.ConnectorKafkaClusterEncryptionInTransitArgs
{
EncryptionType = "TLS",
},
Plugins = new[]
{
new Aws.MskConnect.Inputs.ConnectorPluginArgs
{
CustomPlugin = new Aws.MskConnect.Inputs.ConnectorPluginCustomPluginArgs
{
Arn = exampleAwsMskconnectCustomPlugin.Arn,
Revision = exampleAwsMskconnectCustomPlugin.LatestRevision,
},
},
},
Name = "example",
KafkaconnectVersion = "2.7.1",
ConnectorConfiguration =
{
{ "connector.class", "com.github.jcustenborder.kafka.connect.simulator.SimulatorSinkConnector" },
{ "tasks.max", "1" },
{ "topics", "example" },
},
ServiceExecutionRoleArn = exampleAwsIamRole.Arn,
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/mskconnect"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := mskconnect.NewConnector(ctx, "example", &mskconnect.ConnectorArgs{
Capacity: &mskconnect.ConnectorCapacityArgs{
Autoscaling: &mskconnect.ConnectorCapacityAutoscalingArgs{
ScaleInPolicy: &mskconnect.ConnectorCapacityAutoscalingScaleInPolicyArgs{
CpuUtilizationPercentage: pulumi.Int(20),
},
ScaleOutPolicy: &mskconnect.ConnectorCapacityAutoscalingScaleOutPolicyArgs{
CpuUtilizationPercentage: pulumi.Int(80),
},
McuCount: pulumi.Int(1),
MinWorkerCount: pulumi.Int(1),
MaxWorkerCount: pulumi.Int(2),
},
},
KafkaCluster: &mskconnect.ConnectorKafkaClusterArgs{
ApacheKafkaCluster: &mskconnect.ConnectorKafkaClusterApacheKafkaClusterArgs{
Vpc: &mskconnect.ConnectorKafkaClusterApacheKafkaClusterVpcArgs{
SecurityGroups: pulumi.StringArray{
exampleAwsSecurityGroup.Id,
},
Subnets: pulumi.StringArray{
example1.Id,
example2.Id,
example3.Id,
},
},
BootstrapServers: pulumi.Any(exampleAwsMskCluster.BootstrapBrokersTls),
},
},
KafkaClusterClientAuthentication: &mskconnect.ConnectorKafkaClusterClientAuthenticationArgs{
AuthenticationType: pulumi.String("NONE"),
},
KafkaClusterEncryptionInTransit: &mskconnect.ConnectorKafkaClusterEncryptionInTransitArgs{
EncryptionType: pulumi.String("TLS"),
},
Plugins: mskconnect.ConnectorPluginArray{
&mskconnect.ConnectorPluginArgs{
CustomPlugin: &mskconnect.ConnectorPluginCustomPluginArgs{
Arn: pulumi.Any(exampleAwsMskconnectCustomPlugin.Arn),
Revision: pulumi.Any(exampleAwsMskconnectCustomPlugin.LatestRevision),
},
},
},
Name: pulumi.String("example"),
KafkaconnectVersion: pulumi.String("2.7.1"),
ConnectorConfiguration: pulumi.StringMap{
"connector.class": pulumi.String("com.github.jcustenborder.kafka.connect.simulator.SimulatorSinkConnector"),
"tasks.max": pulumi.String("1"),
"topics": pulumi.String("example"),
},
ServiceExecutionRoleArn: pulumi.Any(exampleAwsIamRole.Arn),
})
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
resource "aws_mskconnect_connector" "example" {
capacity = {
autoscaling = {
scale_in_policy = {
cpu_utilization_percentage = 20
}
scale_out_policy = {
cpu_utilization_percentage = 80
}
mcu_count = 1
min_worker_count = 1
max_worker_count = 2
}
}
kafka_cluster = {
apache_kafka_cluster = {
vpc = {
security_groups = [exampleAwsSecurityGroup.id]
subnets = [example1.id, example2.id, example3.id]
}
bootstrap_servers = exampleAwsMskCluster.bootstrapBrokersTls
}
}
kafka_cluster_client_authentication = {
authentication_type = "NONE"
}
kafka_cluster_encryption_in_transit = {
encryption_type = "TLS"
}
plugins {
custom_plugin = {
arn = exampleAwsMskconnectCustomPlugin.arn
revision = exampleAwsMskconnectCustomPlugin.latestRevision
}
}
name = "example"
kafkaconnect_version = "2.7.1"
connector_configuration = {
"connector.class" = "com.github.jcustenborder.kafka.connect.simulator.SimulatorSinkConnector"
"tasks.max" = "1"
"topics" = "example"
}
service_execution_role_arn = exampleAwsIamRole.arn
}
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.ArrayList;
import java.util.Arrays;
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()
.capacity(ConnectorCapacityArgs.builder()
.autoscaling(ConnectorCapacityAutoscalingArgs.builder()
.scaleInPolicy(ConnectorCapacityAutoscalingScaleInPolicyArgs.builder()
.cpuUtilizationPercentage(20)
.build())
.scaleOutPolicy(ConnectorCapacityAutoscalingScaleOutPolicyArgs.builder()
.cpuUtilizationPercentage(80)
.build())
.mcuCount(1)
.minWorkerCount(1)
.maxWorkerCount(2)
.build())
.build())
.kafkaCluster(ConnectorKafkaClusterArgs.builder()
.apacheKafkaCluster(ConnectorKafkaClusterApacheKafkaClusterArgs.builder()
.vpc(ConnectorKafkaClusterApacheKafkaClusterVpcArgs.builder()
.securityGroups(exampleAwsSecurityGroup.id())
.subnets(
example1.id(),
example2.id(),
example3.id())
.build())
.bootstrapServers(exampleAwsMskCluster.bootstrapBrokersTls())
.build())
.build())
.kafkaClusterClientAuthentication(ConnectorKafkaClusterClientAuthenticationArgs.builder()
.authenticationType("NONE")
.build())
.kafkaClusterEncryptionInTransit(ConnectorKafkaClusterEncryptionInTransitArgs.builder()
.encryptionType("TLS")
.build())
.plugins(ConnectorPluginArgs.builder()
.customPlugin(ConnectorPluginCustomPluginArgs.builder()
.arn(exampleAwsMskconnectCustomPlugin.arn())
.revision(exampleAwsMskconnectCustomPlugin.latestRevision())
.build())
.build())
.name("example")
.kafkaconnectVersion("2.7.1")
.connectorConfiguration(Map.ofEntries(
Map.entry("connector.class", "com.github.jcustenborder.kafka.connect.simulator.SimulatorSinkConnector"),
Map.entry("tasks.max", "1"),
Map.entry("topics", "example")
))
.serviceExecutionRoleArn(exampleAwsIamRole.arn())
.build());
}
}
resources:
example:
type: aws:mskconnect:Connector
properties:
capacity:
autoscaling:
scaleInPolicy:
cpuUtilizationPercentage: 20
scaleOutPolicy:
cpuUtilizationPercentage: 80
mcuCount: 1
minWorkerCount: 1
maxWorkerCount: 2
kafkaCluster:
apacheKafkaCluster:
vpc:
securityGroups:
- ${exampleAwsSecurityGroup.id}
subnets:
- ${example1.id}
- ${example2.id}
- ${example3.id}
bootstrapServers: ${exampleAwsMskCluster.bootstrapBrokersTls}
kafkaClusterClientAuthentication:
authenticationType: NONE
kafkaClusterEncryptionInTransit:
encryptionType: TLS
plugins:
- customPlugin:
arn: ${exampleAwsMskconnectCustomPlugin.arn}
revision: ${exampleAwsMskconnectCustomPlugin.latestRevision}
name: example
kafkaconnectVersion: 2.7.1
connectorConfiguration:
connector.class: com.github.jcustenborder.kafka.connect.simulator.SimulatorSinkConnector
tasks.max: '1'
topics: example
serviceExecutionRoleArn: ${exampleAwsIamRole.arn}
Import
Using pulumi import, import MSK Connect Connector using the connector's arn. For example:
$ pulumi import aws:mskconnect/connector:Connector example 'arn:aws:kafkaconnect:eu-central-1:123456789012:connector/example/264edee4-17a3-412e-bd76-6681cfc93805-3'
Constructors
- Connector(String name, {ConnectorArgs? args, CustomResourceOptions? options})
-
Creates a new Connector.
nameThe Pulumi resource name.argsArguments used to configure this Connector. The set of arguments for Connector.optionsResource options controlling this resource's behavior. - Connector.reference(String urn)
- Creates a typed reference to an existing Connector resource.
Properties
-
arn
↔ Output<
String> -
ARN of the connector.
latefinal
-
capacity
↔ Output<
ConnectorCapacity> -
Information about the capacity allocated to the connector. See
capacityBlock for details.latefinal -
childResources
→ Set<
Resource> -
finalinherited
-
completionSources
↔ Map<
String, IOutputCompletionSource> -
latefinalinherited
-
connectorConfiguration
↔ Output<
Map< String, String> > -
A map of keys to values that represent the configuration for the connector.
latefinal
-
description
↔ Output<
String?> -
A summary description of the connector.
latefinal
- hashCode → int
-
The hash code for this object.
no setterinherited
-
id
↔ Output<
String> -
getter/setter pairinherited
- isCustom → bool
-
Returns whether this resource is provider-managed.
no setterinherited
- isProtected → bool
-
Returns whether this resource is protected from deletion.
no setterinherited
- isRemote → bool
-
Whether this resource is registered as remote.
no setterinherited
- isResourceReference → bool
-
Whether this instance represents a resource value returned over RPC.
finalinherited
-
kafkaCluster
↔ Output<
ConnectorKafkaCluster> -
Specifies which Apache Kafka cluster to connect to. See
kafkaClusterBlock for details.latefinal -
kafkaClusterClientAuthentication
↔ Output<
ConnectorKafkaClusterClientAuthentication> -
Details of the client authentication used by the Apache Kafka cluster. See
kafkaClusterClientAuthenticationBlock for details.latefinal -
kafkaClusterEncryptionInTransit
↔ Output<
ConnectorKafkaClusterEncryptionInTransit> -
Details of encryption in transit to the Apache Kafka cluster. See
kafkaClusterEncryptionInTransitBlock for details.latefinal -
kafkaconnectVersion
↔ Output<
String> -
The version of Kafka Connect. It has to be compatible with both the Apache Kafka cluster's version and the plugins.
latefinal
-
logDelivery
↔ Output<
ConnectorLogDelivery?> -
Details about log delivery. See
logDeliveryBlock for details.latefinal -
name
↔ Output<
String> -
The name of the connector.
latefinal
-
plugins
↔ Output<
List< ConnectorPlugin> > -
Specifies which plugins to use for the connector. See
pluginBlock for details.latefinal -
region
↔ Output<
String> -
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
latefinal
-
resourceTransforms
→ List<
ResourceTransform> -
Inherited/explicit async transforms.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
serviceExecutionRoleArn
↔ Output<
String> -
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.
latefinal
-
A map of tags to assign to the resource. If configured with a provider
defaultTagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.latefinal -
A map of tags assigned to the resource, including those inherited from the provider
defaultTagsconfiguration block.latefinal -
transformations
→ List<
ResourceTransformation> -
Inherited/explicit legacy transformations.
no setterinherited
-
urn
↔ Output<
String> -
latefinalinherited
-
version
↔ Output<
String> -
The current version of the connector.
latefinal
-
workerConfiguration
↔ Output<
ConnectorWorkerConfiguration?> -
Specifies which worker configuration to use with the connector. See
workerConfigurationBlock for details.latefinal
Methods
-
failId(
Object error) → void -
Completes this resource ID with an error when registration fails.
inherited
-
failOutputs(
Object error) → void -
Completes all output properties with
error.inherited -
failUrn(
Object error) → void -
Completes this resource URN with an error when registration fails.
inherited
-
getProvider(
String moduleMember) → ProviderResource? -
Returns provider for
moduleMember's package, if configured.inherited -
getResourceName(
) → String -
Returns this resource's logical name.
inherited
-
getResourceType(
) → String -
Returns this resource's Pulumi type token.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerOutput<
T> (String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output< T> -
Registers a dynamic output property for this resource.
inherited
-
resolveId(
String? value, {required bool isKnown}) → void -
Resolves the provider-assigned ID for this resource.
inherited
-
resolveOutputs(
Struct outputs) → void -
Resolves all output properties from a monitor response payload.
inherited
-
resolveUrn(
String value) → void -
Resolves this resource's URN once assigned by the engine.
inherited
-
serializeProperties(
Map< String, dynamic> properties) → Future<Struct> -
Serializes resource properties for RPC transmission.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited