Class: AWSCDK::IoT::CfnTopicRule::CloudwatchAlarmActionProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
io_t/cfn_topic_rule.rb

Overview

Describes an action that updates a CloudWatch alarm.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(alarm_name:, role_arn:, state_reason:, state_value:) ⇒ CloudwatchAlarmActionProperty

Returns a new instance of CloudwatchAlarmActionProperty.

Parameters:

  • alarm_name (String)

    The CloudWatch alarm name.

  • role_arn (String)

    The IAM role that allows access to the CloudWatch alarm.

  • state_reason (String)

    The reason for the alarm change.

  • state_value (String)

    The value of the alarm state.



1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
# File 'io_t/cfn_topic_rule.rb', line 1048

def initialize(alarm_name:, role_arn:, state_reason:, state_value:)
  @alarm_name = alarm_name
  Jsii::Type.check_type(@alarm_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "alarmName")
  @role_arn = role_arn
  Jsii::Type.check_type(@role_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "roleArn")
  @state_reason = state_reason
  Jsii::Type.check_type(@state_reason, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "stateReason")
  @state_value = state_value
  Jsii::Type.check_type(@state_value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "stateValue")
end

Instance Attribute Details

#alarm_nameString (readonly)

The CloudWatch alarm name.



1063
1064
1065
# File 'io_t/cfn_topic_rule.rb', line 1063

def alarm_name
  @alarm_name
end

#role_arnString (readonly)

The IAM role that allows access to the CloudWatch alarm.



1068
1069
1070
# File 'io_t/cfn_topic_rule.rb', line 1068

def role_arn
  @role_arn
end

#state_reasonString (readonly)

The reason for the alarm change.



1073
1074
1075
# File 'io_t/cfn_topic_rule.rb', line 1073

def state_reason
  @state_reason
end

#state_valueString (readonly)

The value of the alarm state.

Acceptable values are: OK, ALARM, INSUFFICIENT_DATA.



1080
1081
1082
# File 'io_t/cfn_topic_rule.rb', line 1080

def state_value
  @state_value
end

Class Method Details

.jsii_propertiesObject



1082
1083
1084
1085
1086
1087
1088
1089
# File 'io_t/cfn_topic_rule.rb', line 1082

def self.jsii_properties
  {
    :alarm_name => "alarmName",
    :role_arn => "roleArn",
    :state_reason => "stateReason",
    :state_value => "stateValue",
  }
end

Instance Method Details

#to_jsiiObject



1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
# File 'io_t/cfn_topic_rule.rb', line 1091

def to_jsii
  result = {}
  result.merge!({
    "alarmName" => @alarm_name,
    "roleArn" => @role_arn,
    "stateReason" => @state_reason,
    "stateValue" => @state_value,
  })
  result.compact
end