Class: AWSCDK::Glue::CfnTrigger::EventBatchingConditionProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
glue/cfn_trigger.rb

Overview

Batch condition that must be met (specified number of events received or batch time window expired) before EventBridge event trigger fires.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(batch_size:, batch_window: nil) ⇒ EventBatchingConditionProperty

Returns a new instance of EventBatchingConditionProperty.

Parameters:

  • batch_size (Numeric)

    Number of events that must be received from Amazon EventBridge before EventBridge event trigger fires.

  • batch_window (Numeric, nil) (defaults to: nil)

    Window of time in seconds after which EventBridge event trigger fires.



811
812
813
814
815
816
# File 'glue/cfn_trigger.rb', line 811

def initialize(batch_size:, batch_window: nil)
  @batch_size = batch_size
  Jsii::Type.check_type(@batch_size, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "batchSize")
  @batch_window = batch_window
  Jsii::Type.check_type(@batch_window, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "batchWindow") unless @batch_window.nil?
end

Instance Attribute Details

#batch_sizeNumeric (readonly)

Number of events that must be received from Amazon EventBridge before EventBridge event trigger fires.



822
823
824
# File 'glue/cfn_trigger.rb', line 822

def batch_size
  @batch_size
end

#batch_windowNumeric? (readonly)

Window of time in seconds after which EventBridge event trigger fires.

Window starts when first event is received.



829
830
831
# File 'glue/cfn_trigger.rb', line 829

def batch_window
  @batch_window
end

Class Method Details

.jsii_propertiesObject



831
832
833
834
835
836
# File 'glue/cfn_trigger.rb', line 831

def self.jsii_properties
  {
    :batch_size => "batchSize",
    :batch_window => "batchWindow",
  }
end

Instance Method Details

#to_jsiiObject



838
839
840
841
842
843
844
845
# File 'glue/cfn_trigger.rb', line 838

def to_jsii
  result = {}
  result.merge!({
    "batchSize" => @batch_size,
    "batchWindow" => @batch_window,
  })
  result.compact
end