Class: AWSCDK::IoT::CfnTopicRule::CloudwatchMetricActionProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::IoT::CfnTopicRule::CloudwatchMetricActionProperty
- Defined in:
- io_t/cfn_topic_rule.rb
Overview
Describes an action that captures a CloudWatch metric.
Instance Attribute Summary collapse
-
#metric_name ⇒ String
readonly
The CloudWatch metric name.
-
#metric_namespace ⇒ String
readonly
The CloudWatch metric namespace name.
-
#metric_timestamp ⇒ String?
readonly
An optional Unix timestamp .
-
#metric_unit ⇒ String
readonly
The metric unit supported by CloudWatch.
-
#metric_value ⇒ String
readonly
The CloudWatch metric value.
-
#role_arn ⇒ String
readonly
The IAM role that allows access to the CloudWatch metric.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(metric_name:, metric_namespace:, metric_unit:, metric_value:, role_arn:, metric_timestamp: nil) ⇒ CloudwatchMetricActionProperty
constructor
A new instance of CloudwatchMetricActionProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(metric_name:, metric_namespace:, metric_unit:, metric_value:, role_arn:, metric_timestamp: nil) ⇒ CloudwatchMetricActionProperty
Returns a new instance of CloudwatchMetricActionProperty.
1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 |
# File 'io_t/cfn_topic_rule.rb', line 1168 def initialize(metric_name:, metric_namespace:, metric_unit:, metric_value:, role_arn:, metric_timestamp: nil) @metric_name = metric_name Jsii::Type.check_type(@metric_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "metricName") @metric_namespace = metric_namespace Jsii::Type.check_type(@metric_namespace, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "metricNamespace") @metric_unit = metric_unit Jsii::Type.check_type(@metric_unit, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "metricUnit") @metric_value = metric_value Jsii::Type.check_type(@metric_value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "metricValue") @role_arn = role_arn Jsii::Type.check_type(@role_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "roleArn") @metric_timestamp = Jsii::Type.check_type(@metric_timestamp, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "metricTimestamp") unless @metric_timestamp.nil? end |
Instance Attribute Details
#metric_name ⇒ String (readonly)
The CloudWatch metric name.
1187 1188 1189 |
# File 'io_t/cfn_topic_rule.rb', line 1187 def metric_name @metric_name end |
#metric_namespace ⇒ String (readonly)
The CloudWatch metric namespace name.
1192 1193 1194 |
# File 'io_t/cfn_topic_rule.rb', line 1192 def metric_namespace @metric_namespace end |
#metric_timestamp ⇒ String? (readonly)
An optional Unix timestamp .
1212 1213 1214 |
# File 'io_t/cfn_topic_rule.rb', line 1212 def @metric_timestamp end |
#metric_unit ⇒ String (readonly)
The metric unit supported by CloudWatch.
1197 1198 1199 |
# File 'io_t/cfn_topic_rule.rb', line 1197 def metric_unit @metric_unit end |
#metric_value ⇒ String (readonly)
The CloudWatch metric value.
1202 1203 1204 |
# File 'io_t/cfn_topic_rule.rb', line 1202 def metric_value @metric_value end |
#role_arn ⇒ String (readonly)
The IAM role that allows access to the CloudWatch metric.
1207 1208 1209 |
# File 'io_t/cfn_topic_rule.rb', line 1207 def role_arn @role_arn end |
Class Method Details
.jsii_properties ⇒ Object
1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 |
# File 'io_t/cfn_topic_rule.rb', line 1214 def self.jsii_properties { :metric_name => "metricName", :metric_namespace => "metricNamespace", :metric_unit => "metricUnit", :metric_value => "metricValue", :role_arn => "roleArn", :metric_timestamp => "metricTimestamp", } end |
Instance Method Details
#to_jsii ⇒ Object
1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 |
# File 'io_t/cfn_topic_rule.rb', line 1225 def to_jsii result = {} result.merge!({ "metricName" => @metric_name, "metricNamespace" => @metric_namespace, "metricUnit" => @metric_unit, "metricValue" => @metric_value, "roleArn" => @role_arn, "metricTimestamp" => @metric_timestamp, }) result.compact end |