Class: AWSCDK::EMR::CfnCluster::CloudWatchAlarmDefinitionProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EMR::CfnCluster::CloudWatchAlarmDefinitionProperty
- Defined in:
- emr/cfn_cluster.rb
Overview
CloudWatchAlarmDefinition is a subproperty of the ScalingTrigger property, which determines when to trigger an automatic scaling activity.
Scaling activity begins when you satisfy the defined alarm conditions.
Instance Attribute Summary collapse
-
#comparison_operator ⇒ String
readonly
Determines how the metric specified by
MetricNameis compared to the value specified byThreshold. -
#dimensions ⇒ AWSCDK::IResolvable, ...
readonly
A CloudWatch metric dimension.
-
#evaluation_periods ⇒ Numeric?
readonly
The number of periods, in five-minute increments, during which the alarm condition must exist before the alarm triggers automatic scaling activity.
-
#metric_name ⇒ String
readonly
The name of the CloudWatch metric that is watched to determine an alarm condition.
-
#namespace ⇒ String?
readonly
The namespace for the CloudWatch metric.
-
#period ⇒ Numeric
readonly
The period, in seconds, over which the statistic is applied.
-
#statistic ⇒ String?
readonly
The statistic to apply to the metric associated with the alarm.
-
#threshold ⇒ Numeric
readonly
The value against which the specified statistic is compared.
-
#unit ⇒ String?
readonly
The unit of measure associated with the CloudWatch metric being watched.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(comparison_operator:, metric_name:, period:, threshold:, dimensions: nil, evaluation_periods: nil, namespace: nil, statistic: nil, unit: nil) ⇒ CloudWatchAlarmDefinitionProperty
constructor
A new instance of CloudWatchAlarmDefinitionProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(comparison_operator:, metric_name:, period:, threshold:, dimensions: nil, evaluation_periods: nil, namespace: nil, statistic: nil, unit: nil) ⇒ CloudWatchAlarmDefinitionProperty
Returns a new instance of CloudWatchAlarmDefinitionProperty.
1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 |
# File 'emr/cfn_cluster.rb', line 1092 def initialize(comparison_operator:, metric_name:, period:, threshold:, dimensions: nil, evaluation_periods: nil, namespace: nil, statistic: nil, unit: nil) @comparison_operator = comparison_operator Jsii::Type.check_type(@comparison_operator, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "comparisonOperator") @metric_name = metric_name Jsii::Type.check_type(@metric_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "metricName") @period = period Jsii::Type.check_type(@period, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "period") @threshold = threshold Jsii::Type.check_type(@threshold, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "threshold") @dimensions = dimensions Jsii::Type.check_type(@dimensions, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZW1yLkNmbkNsdXN0ZXIuTWV0cmljRGltZW5zaW9uUHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "dimensions") unless @dimensions.nil? @evaluation_periods = evaluation_periods Jsii::Type.check_type(@evaluation_periods, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "evaluationPeriods") unless @evaluation_periods.nil? @namespace = namespace Jsii::Type.check_type(@namespace, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "namespace") unless @namespace.nil? @statistic = statistic Jsii::Type.check_type(@statistic, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "statistic") unless @statistic.nil? @unit = unit Jsii::Type.check_type(@unit, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "unit") unless @unit.nil? end |
Instance Attribute Details
#comparison_operator ⇒ String (readonly)
Determines how the metric specified by MetricName is compared to the value specified by Threshold .
1117 1118 1119 |
# File 'emr/cfn_cluster.rb', line 1117 def comparison_operator @comparison_operator end |
#dimensions ⇒ AWSCDK::IResolvable, ... (readonly)
A CloudWatch metric dimension.
1139 1140 1141 |
# File 'emr/cfn_cluster.rb', line 1139 def dimensions @dimensions end |
#evaluation_periods ⇒ Numeric? (readonly)
The number of periods, in five-minute increments, during which the alarm condition must exist before the alarm triggers automatic scaling activity.
The default value is 1 .
1146 1147 1148 |
# File 'emr/cfn_cluster.rb', line 1146 def evaluation_periods @evaluation_periods end |
#metric_name ⇒ String (readonly)
The name of the CloudWatch metric that is watched to determine an alarm condition.
1122 1123 1124 |
# File 'emr/cfn_cluster.rb', line 1122 def metric_name @metric_name end |
#namespace ⇒ String? (readonly)
The namespace for the CloudWatch metric.
The default is AWS/ElasticMapReduce .
1153 1154 1155 |
# File 'emr/cfn_cluster.rb', line 1153 def namespace @namespace end |
#period ⇒ Numeric (readonly)
The period, in seconds, over which the statistic is applied.
CloudWatch metrics for Amazon EMR are emitted every five minutes (300 seconds), so if you specify a CloudWatch metric, specify 300 .
1129 1130 1131 |
# File 'emr/cfn_cluster.rb', line 1129 def period @period end |
#statistic ⇒ String? (readonly)
The statistic to apply to the metric associated with the alarm.
The default is AVERAGE .
1160 1161 1162 |
# File 'emr/cfn_cluster.rb', line 1160 def statistic @statistic end |
#threshold ⇒ Numeric (readonly)
The value against which the specified statistic is compared.
1134 1135 1136 |
# File 'emr/cfn_cluster.rb', line 1134 def threshold @threshold end |
#unit ⇒ String? (readonly)
The unit of measure associated with the CloudWatch metric being watched.
The value specified for Unit must correspond to the units specified in the CloudWatch metric.
1167 1168 1169 |
# File 'emr/cfn_cluster.rb', line 1167 def unit @unit end |
Class Method Details
.jsii_properties ⇒ Object
1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 |
# File 'emr/cfn_cluster.rb', line 1169 def self.jsii_properties { :comparison_operator => "comparisonOperator", :metric_name => "metricName", :period => "period", :threshold => "threshold", :dimensions => "dimensions", :evaluation_periods => "evaluationPeriods", :namespace => "namespace", :statistic => "statistic", :unit => "unit", } end |
Instance Method Details
#to_jsii ⇒ Object
1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 |
# File 'emr/cfn_cluster.rb', line 1183 def to_jsii result = {} result.merge!({ "comparisonOperator" => @comparison_operator, "metricName" => @metric_name, "period" => @period, "threshold" => @threshold, "dimensions" => @dimensions, "evaluationPeriods" => @evaluation_periods, "namespace" => @namespace, "statistic" => @statistic, "unit" => @unit, }) result.compact end |