Ready to level-up your engineering skills? Join a Pulumi Workshop. Register Now

KafkaConnector

# Kafka connectors Resource

The Kafka connectors resource allows the creation and management of Aiven Kafka connectors.

Example Usage

using Pulumi;
using Aiven = Pulumi.Aiven;

class MyStack : Stack
{
    public MyStack()
    {
        var kafka_es_con1 = new Aiven.KafkaConnector("kafka-es-con1", new Aiven.KafkaConnectorArgs
        {
            Project = aiven_project.Kafka_con_project1.Project,
            ServiceName = aiven_service.Kafka_service1.Service_name,
            ConnectorName = "kafka-es-con1",
            Config = 
            {
                { "topics", aiven_kafka_topic.Kafka_topic1.Topic_name },
                { "connector.class", "io.aiven.connect.elasticsearch.ElasticsearchSinkConnector" },
                { "type.name", "es-connector" },
                { "name", "kafka-es-con1" },
                { "connection.url", aiven_service.Es_service1.Service_uri },
            },
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-aiven/sdk/v3/go/aiven"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := aiven.NewKafkaConnector(ctx, "kafka_es_con1", &aiven.KafkaConnectorArgs{
            Project:       pulumi.Any(aiven_project.Kafka - con - project1.Project),
            ServiceName:   pulumi.Any(aiven_service.Kafka - service1.Service_name),
            ConnectorName: pulumi.String("kafka-es-con1"),
            Config: pulumi.StringMap{
                "topics":          pulumi.Any(aiven_kafka_topic.Kafka - topic1.Topic_name),
                "connector.class": pulumi.String("io.aiven.connect.elasticsearch.ElasticsearchSinkConnector"),
                "type.name":       pulumi.String("es-connector"),
                "name":            pulumi.String("kafka-es-con1"),
                "connection.url":  pulumi.Any(aiven_service.Es - service1.Service_uri),
            },
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aiven as aiven

kafka_es_con1 = aiven.KafkaConnector("kafka-es-con1",
    project=aiven_project["kafka-con-project1"]["project"],
    service_name=aiven_service["kafka-service1"]["service_name"],
    connector_name="kafka-es-con1",
    config={
        "topics": aiven_kafka_topic["kafka-topic1"]["topic_name"],
        "connector.class": "io.aiven.connect.elasticsearch.ElasticsearchSinkConnector",
        "type.name": "es-connector",
        "name": "kafka-es-con1",
        "connection.url": aiven_service["es-service1"]["service_uri"],
    })
import * as pulumi from "@pulumi/pulumi";
import * as aiven from "@pulumi/aiven";

const kafka_es_con1 = new aiven.KafkaConnector("kafka-es-con1", {
    project: aiven_project["kafka-con-project1"].project,
    serviceName: aiven_service["kafka-service1"].service_name,
    connectorName: "kafka-es-con1",
    config: {
        topics: aiven_kafka_topic["kafka-topic1"].topic_name,
        "connector.class": "io.aiven.connect.elasticsearch.ElasticsearchSinkConnector",
        "type.name": "es-connector",
        name: "kafka-es-con1",
        "connection.url": aiven_service["es-service1"].service_uri,
    },
});

Create a KafkaConnector Resource

new KafkaConnector(name: string, args: KafkaConnectorArgs, opts?: CustomResourceOptions);
def KafkaConnector(resource_name: str, opts: Optional[ResourceOptions] = None, config: Optional[Mapping[str, str]] = None, connector_name: Optional[str] = None, project: Optional[str] = None, service_name: Optional[str] = None)
func NewKafkaConnector(ctx *Context, name string, args KafkaConnectorArgs, opts ...ResourceOption) (*KafkaConnector, error)
public KafkaConnector(string name, KafkaConnectorArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args KafkaConnectorArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args KafkaConnectorArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args KafkaConnectorArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

KafkaConnector Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The KafkaConnector resource accepts the following input properties:

Config Dictionary<string, string>

Kafka Connector configuration parameters

ConnectorName string

Kafka connector name

Project string

Project to link the kafka connector to

ServiceName string

Service to link the kafka connector to

Config map[string]string

Kafka Connector configuration parameters

ConnectorName string

Kafka connector name

Project string

Project to link the kafka connector to

ServiceName string

Service to link the kafka connector to

config {[key: string]: string}

Kafka Connector configuration parameters

connectorName string

Kafka connector name

project string

Project to link the kafka connector to

serviceName string

Service to link the kafka connector to

config Mapping[str, str]

Kafka Connector configuration parameters

connector_name str

Kafka connector name

project str

Project to link the kafka connector to

service_name str

Service to link the kafka connector to

Outputs

All input properties are implicitly available as output properties. Additionally, the KafkaConnector resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
PluginAuthor string

Kafka connector author.

PluginClass string

Kafka connector Java class.

PluginDocUrl string

Kafka connector documentation URL.

PluginTitle string

Kafka connector title.

PluginType string

Kafka connector type.

PluginVersion string

Kafka connector version.

Tasks List<KafkaConnectorTask>

List of tasks of a connector, each element contains connector (Related connector name) and task (Task id / number).

Id string
The provider-assigned unique ID for this managed resource.
PluginAuthor string

Kafka connector author.

PluginClass string

Kafka connector Java class.

PluginDocUrl string

Kafka connector documentation URL.

PluginTitle string

Kafka connector title.

PluginType string

Kafka connector type.

PluginVersion string

Kafka connector version.

Tasks []KafkaConnectorTask

List of tasks of a connector, each element contains connector (Related connector name) and task (Task id / number).

id string
The provider-assigned unique ID for this managed resource.
pluginAuthor string

Kafka connector author.

pluginClass string

Kafka connector Java class.

pluginDocUrl string

Kafka connector documentation URL.

pluginTitle string

Kafka connector title.

pluginType string

Kafka connector type.

pluginVersion string

Kafka connector version.

tasks KafkaConnectorTask[]

List of tasks of a connector, each element contains connector (Related connector name) and task (Task id / number).

id str
The provider-assigned unique ID for this managed resource.
plugin_author str

Kafka connector author.

plugin_class str

Kafka connector Java class.

plugin_doc_url str

Kafka connector documentation URL.

plugin_title str

Kafka connector title.

plugin_type str

Kafka connector type.

plugin_version str

Kafka connector version.

tasks Sequence[KafkaConnectorTask]

List of tasks of a connector, each element contains connector (Related connector name) and task (Task id / number).

Look up an Existing KafkaConnector Resource

Get an existing KafkaConnector resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: KafkaConnectorState, opts?: CustomResourceOptions): KafkaConnector
@staticmethod
def get(resource_name: str, id: str, opts: Optional[ResourceOptions] = None, config: Optional[Mapping[str, str]] = None, connector_name: Optional[str] = None, plugin_author: Optional[str] = None, plugin_class: Optional[str] = None, plugin_doc_url: Optional[str] = None, plugin_title: Optional[str] = None, plugin_type: Optional[str] = None, plugin_version: Optional[str] = None, project: Optional[str] = None, service_name: Optional[str] = None, tasks: Optional[Sequence[KafkaConnectorTaskArgs]] = None) -> KafkaConnector
func GetKafkaConnector(ctx *Context, name string, id IDInput, state *KafkaConnectorState, opts ...ResourceOption) (*KafkaConnector, error)
public static KafkaConnector Get(string name, Input<string> id, KafkaConnectorState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

Config Dictionary<string, string>

Kafka Connector configuration parameters

ConnectorName string

Kafka connector name

PluginAuthor string

Kafka connector author.

PluginClass string

Kafka connector Java class.

PluginDocUrl string

Kafka connector documentation URL.

PluginTitle string

Kafka connector title.

PluginType string

Kafka connector type.

PluginVersion string

Kafka connector version.

Project string

Project to link the kafka connector to

ServiceName string

Service to link the kafka connector to

Tasks List<KafkaConnectorTaskArgs>

List of tasks of a connector, each element contains connector (Related connector name) and task (Task id / number).

Config map[string]string

Kafka Connector configuration parameters

ConnectorName string

Kafka connector name

PluginAuthor string

Kafka connector author.

PluginClass string

Kafka connector Java class.

PluginDocUrl string

Kafka connector documentation URL.

PluginTitle string

Kafka connector title.

PluginType string

Kafka connector type.

PluginVersion string

Kafka connector version.

Project string

Project to link the kafka connector to

ServiceName string

Service to link the kafka connector to

Tasks []KafkaConnectorTask

List of tasks of a connector, each element contains connector (Related connector name) and task (Task id / number).

config {[key: string]: string}

Kafka Connector configuration parameters

connectorName string

Kafka connector name

pluginAuthor string

Kafka connector author.

pluginClass string

Kafka connector Java class.

pluginDocUrl string

Kafka connector documentation URL.

pluginTitle string

Kafka connector title.

pluginType string

Kafka connector type.

pluginVersion string

Kafka connector version.

project string

Project to link the kafka connector to

serviceName string

Service to link the kafka connector to

tasks KafkaConnectorTask[]

List of tasks of a connector, each element contains connector (Related connector name) and task (Task id / number).

config Mapping[str, str]

Kafka Connector configuration parameters

connector_name str

Kafka connector name

plugin_author str

Kafka connector author.

plugin_class str

Kafka connector Java class.

plugin_doc_url str

Kafka connector documentation URL.

plugin_title str

Kafka connector title.

plugin_type str

Kafka connector type.

plugin_version str

Kafka connector version.

project str

Project to link the kafka connector to

service_name str

Service to link the kafka connector to

tasks Sequence[KafkaConnectorTaskArgs]

List of tasks of a connector, each element contains connector (Related connector name) and task (Task id / number).

Supporting Types

KafkaConnectorTask

Connector string
Task int

List of tasks of a connector, each element contains connector (Related connector name) and task (Task id / number).

Connector string
Task int

List of tasks of a connector, each element contains connector (Related connector name) and task (Task id / number).

connector string
task number

List of tasks of a connector, each element contains connector (Related connector name) and task (Task id / number).

connector str
task int

List of tasks of a connector, each element contains connector (Related connector name) and task (Task id / number).

Package Details

Repository
https://github.com/pulumi/pulumi-aiven
License
Apache-2.0
Notes
This Pulumi package is based on the aiven Terraform Provider.