Class: AWSCDK::EMR::CfnInstanceGroupConfig::CloudWatchAlarmDefinitionProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EMR::CfnInstanceGroupConfig::CloudWatchAlarmDefinitionProperty
- Defined in:
- emr/cfn_instance_group_config.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.
691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 |
# File 'emr/cfn_instance_group_config.rb', line 691 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("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZW1yLkNmbkluc3RhbmNlR3JvdXBDb25maWcuTWV0cmljRGltZW5zaW9uUHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "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 .
716 717 718 |
# File 'emr/cfn_instance_group_config.rb', line 716 def comparison_operator @comparison_operator end |
#dimensions ⇒ AWSCDK::IResolvable, ... (readonly)
A CloudWatch metric dimension.
738 739 740 |
# File 'emr/cfn_instance_group_config.rb', line 738 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 .
745 746 747 |
# File 'emr/cfn_instance_group_config.rb', line 745 def evaluation_periods @evaluation_periods end |
#metric_name ⇒ String (readonly)
The name of the CloudWatch metric that is watched to determine an alarm condition.
721 722 723 |
# File 'emr/cfn_instance_group_config.rb', line 721 def metric_name @metric_name end |
#namespace ⇒ String? (readonly)
The namespace for the CloudWatch metric.
The default is AWS/ElasticMapReduce .
752 753 754 |
# File 'emr/cfn_instance_group_config.rb', line 752 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 .
728 729 730 |
# File 'emr/cfn_instance_group_config.rb', line 728 def period @period end |
#statistic ⇒ String? (readonly)
The statistic to apply to the metric associated with the alarm.
The default is AVERAGE .
759 760 761 |
# File 'emr/cfn_instance_group_config.rb', line 759 def statistic @statistic end |
#threshold ⇒ Numeric (readonly)
The value against which the specified statistic is compared.
733 734 735 |
# File 'emr/cfn_instance_group_config.rb', line 733 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.
766 767 768 |
# File 'emr/cfn_instance_group_config.rb', line 766 def unit @unit end |
Class Method Details
.jsii_properties ⇒ Object
768 769 770 771 772 773 774 775 776 777 778 779 780 |
# File 'emr/cfn_instance_group_config.rb', line 768 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
782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 |
# File 'emr/cfn_instance_group_config.rb', line 782 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 |