Class: AWSCDK::ApplicationSignals::CfnServiceLevelObjective::CalendarIntervalProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
application_signals/cfn_service_level_objective.rb

Overview

If the interval for this service level objective is a calendar interval, this structure contains the interval specifications.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(duration:, duration_unit:, start_time:) ⇒ CalendarIntervalProperty

Returns a new instance of CalendarIntervalProperty.

Parameters:

  • duration (Numeric)

    Specifies the duration of each calendar interval.

  • duration_unit (String)

    Specifies the calendar interval unit.

  • start_time (Numeric)

    The date and time when you want the first interval to start.



718
719
720
721
722
723
724
725
# File 'application_signals/cfn_service_level_objective.rb', line 718

def initialize(duration:, duration_unit:, start_time:)
  @duration = duration
  Jsii::Type.check_type(@duration, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "duration")
  @duration_unit = duration_unit
  Jsii::Type.check_type(@duration_unit, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "durationUnit")
  @start_time = start_time
  Jsii::Type.check_type(@start_time, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "startTime")
end

Instance Attribute Details

#durationNumeric (readonly)

Specifies the duration of each calendar interval.

For example, if Duration is 1 and DurationUnit is MONTH , each interval is one month, aligned with the calendar.



733
734
735
# File 'application_signals/cfn_service_level_objective.rb', line 733

def duration
  @duration
end

#duration_unitString (readonly)

Specifies the calendar interval unit.



738
739
740
# File 'application_signals/cfn_service_level_objective.rb', line 738

def duration_unit
  @duration_unit
end

#start_timeNumeric (readonly)

The date and time when you want the first interval to start.

Be sure to choose a time that configures the intervals the way that you want. For example, if you want weekly intervals starting on Mondays at 6 a.m., be sure to specify a start time that is a Monday at 6 a.m.

When used in a raw HTTP Query API, it is formatted as be epoch time in seconds. For example: 1698778057

As soon as one calendar interval ends, another automatically begins.



749
750
751
# File 'application_signals/cfn_service_level_objective.rb', line 749

def start_time
  @start_time
end

Class Method Details

.jsii_propertiesObject



751
752
753
754
755
756
757
# File 'application_signals/cfn_service_level_objective.rb', line 751

def self.jsii_properties
  {
    :duration => "duration",
    :duration_unit => "durationUnit",
    :start_time => "startTime",
  }
end

Instance Method Details

#to_jsiiObject



759
760
761
762
763
764
765
766
767
# File 'application_signals/cfn_service_level_objective.rb', line 759

def to_jsii
  result = {}
  result.merge!({
    "duration" => @duration,
    "durationUnit" => @duration_unit,
    "startTime" => @start_time,
  })
  result.compact
end