class EventRecordFormat
| Language | Type name | 
|---|---|
|  .NET | Amazon.CDK.AWS.Lambda.EventRecordFormat | 
|  Go | github.com/aws/aws-cdk-go/awscdk/v2/awslambda#EventRecordFormat | 
|  Java | software.amazon.awscdk.services.lambda.EventRecordFormat | 
|  Python | aws_cdk.aws_lambda.EventRecordFormat | 
|  TypeScript (source) | aws-cdk-lib»aws_lambda»EventRecordFormat | 
The format target function should recieve record in.
Example
import { ManagedKafkaEventSource, ConfluentSchemaRegistry } from 'aws-cdk-lib/aws-lambda-event-sources';
import { Secret } from 'aws-cdk-lib/aws-secretsmanager';
// Your MSK cluster arn
declare const clusterArn: string;
// The Kafka topic you want to subscribe to
const topic = 'some-cool-topic';
const secret = new Secret(this, 'Secret', { secretName: 'AmazonMSK_KafkaSecret' });
declare const myFunction: lambda.Function;
myFunction.addEventSource(new ManagedKafkaEventSource({
  clusterArn,
  topic,
  startingPosition: lambda.StartingPosition.TRIM_HORIZON,
  provisionedPollerConfig: {
    minimumPollers: 1,
    maximumPollers: 3,
  },
  schemaRegistryConfig: new ConfluentSchemaRegistry({
    schemaRegistryUri: 'https://example.com',
    eventRecordFormat: lambda.EventRecordFormat.JSON,
    authenticationType: lambda.KafkaSchemaRegistryAccessConfigType.BASIC_AUTH,
    secret: secret,
    schemaValidationConfigs: [{ attribute: lambda.KafkaSchemaValidationAttribute.KEY }],
  }),
}));
Properties
| Name | Type | Description | 
|---|---|---|
| value | string | The enum to use in SchemaRegistryConfig.EventRecordFormatproperty in CloudFormation. | 
| static JSON | Event | The target function will recieve records as json objects. | 
| static SOURCE | Event | The target function will recieve records in same format as the schema source. | 
value
Type:
string
The enum to use in SchemaRegistryConfig.EventRecordFormat property in CloudFormation.
static JSON
Type:
Event
The target function will recieve records as json objects.
static SOURCE
Type:
Event
The target function will recieve records in same format as the schema source.
Methods
| Name | Description | 
|---|---|
| static of(name) | A custom event record format. | 
static of(name)
public static of(name: string): EventRecordFormat
Parameters
- name string
Returns
A custom event record format.
