Class: AWSCDK::CloudWatch::AlarmStatusWidgetProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::CloudWatch::AlarmStatusWidgetProps
- Defined in:
- cloud_watch/alarm_status_widget_props.rb
Overview
Properties for an Alarm Status Widget.
Instance Attribute Summary collapse
-
#alarms ⇒ Array<AWSCDK::Interfaces::AWSCloudwatch::IAlarmRef>
readonly
CloudWatch Alarms to show in widget.
-
#height ⇒ Numeric?
readonly
Height of the widget.
-
#sort_by ⇒ AWSCDK::CloudWatch::AlarmStatusWidgetSortBy?
readonly
Specifies how to sort the alarms in the widget.
-
#states ⇒ Array<AWSCDK::CloudWatch::AlarmState>?
readonly
Use this field to filter the list of alarms displayed in the widget to only those alarms currently in the specified states.
-
#title ⇒ String?
readonly
The title of the widget.
-
#width ⇒ Numeric?
readonly
Width of the widget, in a grid of 24 units wide.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(alarms:, height: nil, sort_by: nil, states: nil, title: nil, width: nil) ⇒ AlarmStatusWidgetProps
constructor
A new instance of AlarmStatusWidgetProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(alarms:, height: nil, sort_by: nil, states: nil, title: nil, width: nil) ⇒ AlarmStatusWidgetProps
Returns a new instance of AlarmStatusWidgetProps.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'cloud_watch/alarm_status_widget_props.rb', line 13 def initialize(alarms:, height: nil, sort_by: nil, states: nil, title: nil, width: nil) @alarms = alarms Jsii::Type.check_type(@alarms, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmludGVyZmFjZXMuYXdzX2Nsb3Vkd2F0Y2guSUFsYXJtUmVmIn0sImtpbmQiOiJhcnJheSJ9fQ==")), "alarms") @height = height Jsii::Type.check_type(@height, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "height") unless @height.nil? @sort_by = sort_by Jsii::Type.check_type(@sort_by, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5BbGFybVN0YXR1c1dpZGdldFNvcnRCeSJ9")), "sortBy") unless @sort_by.nil? @states = states Jsii::Type.check_type(@states, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jbG91ZHdhdGNoLkFsYXJtU3RhdGUifSwia2luZCI6ImFycmF5In19")), "states") unless @states.nil? @title = title Jsii::Type.check_type(@title, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "title") unless @title.nil? @width = width Jsii::Type.check_type(@width, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "width") unless @width.nil? end |
Instance Attribute Details
#alarms ⇒ Array<AWSCDK::Interfaces::AWSCloudwatch::IAlarmRef> (readonly)
CloudWatch Alarms to show in widget.
31 32 33 |
# File 'cloud_watch/alarm_status_widget_props.rb', line 31 def alarms @alarms end |
#height ⇒ Numeric? (readonly)
Default: 3
Height of the widget.
36 37 38 |
# File 'cloud_watch/alarm_status_widget_props.rb', line 36 def height @height end |
#sort_by ⇒ AWSCDK::CloudWatch::AlarmStatusWidgetSortBy? (readonly)
Default: - alphabetical order
Specifies how to sort the alarms in the widget.
41 42 43 |
# File 'cloud_watch/alarm_status_widget_props.rb', line 41 def sort_by @sort_by end |
#states ⇒ Array<AWSCDK::CloudWatch::AlarmState>? (readonly)
Default: - all the alarms specified in alarms are displayed.
Use this field to filter the list of alarms displayed in the widget to only those alarms currently in the specified states.
You can specify one or more alarm states in the value for this field. The alarm states that you can specify are ALARM, INSUFFICIENT_DATA, and OK.
If you omit this field or specify an empty array, all the alarms specified in alarms are displayed.
51 52 53 |
# File 'cloud_watch/alarm_status_widget_props.rb', line 51 def states @states end |
#title ⇒ String? (readonly)
Default: 'Alarm Status'
The title of the widget.
56 57 58 |
# File 'cloud_watch/alarm_status_widget_props.rb', line 56 def title @title end |
#width ⇒ Numeric? (readonly)
Default: 6
Width of the widget, in a grid of 24 units wide.
61 62 63 |
# File 'cloud_watch/alarm_status_widget_props.rb', line 61 def width @width end |
Class Method Details
.jsii_properties ⇒ Object
63 64 65 66 67 68 69 70 71 72 |
# File 'cloud_watch/alarm_status_widget_props.rb', line 63 def self.jsii_properties { :alarms => "alarms", :height => "height", :sort_by => "sortBy", :states => "states", :title => "title", :width => "width", } end |
Instance Method Details
#to_jsii ⇒ Object
74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'cloud_watch/alarm_status_widget_props.rb', line 74 def to_jsii result = {} result.merge!({ "alarms" => @alarms, "height" => @height, "sortBy" => @sort_by, "states" => @states, "title" => @title, "width" => @width, }) result.compact end |