Skip to content
v2.273.0

KafkaSchemaRegistryAccessConfigType Class ​

The type of authentication protocol for your schema registry.

Example ​

ts
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 ​

The Secrets Manager secret that stores your broker credentials.
CLIENT_CERTIFICATE_TLS_AUTHKafkaSchemaRegistryAccessConfigTypeclient_certificate_tls_authKafkaSchemaRegistryAccessConfigTypeCLIENT_CERTIFICATE_TLS_AUTHKafkaSchemaRegistryAccessConfigTypeCLIENT_CERTIFICATE_TLS_AUTHKafkaSchemaRegistryAccessConfigTypeCLIENT_CERTIFICATE_TLS_AUTHKafkaSchemaRegistryAccessConfigTyperequiredstatic#
The Secrets Manager ARN of your secret key containing the certificate chain (X.509 PEM), private key (PKCS#8 PEM), and private key password (optional) used for mutual TLS authentication of your schema registry.
The Secrets Manager ARN of your secret key used for SASL SCRAM-256 authentication of your self-managed broker.
The Secrets Manager ARN of your secret key used for SASL SCRAM-512 authentication of your self-managed broker.
SERVER_ROOT_CA_CERTIFICATEKafkaSchemaRegistryAccessConfigTypeserver_root_ca_certificateKafkaSchemaRegistryAccessConfigTypeSERVER_ROOT_CA_CERTIFICATEKafkaSchemaRegistryAccessConfigTypeSERVER_ROOT_CA_CERTIFICATEKafkaSchemaRegistryAccessConfigTypeSERVER_ROOT_CA_CERTIFICATEKafkaSchemaRegistryAccessConfigTyperequiredstatic#
The Secrets Manager ARN of your secret key containing the root CA certificate (X.509 PEM) used for TLS encryption of your schema registry.
typestringtypestrtypeStringTypestringType*stringrequired#
The key to use in `SchemaRegistryConfig.AccessConfig.Type` property in CloudFormation.
The name of the virtual host in your schema registry.

Lambda uses this broker host as the event source.

The VPC security group used to manage access to your self-managed brokers.
The subnets associated with your VPC.

Lambda connects to these subnets to fetch data from your self-managed cluster.

Methods ​

of(name: string): KafkaSchemaRegistryAccessConfigType // chainable@staticmethod def of(name: str) -> KafkaSchemaRegistryAccessConfigTypepublic static KafkaSchemaRegistryAccessConfigType of(String name)public static KafkaSchemaRegistryAccessConfigType Of(string name)func Of(Name *string) KafkaSchemaRegistryAccessConfigTypestatic#
A custom source access configuration property for schema registry.