Class: AWSCDK::CustomerProfiles::CfnEventTrigger::PeriodProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
customer_profiles/cfn_event_trigger.rb

Overview

Defines a limit and the time period during which it is enforced.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(unit:, value:, max_invocations_per_profile: nil, unlimited: nil) ⇒ PeriodProperty

Returns a new instance of PeriodProperty.

Parameters:

  • unit (String)

    The unit of time.

  • value (Numeric)

    The amount of time of the specified unit.

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

    The maximum allowed number of destination invocations per profile.

  • unlimited (Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

    If set to true, there is no limit on the number of destination invocations per profile.



795
796
797
798
799
800
801
802
803
804
# File 'customer_profiles/cfn_event_trigger.rb', line 795

def initialize(unit:, value:, max_invocations_per_profile: nil, unlimited: nil)
  @unit = unit
  Jsii::Type.check_type(@unit, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "unit")
  @value = value
  Jsii::Type.check_type(@value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "value")
  @max_invocations_per_profile = max_invocations_per_profile
  Jsii::Type.check_type(@max_invocations_per_profile, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maxInvocationsPerProfile") unless @max_invocations_per_profile.nil?
  @unlimited = unlimited
  Jsii::Type.check_type(@unlimited, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "unlimited") unless @unlimited.nil?
end

Instance Attribute Details

#max_invocations_per_profileNumeric? (readonly)

The maximum allowed number of destination invocations per profile.



820
821
822
# File 'customer_profiles/cfn_event_trigger.rb', line 820

def max_invocations_per_profile
  @max_invocations_per_profile
end

#unitString (readonly)

The unit of time.



810
811
812
# File 'customer_profiles/cfn_event_trigger.rb', line 810

def unit
  @unit
end

#unlimitedBoolean, ... (readonly)

If set to true, there is no limit on the number of destination invocations per profile.

The default is false.



827
828
829
# File 'customer_profiles/cfn_event_trigger.rb', line 827

def unlimited
  @unlimited
end

#valueNumeric (readonly)

The amount of time of the specified unit.



815
816
817
# File 'customer_profiles/cfn_event_trigger.rb', line 815

def value
  @value
end

Class Method Details

.jsii_propertiesObject



829
830
831
832
833
834
835
836
# File 'customer_profiles/cfn_event_trigger.rb', line 829

def self.jsii_properties
  {
    :unit => "unit",
    :value => "value",
    :max_invocations_per_profile => "maxInvocationsPerProfile",
    :unlimited => "unlimited",
  }
end

Instance Method Details

#to_jsiiObject



838
839
840
841
842
843
844
845
846
847
# File 'customer_profiles/cfn_event_trigger.rb', line 838

def to_jsii
  result = {}
  result.merge!({
    "unit" => @unit,
    "value" => @value,
    "maxInvocationsPerProfile" => @max_invocations_per_profile,
    "unlimited" => @unlimited,
  })
  result.compact
end