Class: AWSCDK::Lambda::KafkaSchemaRegistryConfig
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Lambda::KafkaSchemaRegistryConfig
- Defined in:
- lambda/kafka_schema_registry_config.rb
Overview
(Amazon MSK and self-managed Apache Kafka only) Specific configuration settings for a Kafka schema registry.
Instance Attribute Summary collapse
-
#access_configs ⇒ Array<AWSCDK::Lambda::KafkaSchemaRegistryAccessConfig>?
readonly
An array of access configuration objects that tell Lambda how to authenticate with your schema registry.
-
#event_record_format ⇒ AWSCDK::Lambda::EventRecordFormat
readonly
The record format that Lambda delivers to your function after schema validation.
-
#schema_registry_uri ⇒ String
readonly
The URI for your schema registry.
-
#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_registry_uri:, schema_validation_configs:, access_configs: nil) ⇒ KafkaSchemaRegistryConfig
constructor
A new instance of KafkaSchemaRegistryConfig.
- #to_jsii ⇒ Object
Constructor Details
#initialize(event_record_format:, schema_registry_uri:, schema_validation_configs:, access_configs: nil) ⇒ KafkaSchemaRegistryConfig
Returns a new instance of KafkaSchemaRegistryConfig.
11 12 13 14 15 16 17 18 19 20 |
# File 'lambda/kafka_schema_registry_config.rb', line 11 def initialize(event_record_format:, schema_registry_uri:, schema_validation_configs:, access_configs: nil) @event_record_format = event_record_format Jsii::Type.check_type(@event_record_format, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGFtYmRhLkV2ZW50UmVjb3JkRm9ybWF0In0=")), "eventRecordFormat") @schema_registry_uri = schema_registry_uri Jsii::Type.check_type(@schema_registry_uri, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "schemaRegistryUri") @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") @access_configs = access_configs.is_a?(Array) ? access_configs.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::Lambda::KafkaSchemaRegistryAccessConfig.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : access_configs Jsii::Type.check_type(@access_configs, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sYW1iZGEuS2Fma2FTY2hlbWFSZWdpc3RyeUFjY2Vzc0NvbmZpZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "accessConfigs") unless @access_configs.nil? end |
Instance Attribute Details
#access_configs ⇒ Array<AWSCDK::Lambda::KafkaSchemaRegistryAccessConfig>? (readonly)
Default: - none
An array of access configuration objects that tell Lambda how to authenticate with your schema registry.
46 47 48 |
# File 'lambda/kafka_schema_registry_config.rb', line 46 def access_configs @access_configs end |
#event_record_format ⇒ AWSCDK::Lambda::EventRecordFormat (readonly)
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.
29 30 31 |
# File 'lambda/kafka_schema_registry_config.rb', line 29 def event_record_format @event_record_format end |
#schema_registry_uri ⇒ String (readonly)
Default: - none
The URI for your schema registry.
The correct URI format depends on the type of schema registry you're using.
36 37 38 |
# File 'lambda/kafka_schema_registry_config.rb', line 36 def schema_registry_uri @schema_registry_uri end |
#schema_validation_configs ⇒ Array<AWSCDK::Lambda::KafkaSchemaValidationConfig> (readonly)
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.
41 42 43 |
# File 'lambda/kafka_schema_registry_config.rb', line 41 def schema_validation_configs @schema_validation_configs end |
Class Method Details
.jsii_properties ⇒ Object
48 49 50 51 52 53 54 55 |
# File 'lambda/kafka_schema_registry_config.rb', line 48 def self.jsii_properties { :event_record_format => "eventRecordFormat", :schema_registry_uri => "schemaRegistryUri", :schema_validation_configs => "schemaValidationConfigs", :access_configs => "accessConfigs", } end |
Instance Method Details
#to_jsii ⇒ Object
57 58 59 60 61 62 63 64 65 66 |
# File 'lambda/kafka_schema_registry_config.rb', line 57 def to_jsii result = {} result.merge!({ "eventRecordFormat" => @event_record_format, "schemaRegistryUri" => @schema_registry_uri, "schemaValidationConfigs" => @schema_validation_configs, "accessConfigs" => @access_configs, }) result.compact end |