CfnRegistryProps
- class aws_cdk.aws_glue.CfnRegistryProps(*, name, description=None, tags=None)
Bases:
object
Properties for defining a
CfnRegistry
.- Parameters:
name (
str
) – The name of the registry.description (
Optional
[str
]) – A description of the registry.tags (
Optional
[Sequence
[Union
[CfnTag
,Dict
[str
,Any
]]]]) – AWS tags that contain a key value pair and may be searched by console, command line, or API.
- See:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-registry.html
- ExampleMetadata:
infused
Example:
from aws_cdk.aws_glue import CfnRegistry from aws_cdk.aws_lambda_event_sources import ManagedKafkaEventSource, GlueSchemaRegistry # Your MSK cluster arn # cluster_arn: str # my_function: lambda.Function # The Kafka topic you want to subscribe to topic = "some-cool-topic" # Your Glue Schema Registry glue_registry = CfnRegistry(self, "Registry", name="schema-registry", description="Schema registry for event source" ) my_function.add_event_source(ManagedKafkaEventSource( cluster_arn=cluster_arn, topic=topic, starting_position=lambda_.StartingPosition.TRIM_HORIZON, provisioned_poller_config=ProvisionedPollerConfig( minimum_pollers=1, maximum_pollers=3 ), schema_registry_config=GlueSchemaRegistry( schema_registry=glue_registry, event_record_format=lambda_.EventRecordFormat.JSON, schema_validation_configs=[lambda.KafkaSchemaValidationConfig(attribute=lambda_.KafkaSchemaValidationAttribute.KEY)] ) ))
Attributes
- description
A description of the registry.
- name
The name of the registry.
- tags
AWS tags that contain a key value pair and may be searched by console, command line, or API.