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
BASIC_AUTHKafkaSchemaRegistryAccessConfigTypebasic_authKafkaSchemaRegistryAccessConfigTypeBASIC_AUTHKafkaSchemaRegistryAccessConfigTypeBASIC_AUTHKafkaSchemaRegistryAccessConfigTypeBASIC_AUTHKafkaSchemaRegistryAccessConfigTyperequiredstatic#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.
SASL_SCRAM_256_AUTHKafkaSchemaRegistryAccessConfigTypesasl_scram_256_authKafkaSchemaRegistryAccessConfigTypeSASL_SCRAM_256_AUTHKafkaSchemaRegistryAccessConfigTypeSASL_SCRAM_256_AUTHKafkaSchemaRegistryAccessConfigTypeSASL_SCRAM_256_AUTHKafkaSchemaRegistryAccessConfigTyperequiredstatic#The Secrets Manager ARN of your secret key used for SASL SCRAM-256 authentication of your self-managed broker.
SASL_SCRAM_512_AUTHKafkaSchemaRegistryAccessConfigTypesasl_scram_512_authKafkaSchemaRegistryAccessConfigTypeSASL_SCRAM_512_AUTHKafkaSchemaRegistryAccessConfigTypeSASL_SCRAM_512_AUTHKafkaSchemaRegistryAccessConfigTypeSASL_SCRAM_512_AUTHKafkaSchemaRegistryAccessConfigTyperequiredstatic#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.
The key to use in `SchemaRegistryConfig.AccessConfig.Type` property in CloudFormation.
VIRTUAL_HOSTKafkaSchemaRegistryAccessConfigTypevirtual_hostKafkaSchemaRegistryAccessConfigTypeVIRTUAL_HOSTKafkaSchemaRegistryAccessConfigTypeVIRTUAL_HOSTKafkaSchemaRegistryAccessConfigTypeVIRTUAL_HOSTKafkaSchemaRegistryAccessConfigTyperequiredstatic#The name of the virtual host in your schema registry.
Lambda uses this broker host as the event source.
VPC_SECURITY_GROUPKafkaSchemaRegistryAccessConfigTypevpc_security_groupKafkaSchemaRegistryAccessConfigTypeVPC_SECURITY_GROUPKafkaSchemaRegistryAccessConfigTypeVPC_SECURITY_GROUPKafkaSchemaRegistryAccessConfigTypeVPC_SECURITY_GROUPKafkaSchemaRegistryAccessConfigTyperequiredstatic#The VPC security group used to manage access to your self-managed brokers.
VPC_SUBNETKafkaSchemaRegistryAccessConfigTypevpc_subnetKafkaSchemaRegistryAccessConfigTypeVPC_SUBNETKafkaSchemaRegistryAccessConfigTypeVPC_SUBNETKafkaSchemaRegistryAccessConfigTypeVPC_SUBNETKafkaSchemaRegistryAccessConfigTyperequiredstatic#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.