Class: AWSCDK::ApplicationSignals::CfnServiceLevelObjective::RequestBasedSliProperty

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

Overview

This structure contains information about the performance metric that a request-based SLO monitors.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(request_based_sli_metric:, comparison_operator: nil, metric_threshold: nil) ⇒ RequestBasedSliProperty

Returns a new instance of RequestBasedSliProperty.

Parameters:



1586
1587
1588
1589
1590
1591
1592
1593
# File 'application_signals/cfn_service_level_objective.rb', line 1586

def initialize(request_based_sli_metric:, comparison_operator: nil, metric_threshold: nil)
  @request_based_sli_metric = request_based_sli_metric.is_a?(Hash) ? ::AWSCDK::ApplicationSignals::CfnServiceLevelObjective::RequestBasedSliMetricProperty.new(**request_based_sli_metric.transform_keys(&:to_sym)) : request_based_sli_metric
  Jsii::Type.check_type(@request_based_sli_metric, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcHBsaWNhdGlvbnNpZ25hbHMuQ2ZuU2VydmljZUxldmVsT2JqZWN0aXZlLlJlcXVlc3RCYXNlZFNsaU1ldHJpY1Byb3BlcnR5In1dfX0=")), "requestBasedSliMetric")
  @comparison_operator = comparison_operator
  Jsii::Type.check_type(@comparison_operator, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "comparisonOperator") unless @comparison_operator.nil?
  @metric_threshold = metric_threshold
  Jsii::Type.check_type(@metric_threshold, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "metricThreshold") unless @metric_threshold.nil?
end

Instance Attribute Details

#comparison_operatorString? (readonly)

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



1604
1605
1606
# File 'application_signals/cfn_service_level_objective.rb', line 1604

def comparison_operator
  @comparison_operator
end

#metric_thresholdNumeric? (readonly)

This value is the threshold that the observed metric values of the SLI metric are compared to.



1609
1610
1611
# File 'application_signals/cfn_service_level_objective.rb', line 1609

def metric_threshold
  @metric_threshold
end

#request_based_sli_metricAWSCDK::IResolvable, AWSCDK::ApplicationSignals::CfnServiceLevelObjective::RequestBasedSliMetricProperty (readonly)

A structure that contains information about the metric that the SLO monitors.



1599
1600
1601
# File 'application_signals/cfn_service_level_objective.rb', line 1599

def request_based_sli_metric
  @request_based_sli_metric
end

Class Method Details

.jsii_propertiesObject



1611
1612
1613
1614
1615
1616
1617
# File 'application_signals/cfn_service_level_objective.rb', line 1611

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

Instance Method Details

#to_jsiiObject



1619
1620
1621
1622
1623
1624
1625
1626
1627
# File 'application_signals/cfn_service_level_objective.rb', line 1619

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