Class: AWSCDK::IoTSiteWise::CfnPortal::AlarmsProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
io_t_site_wise/cfn_portal.rb

Overview

Contains the configuration information of an alarm created in an AWS IoT SiteWise Monitor portal.

You can use the alarm to monitor an asset property and get notified when the asset property value is outside a specified range. For more information, see Monitoring with alarms in the AWS IoT SiteWise Application Guide .

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(alarm_role_arn: nil, notification_lambda_arn: nil) ⇒ AlarmsProperty

Returns a new instance of AlarmsProperty.

Parameters:

  • alarm_role_arn (String, nil) (defaults to: nil)

    The ARN of the IAM role that allows the alarm to perform actions and access AWS resources and services, such as AWS IoT Events .

  • notification_lambda_arn (String, nil) (defaults to: nil)

    The ARN of the Lambda function that manages alarm notifications. For more information, see Managing alarm notifications in the AWS IoT Events Developer Guide .



697
698
699
700
701
702
# File 'io_t_site_wise/cfn_portal.rb', line 697

def initialize(alarm_role_arn: nil, notification_lambda_arn: nil)
  @alarm_role_arn = alarm_role_arn
  Jsii::Type.check_type(@alarm_role_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "alarmRoleArn") unless @alarm_role_arn.nil?
  @notification_lambda_arn = notification_lambda_arn
  Jsii::Type.check_type(@notification_lambda_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "notificationLambdaArn") unless @notification_lambda_arn.nil?
end

Instance Attribute Details

#alarm_role_arnString? (readonly)

The ARN of the IAM role that allows the alarm to perform actions and access AWS resources and services, such as AWS IoT Events .



708
709
710
# File 'io_t_site_wise/cfn_portal.rb', line 708

def alarm_role_arn
  @alarm_role_arn
end

#notification_lambda_arnString? (readonly)

The ARN of the Lambda function that manages alarm notifications. For more information, see Managing alarm notifications in the AWS IoT Events Developer Guide .



713
714
715
# File 'io_t_site_wise/cfn_portal.rb', line 713

def notification_lambda_arn
  @notification_lambda_arn
end

Class Method Details

.jsii_propertiesObject



715
716
717
718
719
720
# File 'io_t_site_wise/cfn_portal.rb', line 715

def self.jsii_properties
  {
    :alarm_role_arn => "alarmRoleArn",
    :notification_lambda_arn => "notificationLambdaArn",
  }
end

Instance Method Details

#to_jsiiObject



722
723
724
725
726
727
728
729
# File 'io_t_site_wise/cfn_portal.rb', line 722

def to_jsii
  result = {}
  result.merge!({
    "alarmRoleArn" => @alarm_role_arn,
    "notificationLambdaArn" => @notification_lambda_arn,
  })
  result.compact
end