Class: AWSCDK::ApplicationSignals::CfnServiceLevelObjective::MetricStatProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::ApplicationSignals::CfnServiceLevelObjective::MetricStatProperty
- Defined in:
- application_signals/cfn_service_level_objective.rb
Overview
This structure defines the metric to be used as the service level indicator, along with the statistics, period, and unit.
Instance Attribute Summary collapse
-
#metric ⇒ AWSCDK::IResolvable, AWSCDK::ApplicationSignals::CfnServiceLevelObjective::MetricProperty
readonly
The metric to use as the service level indicator, including the metric name, namespace, and dimensions.
-
#period ⇒ Numeric
readonly
The granularity, in seconds, to be used for the metric.
-
#stat ⇒ String
readonly
The statistic to use for comparison to the threshold.
-
#unit ⇒ String?
readonly
If you omit
Unitthen all data that was collected with any unit is returned, along with the corresponding units that were specified when the data was reported to CloudWatch.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(metric:, period:, stat:, unit: nil) ⇒ MetricStatProperty
constructor
A new instance of MetricStatProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(metric:, period:, stat:, unit: nil) ⇒ MetricStatProperty
Returns a new instance of MetricStatProperty.
1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 |
# File 'application_signals/cfn_service_level_objective.rb', line 1313 def initialize(metric:, period:, stat:, unit: nil) @metric = metric.is_a?(Hash) ? ::AWSCDK::ApplicationSignals::CfnServiceLevelObjective::MetricProperty.new(**metric.transform_keys(&:to_sym)) : metric Jsii::Type.check_type(@metric, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcHBsaWNhdGlvbnNpZ25hbHMuQ2ZuU2VydmljZUxldmVsT2JqZWN0aXZlLk1ldHJpY1Byb3BlcnR5In1dfX0=")), "metric") @period = period Jsii::Type.check_type(@period, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "period") @stat = stat Jsii::Type.check_type(@stat, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "stat") @unit = unit Jsii::Type.check_type(@unit, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "unit") unless @unit.nil? end |
Instance Attribute Details
#metric ⇒ AWSCDK::IResolvable, AWSCDK::ApplicationSignals::CfnServiceLevelObjective::MetricProperty (readonly)
The metric to use as the service level indicator, including the metric name, namespace, and dimensions.
1328 1329 1330 |
# File 'application_signals/cfn_service_level_objective.rb', line 1328 def metric @metric end |
#period ⇒ Numeric (readonly)
The granularity, in seconds, to be used for the metric.
For metrics with regular resolution, a period can be as short as one minute (60 seconds) and must be a multiple of 60. For high-resolution metrics that are collected at intervals of less than one minute, the period can be 1, 5, 10, 30, 60, or any multiple of 60. High-resolution metrics are those metrics stored by a PutMetricData call that includes a StorageResolution of 1 second.
1335 1336 1337 |
# File 'application_signals/cfn_service_level_objective.rb', line 1335 def period @period end |
#stat ⇒ String (readonly)
The statistic to use for comparison to the threshold.
It can be any CloudWatch statistic or extended statistic. For more information about statistics, see CloudWatch statistics definitions .
1342 1343 1344 |
# File 'application_signals/cfn_service_level_objective.rb', line 1342 def stat @stat end |
#unit ⇒ String? (readonly)
If you omit Unit then all data that was collected with any unit is returned, along with the corresponding units that were specified when the data was reported to CloudWatch.
If you specify a unit, the operation returns only data that was collected with that unit specified. If you specify a unit that does not match the data collected, the results of the operation are null. CloudWatch does not perform unit conversions.
1349 1350 1351 |
# File 'application_signals/cfn_service_level_objective.rb', line 1349 def unit @unit end |
Class Method Details
.jsii_properties ⇒ Object
1351 1352 1353 1354 1355 1356 1357 1358 |
# File 'application_signals/cfn_service_level_objective.rb', line 1351 def self.jsii_properties { :metric => "metric", :period => "period", :stat => "stat", :unit => "unit", } end |
Instance Method Details
#to_jsii ⇒ Object
1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 |
# File 'application_signals/cfn_service_level_objective.rb', line 1360 def to_jsii result = {} result.merge!({ "metric" => @metric, "period" => @period, "stat" => @stat, "unit" => @unit, }) result.compact end |