Class: AWSCDK::Lambda::SchemaRegistryProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Lambda::SchemaRegistryProps
- Defined in:
- lambda/schema_registry_props.rb
Overview
Properties for schema registry configuration.
Direct Known Subclasses
AWSCDK::LambdaEventSources::ConfluentSchemaRegistryProps, AWSCDK::LambdaEventSources::GlueSchemaRegistryProps
Instance Attribute Summary collapse
-
#event_record_format ⇒ AWSCDK::Lambda::EventRecordFormat
readonly
The record format that Lambda delivers to your function after schema validation.
-
#schema_validation_configs ⇒ Array<AWSCDK::Lambda::KafkaSchemaValidationConfig>
readonly
An array of schema validation configuration objects, which tell Lambda the message attributes you want to validate and filter using your schema registry.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(event_record_format:, schema_validation_configs:) ⇒ SchemaRegistryProps
constructor
A new instance of SchemaRegistryProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(event_record_format:, schema_validation_configs:) ⇒ SchemaRegistryProps
Returns a new instance of SchemaRegistryProps.
9 10 11 12 13 14 |
# File 'lambda/schema_registry_props.rb', line 9 def initialize(event_record_format:, schema_validation_configs:) @event_record_format = event_record_format Jsii::Type.check_type(@event_record_format, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGFtYmRhLkV2ZW50UmVjb3JkRm9ybWF0In0=")), "eventRecordFormat") @schema_validation_configs = schema_validation_configs.is_a?(Array) ? schema_validation_configs.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::Lambda::KafkaSchemaValidationConfig.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : schema_validation_configs Jsii::Type.check_type(@schema_validation_configs, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sYW1iZGEuS2Fma2FTY2hlbWFWYWxpZGF0aW9uQ29uZmlnIn0sImtpbmQiOiJhcnJheSJ9fQ==")), "schemaValidationConfigs") end |
Instance Attribute Details
#event_record_format ⇒ AWSCDK::Lambda::EventRecordFormat (readonly)
Note:
Default: - none
The record format that Lambda delivers to your function after schema validation.
- Choose JSON to have Lambda deliver the record to your function as a standard JSON object.
- Choose SOURCE to have Lambda deliver the record to your function in its original source format. Lambda removes all schema metadata, such as the schema ID, before sending the record to your function.
23 24 25 |
# File 'lambda/schema_registry_props.rb', line 23 def event_record_format @event_record_format end |
#schema_validation_configs ⇒ Array<AWSCDK::Lambda::KafkaSchemaValidationConfig> (readonly)
Note:
Default: - none
An array of schema validation configuration objects, which tell Lambda the message attributes you want to validate and filter using your schema registry.
28 29 30 |
# File 'lambda/schema_registry_props.rb', line 28 def schema_validation_configs @schema_validation_configs end |
Class Method Details
.jsii_properties ⇒ Object
30 31 32 33 34 35 |
# File 'lambda/schema_registry_props.rb', line 30 def self.jsii_properties { :event_record_format => "eventRecordFormat", :schema_validation_configs => "schemaValidationConfigs", } end |
Instance Method Details
#to_jsii ⇒ Object
37 38 39 40 41 42 43 44 |
# File 'lambda/schema_registry_props.rb', line 37 def to_jsii result = {} result.merge!({ "eventRecordFormat" => @event_record_format, "schemaValidationConfigs" => @schema_validation_configs, }) result.compact end |