Class: AWSCDK::ApplicationSignals::CfnServiceLevelObjective::SliProperty

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

Overview

This structure specifies the information about the service and the performance metric that an SLO is to monitor.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(comparison_operator:, metric_threshold:, sli_metric:) ⇒ SliProperty

Returns a new instance of SliProperty.

Parameters:



1856
1857
1858
1859
1860
1861
1862
1863
# File 'application_signals/cfn_service_level_objective.rb', line 1856

def initialize(comparison_operator:, metric_threshold:, sli_metric:)
  @comparison_operator = comparison_operator
  Jsii::Type.check_type(@comparison_operator, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "comparisonOperator")
  @metric_threshold = metric_threshold
  Jsii::Type.check_type(@metric_threshold, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "metricThreshold")
  @sli_metric = sli_metric.is_a?(Hash) ? ::AWSCDK::ApplicationSignals::CfnServiceLevelObjective::SliMetricProperty.new(**sli_metric.transform_keys(&:to_sym)) : sli_metric
  Jsii::Type.check_type(@sli_metric, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcHBsaWNhdGlvbnNpZ25hbHMuQ2ZuU2VydmljZUxldmVsT2JqZWN0aXZlLlNsaU1ldHJpY1Byb3BlcnR5In1dfX0=")), "sliMetric")
end

Instance Attribute Details

#comparison_operatorString (readonly)

The arithmetic operation to use when comparing the specified metric to the threshold.



1869
1870
1871
# File 'application_signals/cfn_service_level_objective.rb', line 1869

def comparison_operator
  @comparison_operator
end

#metric_thresholdNumeric (readonly)

The value that the SLI metric is compared to.



1874
1875
1876
# File 'application_signals/cfn_service_level_objective.rb', line 1874

def metric_threshold
  @metric_threshold
end

Class Method Details

.jsii_propertiesObject



1881
1882
1883
1884
1885
1886
1887
# File 'application_signals/cfn_service_level_objective.rb', line 1881

def self.jsii_properties
  {
    :comparison_operator => "comparisonOperator",
    :metric_threshold => "metricThreshold",
    :sli_metric => "sliMetric",
  }
end

Instance Method Details

#to_jsiiObject



1889
1890
1891
1892
1893
1894
1895
1896
1897
# File 'application_signals/cfn_service_level_objective.rb', line 1889

def to_jsii
  result = {}
  result.merge!({
    "comparisonOperator" => @comparison_operator,
    "metricThreshold" => @metric_threshold,
    "sliMetric" => @sli_metric,
  })
  result.compact
end