Class: AWSCDK::LambdaEventSources::GlueSchemaRegistryProps
- Inherits:
-
AWSCDK::Lambda::SchemaRegistryProps
- Object
- AWSCDK::Lambda::SchemaRegistryProps
- AWSCDK::LambdaEventSources::GlueSchemaRegistryProps
- Defined in:
- lambda_event_sources/glue_schema_registry_props.rb
Overview
Properties for glue schema registry configuration.
Instance Attribute Summary collapse
-
#event_record_format ⇒ AWSCDK::Lambda::EventRecordFormat
readonly
The record format that Lambda delivers to your function after schema validation.
-
#schema_registry ⇒ AWSCDK::Glue::CfnRegistry?
readonly
The CfnRegistry reference of your glue schema registry.
-
#schema_registry_arn ⇒ String?
readonly
The Arn of your glue 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_validation_configs:, schema_registry: nil, schema_registry_arn: nil) ⇒ GlueSchemaRegistryProps
constructor
A new instance of GlueSchemaRegistryProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(event_record_format:, schema_validation_configs:, schema_registry: nil, schema_registry_arn: nil) ⇒ GlueSchemaRegistryProps
Returns a new instance of GlueSchemaRegistryProps.
11 12 13 14 15 16 17 18 19 20 |
# File 'lambda_event_sources/glue_schema_registry_props.rb', line 11 def initialize(event_record_format:, schema_validation_configs:, schema_registry: nil, schema_registry_arn: nil) @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") @schema_registry = schema_registry Jsii::Type.check_type(@schema_registry, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZ2x1ZS5DZm5SZWdpc3RyeSJ9")), "schemaRegistry") unless @schema_registry.nil? @schema_registry_arn = schema_registry_arn Jsii::Type.check_type(@schema_registry_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "schemaRegistryArn") unless @schema_registry_arn.nil? end |
Instance Attribute Details
#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_event_sources/glue_schema_registry_props.rb', line 29 def event_record_format @event_record_format end |
#schema_registry ⇒ AWSCDK::Glue::CfnRegistry? (readonly)
Default: - none
The CfnRegistry reference of your glue schema registry.
If used, schemaRegistryArn will be ignored.
41 42 43 |
# File 'lambda_event_sources/glue_schema_registry_props.rb', line 41 def schema_registry @schema_registry end |
#schema_registry_arn ⇒ String? (readonly)
Default: - none
The Arn of your glue schema registry.
46 47 48 |
# File 'lambda_event_sources/glue_schema_registry_props.rb', line 46 def schema_registry_arn @schema_registry_arn 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.
34 35 36 |
# File 'lambda_event_sources/glue_schema_registry_props.rb', line 34 def schema_validation_configs @schema_validation_configs end |
Class Method Details
.jsii_properties ⇒ Object
48 49 50 51 52 53 54 55 |
# File 'lambda_event_sources/glue_schema_registry_props.rb', line 48 def self.jsii_properties { :event_record_format => "eventRecordFormat", :schema_validation_configs => "schemaValidationConfigs", :schema_registry => "schemaRegistry", :schema_registry_arn => "schemaRegistryArn", } end |
Instance Method Details
#to_jsii ⇒ Object
57 58 59 60 61 62 63 64 65 66 67 |
# File 'lambda_event_sources/glue_schema_registry_props.rb', line 57 def to_jsii result = {} result.merge!(super) result.merge!({ "eventRecordFormat" => @event_record_format, "schemaValidationConfigs" => @schema_validation_configs, "schemaRegistry" => @schema_registry, "schemaRegistryArn" => @schema_registry_arn, }) result.compact end |