Class: AWSCDK::ApplicationSignals::CfnServiceLevelObjective::IntervalProperty

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

Overview

The time period used to evaluate the SLO.

It can be either a calendar interval or rolling interval.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(calendar_interval: nil, rolling_interval: nil) ⇒ IntervalProperty

Returns a new instance of IntervalProperty.

Parameters:



1077
1078
1079
1080
1081
1082
# File 'application_signals/cfn_service_level_objective.rb', line 1077

def initialize(calendar_interval: nil, rolling_interval: nil)
  @calendar_interval = calendar_interval.is_a?(Hash) ? ::AWSCDK::ApplicationSignals::CfnServiceLevelObjective::CalendarIntervalProperty.new(**calendar_interval.transform_keys(&:to_sym)) : calendar_interval
  Jsii::Type.check_type(@calendar_interval, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcHBsaWNhdGlvbnNpZ25hbHMuQ2ZuU2VydmljZUxldmVsT2JqZWN0aXZlLkNhbGVuZGFySW50ZXJ2YWxQcm9wZXJ0eSJ9XX19")), "calendarInterval") unless @calendar_interval.nil?
  @rolling_interval = rolling_interval.is_a?(Hash) ? ::AWSCDK::ApplicationSignals::CfnServiceLevelObjective::RollingIntervalProperty.new(**rolling_interval.transform_keys(&:to_sym)) : rolling_interval
  Jsii::Type.check_type(@rolling_interval, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcHBsaWNhdGlvbnNpZ25hbHMuQ2ZuU2VydmljZUxldmVsT2JqZWN0aXZlLlJvbGxpbmdJbnRlcnZhbFByb3BlcnR5In1dfX0=")), "rollingInterval") unless @rolling_interval.nil?
end

Instance Attribute Details

#calendar_intervalAWSCDK::IResolvable, ... (readonly)

If the interval is a calendar interval, this structure contains the interval specifications.



1088
1089
1090
# File 'application_signals/cfn_service_level_objective.rb', line 1088

def calendar_interval
  @calendar_interval
end

#rolling_intervalAWSCDK::IResolvable, ... (readonly)

If the interval is a rolling interval, this structure contains the interval specifications.



1093
1094
1095
# File 'application_signals/cfn_service_level_objective.rb', line 1093

def rolling_interval
  @rolling_interval
end

Class Method Details

.jsii_propertiesObject



1095
1096
1097
1098
1099
1100
# File 'application_signals/cfn_service_level_objective.rb', line 1095

def self.jsii_properties
  {
    :calendar_interval => "calendarInterval",
    :rolling_interval => "rollingInterval",
  }
end

Instance Method Details

#to_jsiiObject



1102
1103
1104
1105
1106
1107
1108
1109
# File 'application_signals/cfn_service_level_objective.rb', line 1102

def to_jsii
  result = {}
  result.merge!({
    "calendarInterval" => @calendar_interval,
    "rollingInterval" => @rolling_interval,
  })
  result.compact
end