Class ConfluentSchemaRegistryProps
Properties for confluent schema registry configuration.
Inherited Members
Namespace: Amazon.CDK.AWS.Lambda.EventSources
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class ConfluentSchemaRegistryProps : IConfluentSchemaRegistryProps, ISchemaRegistryProps
Syntax (vb)
Public Class ConfluentSchemaRegistryProps Implements IConfluentSchemaRegistryProps, ISchemaRegistryProps
Remarks
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.Lambda.EventSources;
using Amazon.CDK.AWS.SecretsManager;
// Your MSK cluster arn
string clusterArn;
Function myFunction;
// The Kafka topic you want to subscribe to
var topic = "some-cool-topic";
var secret = new Secret(this, "Secret", new SecretProps { SecretName = "AmazonMSK_KafkaSecret" });
myFunction.AddEventSource(new ManagedKafkaEventSource(new ManagedKafkaEventSourceProps {
ClusterArn = clusterArn,
Topic = topic,
StartingPosition = StartingPosition.TRIM_HORIZON,
ProvisionedPollerConfig = new ProvisionedPollerConfig {
MinimumPollers = 1,
MaximumPollers = 3
},
SchemaRegistryConfig = new ConfluentSchemaRegistry(new ConfluentSchemaRegistryProps {
SchemaRegistryUri = "https://example.com",
EventRecordFormat = EventRecordFormat.JSON,
AuthenticationType = KafkaSchemaRegistryAccessConfigType.BASIC_AUTH,
Secret = secret,
SchemaValidationConfigs = new [] { new KafkaSchemaValidationConfig { Attribute = KafkaSchemaValidationAttribute.KEY } }
})
}));
Synopsis
Constructors
| ConfluentSchemaRegistryProps() | Properties for confluent schema registry configuration. |
Properties
| AuthenticationType | The type of authentication for schema registry credentials. |
| EventRecordFormat | The record format that Lambda delivers to your function after schema validation. |
| SchemaRegistryUri | The URI for your schema registry. |
| SchemaValidationConfigs | An array of schema validation configuration objects, which tell Lambda the message attributes you want to validate and filter using your schema registry. |
| Secret | The secret with the schema registry credentials. |
Constructors
ConfluentSchemaRegistryProps()
Properties for confluent schema registry configuration.
public ConfluentSchemaRegistryProps()
Remarks
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.Lambda.EventSources;
using Amazon.CDK.AWS.SecretsManager;
// Your MSK cluster arn
string clusterArn;
Function myFunction;
// The Kafka topic you want to subscribe to
var topic = "some-cool-topic";
var secret = new Secret(this, "Secret", new SecretProps { SecretName = "AmazonMSK_KafkaSecret" });
myFunction.AddEventSource(new ManagedKafkaEventSource(new ManagedKafkaEventSourceProps {
ClusterArn = clusterArn,
Topic = topic,
StartingPosition = StartingPosition.TRIM_HORIZON,
ProvisionedPollerConfig = new ProvisionedPollerConfig {
MinimumPollers = 1,
MaximumPollers = 3
},
SchemaRegistryConfig = new ConfluentSchemaRegistry(new ConfluentSchemaRegistryProps {
SchemaRegistryUri = "https://example.com",
EventRecordFormat = EventRecordFormat.JSON,
AuthenticationType = KafkaSchemaRegistryAccessConfigType.BASIC_AUTH,
Secret = secret,
SchemaValidationConfigs = new [] { new KafkaSchemaValidationConfig { Attribute = KafkaSchemaValidationAttribute.KEY } }
})
}));
Properties
AuthenticationType
The type of authentication for schema registry credentials.
public KafkaSchemaRegistryAccessConfigType AuthenticationType { get; set; }
Property Value
KafkaSchemaRegistryAccessConfigType
Remarks
Default: none
EventRecordFormat
The record format that Lambda delivers to your function after schema validation.
public EventRecordFormat EventRecordFormat { get; set; }
Property Value
Remarks
Default: - none
SchemaRegistryUri
The URI for your schema registry.
public string SchemaRegistryUri { get; set; }
Property Value
Remarks
Default: - none
SchemaValidationConfigs
An array of schema validation configuration objects, which tell Lambda the message attributes you want to validate and filter using your schema registry.
public IKafkaSchemaValidationConfig[] SchemaValidationConfigs { get; set; }
Property Value
IKafkaSchemaValidationConfig[]
Remarks
Default: - none
Secret
The secret with the schema registry credentials.
public ISecret Secret { get; set; }
Property Value
Remarks
Default: none