Class EventRecordFormat
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.lambda.EventRecordFormat
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.116.0 (build 0eddcff)",
date="2025-10-24T13:34:41.226Z")
@Stability(Stable)
public class EventRecordFormat
extends software.amazon.jsii.JsiiObject
The format target function should recieve record in.
Example:
import software.amazon.awscdk.services.lambda.eventsources.ManagedKafkaEventSource;
import software.amazon.awscdk.services.lambda.eventsources.ConfluentSchemaRegistry;
import software.amazon.awscdk.services.secretsmanager.Secret;
// Your MSK cluster arn
String clusterArn;
Function myFunction;
// The Kafka topic you want to subscribe to
String topic = "some-cool-topic";
Secret secret = Secret.Builder.create(this, "Secret").secretName("AmazonMSK_KafkaSecret").build();
myFunction.addEventSource(ManagedKafkaEventSource.Builder.create()
.clusterArn(clusterArn)
.topic(topic)
.startingPosition(StartingPosition.TRIM_HORIZON)
.provisionedPollerConfig(ProvisionedPollerConfig.builder()
.minimumPollers(1)
.maximumPollers(3)
.build())
.schemaRegistryConfig(ConfluentSchemaRegistry.Builder.create()
.schemaRegistryUri("https://example.com")
.eventRecordFormat(EventRecordFormat.JSON)
.authenticationType(KafkaSchemaRegistryAccessConfigType.BASIC_AUTH)
.secret(secret)
.schemaValidationConfigs(List.of(KafkaSchemaValidationConfig.builder().attribute(KafkaSchemaValidationAttribute.KEY).build()))
.build())
.build());
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final EventRecordFormatThe target function will recieve records as json objects.static final EventRecordFormatThe target function will recieve records in same format as the schema source. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedEventRecordFormat(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedEventRecordFormat(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptiongetValue()The enum to use inSchemaRegistryConfig.EventRecordFormatproperty in CloudFormation.static EventRecordFormatA custom event record format.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
JSON
The target function will recieve records as json objects. -
SOURCE
The target function will recieve records in same format as the schema source.
-
-
Constructor Details
-
EventRecordFormat
protected EventRecordFormat(software.amazon.jsii.JsiiObjectRef objRef) -
EventRecordFormat
protected EventRecordFormat(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
-
-
Method Details
-
of
A custom event record format.- Parameters:
name- This parameter is required.
-
getValue
The enum to use inSchemaRegistryConfig.EventRecordFormatproperty in CloudFormation.
-