Class: AWSCDK::ApplicationSignals::CfnServiceLevelObjective::SliProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::ApplicationSignals::CfnServiceLevelObjective::SliProperty
- 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
-
#comparison_operator ⇒ String
readonly
The arithmetic operation to use when comparing the specified metric to the threshold.
-
#metric_threshold ⇒ Numeric
readonly
The value that the SLI metric is compared to.
-
#sli_metric ⇒ AWSCDK::IResolvable, AWSCDK::ApplicationSignals::CfnServiceLevelObjective::SliMetricProperty
readonly
Use this structure to specify the metric to be used for the SLO.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(comparison_operator:, metric_threshold:, sli_metric:) ⇒ SliProperty
constructor
A new instance of SliProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(comparison_operator:, metric_threshold:, sli_metric:) ⇒ SliProperty
Returns a new instance of SliProperty.
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_operator ⇒ String (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_threshold ⇒ Numeric (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 |
#sli_metric ⇒ AWSCDK::IResolvable, AWSCDK::ApplicationSignals::CfnServiceLevelObjective::SliMetricProperty (readonly)
Use this structure to specify the metric to be used for the SLO.
1879 1880 1881 |
# File 'application_signals/cfn_service_level_objective.rb', line 1879 def sli_metric @sli_metric end |
Class Method Details
.jsii_properties ⇒ Object
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_jsii ⇒ Object
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 |