Class: AWSCDK::ApplicationSignals::CfnServiceLevelObjective::GoalProperty

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

Overview

This structure contains the attributes that determine the goal of an SLO.

This includes the time period for evaluation and the attainment threshold.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attainment_goal: nil, interval: nil, warning_threshold: nil) ⇒ GoalProperty

Returns a new instance of GoalProperty.

Parameters:

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

    The threshold that determines if the goal is being met.

  • interval (AWSCDK::IResolvable, AWSCDK::ApplicationSignals::CfnServiceLevelObjective::IntervalProperty, nil) (defaults to: nil)

    The time period used to evaluate the SLO. It can be either a calendar interval or rolling interval.

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

    The percentage of remaining budget over total budget that you want to get warnings for.



1013
1014
1015
1016
1017
1018
1019
1020
# File 'application_signals/cfn_service_level_objective.rb', line 1013

def initialize(attainment_goal: nil, interval: nil, warning_threshold: nil)
  @attainment_goal = attainment_goal
  Jsii::Type.check_type(@attainment_goal, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "attainmentGoal") unless @attainment_goal.nil?
  @interval = interval.is_a?(Hash) ? ::AWSCDK::ApplicationSignals::CfnServiceLevelObjective::IntervalProperty.new(**interval.transform_keys(&:to_sym)) : interval
  Jsii::Type.check_type(@interval, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcHBsaWNhdGlvbnNpZ25hbHMuQ2ZuU2VydmljZUxldmVsT2JqZWN0aXZlLkludGVydmFsUHJvcGVydHkifV19fQ==")), "interval") unless @interval.nil?
  @warning_threshold = warning_threshold
  Jsii::Type.check_type(@warning_threshold, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "warningThreshold") unless @warning_threshold.nil?
end

Instance Attribute Details

#attainment_goalNumeric? (readonly)

The threshold that determines if the goal is being met.

If this is a period-based SLO, the attainment goal is the percentage of good periods that meet the threshold requirements to the total periods within the interval. For example, an attainment goal of 99.9% means that within your interval, you are targeting 99.9% of the periods to be in healthy state.

If this is a request-based SLO, the attainment goal is the percentage of requests that must be successful to meet the attainment goal.

If you omit this parameter, 99 is used to represent 99% as the attainment goal.



1032
1033
1034
# File 'application_signals/cfn_service_level_objective.rb', line 1032

def attainment_goal
  @attainment_goal
end

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

The time period used to evaluate the SLO. It can be either a calendar interval or rolling interval.

If you omit this parameter, a rolling interval of 7 days is used.



1039
1040
1041
# File 'application_signals/cfn_service_level_objective.rb', line 1039

def interval
  @interval
end

#warning_thresholdNumeric? (readonly)

The percentage of remaining budget over total budget that you want to get warnings for.

If you omit this parameter, the default of 50.0 is used.



1046
1047
1048
# File 'application_signals/cfn_service_level_objective.rb', line 1046

def warning_threshold
  @warning_threshold
end

Class Method Details

.jsii_propertiesObject



1048
1049
1050
1051
1052
1053
1054
# File 'application_signals/cfn_service_level_objective.rb', line 1048

def self.jsii_properties
  {
    :attainment_goal => "attainmentGoal",
    :interval => "interval",
    :warning_threshold => "warningThreshold",
  }
end

Instance Method Details

#to_jsiiObject



1056
1057
1058
1059
1060
1061
1062
1063
1064
# File 'application_signals/cfn_service_level_objective.rb', line 1056

def to_jsii
  result = {}
  result.merge!({
    "attainmentGoal" => @attainment_goal,
    "interval" => @interval,
    "warningThreshold" => @warning_threshold,
  })
  result.compact
end