Skip to content
v2.276.0

SelfManagedKafkaEventSourceConfigProperty Struct ​

Specific configuration settings for a self-managed Apache Kafka event source.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_lambda as lambda } from 'aws-cdk-lib';
const selfManagedKafkaEventSourceConfigProperty: lambda.CfnEventSourceMapping.SelfManagedKafkaEventSourceConfigProperty = {
  consumerGroupId: 'consumerGroupId',
  consumptionMode: 'consumptionMode',
  schemaRegistryConfig: {
    accessConfigs: [{
      type: 'type',
      uri: 'uri',
    }],
    eventRecordFormat: 'eventRecordFormat',
    schemaRegistryUri: 'schemaRegistryUri',
    schemaValidationConfigs: [{
      attribute: 'attribute',
    }],
  },
};
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_lambda as lambda_

self_managed_kafka_event_source_config_property = lambda.CfnEventSourceMapping.SelfManagedKafkaEventSourceConfigProperty(
    consumer_group_id="consumerGroupId",
    consumption_mode="consumptionMode",
    schema_registry_config=lambda.CfnEventSourceMapping.SchemaRegistryConfigProperty(
        access_configs=[lambda.CfnEventSourceMapping.SchemaRegistryAccessConfigProperty(
            type="type",
            uri="uri"
        )],
        event_record_format="eventRecordFormat",
        schema_registry_uri="schemaRegistryUri",
        schema_validation_configs=[lambda.CfnEventSourceMapping.SchemaValidationConfigProperty(
            attribute="attribute"
        )]
    )
)
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.lambda.*;

SelfManagedKafkaEventSourceConfigProperty selfManagedKafkaEventSourceConfigProperty = SelfManagedKafkaEventSourceConfigProperty.builder()
        .consumerGroupId("consumerGroupId")
        .consumptionMode("consumptionMode")
        .schemaRegistryConfig(SchemaRegistryConfigProperty.builder()
                .accessConfigs(List.of(SchemaRegistryAccessConfigProperty.builder()
                        .type("type")
                        .uri("uri")
                        .build()))
                .eventRecordFormat("eventRecordFormat")
                .schemaRegistryUri("schemaRegistryUri")
                .schemaValidationConfigs(List.of(SchemaValidationConfigProperty.builder()
                        .attribute("attribute")
                        .build()))
                .build())
        .build();
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.Lambda;

var selfManagedKafkaEventSourceConfigProperty = new SelfManagedKafkaEventSourceConfigProperty {
    ConsumerGroupId = "consumerGroupId",
    ConsumptionMode = "consumptionMode",
    SchemaRegistryConfig = new SchemaRegistryConfigProperty {
        AccessConfigs = new [] { new SchemaRegistryAccessConfigProperty {
            Type = "type",
            Uri = "uri"
        } },
        EventRecordFormat = "eventRecordFormat",
        SchemaRegistryUri = "schemaRegistryUri",
        SchemaValidationConfigs = new [] { new SchemaValidationConfigProperty {
            Attribute = "attribute"
        } }
    }
};
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"

selfManagedKafkaEventSourceConfigProperty := &SelfManagedKafkaEventSourceConfigProperty{
	ConsumerGroupId: jsii.String("consumerGroupId"),
	ConsumptionMode: jsii.String("consumptionMode"),
	SchemaRegistryConfig: &SchemaRegistryConfigProperty{
		AccessConfigs: []interface{}{
			&SchemaRegistryAccessConfigProperty{
				Type: jsii.String("type"),
				Uri: jsii.String("uri"),
			},
		},
		EventRecordFormat: jsii.String("eventRecordFormat"),
		SchemaRegistryUri: jsii.String("schemaRegistryUri"),
		SchemaValidationConfigs: []interface{}{
			&SchemaValidationConfigProperty{
				Attribute: jsii.String("attribute"),
			},
		},
	},
}

Properties ​

consumerGroupIdoptionalstringconsumer_group_idoptionalstrconsumerGroupIdoptionalStringConsumerGroupIdoptionalstringConsumerGroupIdoptional*string#
The identifier for the Kafka consumer group to join.
notes

The consumer group ID must be unique among all your Kafka event sources. After creating a Kafka event source mapping with the consumer group ID specified, you cannot update this value. For more information, see Customizable consumer group ID .

consumptionModeoptionalstringconsumption_modeoptionalstrconsumptionModeoptionalStringConsumptionModeoptionalstringConsumptionModeoptional*string#
The mode that determines how Lambda reads from a Kafka topic.

Use Stream for ordered processing or Queue for higher throughput when ordering is not required.

schemaRegistryConfigoptionalIResolvable | CfnEventSourceMapping.SchemaRegistryConfigPropertyschema_registry_configoptionaltyping.Union[IResolvable, SchemaRegistryConfigProperty]schemaRegistryConfigoptionalIResolvableSchemaRegistryConfigoptionalIResolvableSchemaRegistryConfigoptionalinterface{}#
Specific configuration settings for a Kafka schema registry.