Class: AWSCDK::CloudWatch::TableWidgetProps
- Inherits:
-
MetricWidgetProps
- Object
- MetricWidgetProps
- AWSCDK::CloudWatch::TableWidgetProps
- Defined in:
- cloud_watch/table_widget_props.rb
Overview
Properties for a TableWidget.
Instance Attribute Summary collapse
-
#_end ⇒ String?
readonly
The end of the time range to use for each widget independently from those of the dashboard.
-
#account_id ⇒ String?
readonly
The AWS account ID where the metrics are located.
-
#full_precision ⇒ Boolean?
readonly
Whether to show as many digits as can fit, before rounding.
-
#height ⇒ Numeric?
readonly
Height of the widget.
-
#layout ⇒ AWSCDK::CloudWatch::TableLayout?
readonly
Table layout.
-
#live_data ⇒ Boolean?
readonly
Whether the graph should show live data.
-
#metrics ⇒ Array<AWSCDK::CloudWatch::IMetric>?
readonly
Metrics to display in the table.
-
#period ⇒ AWSCDK::Duration?
readonly
The default period for all metrics in this widget.
-
#region ⇒ String?
readonly
The region the metrics of this graph should be taken from.
-
#set_period_to_time_range ⇒ Boolean?
readonly
Whether to show the value from the entire time range.
-
#show_units_in_label ⇒ Boolean?
readonly
Show the metrics units in the label column.
-
#start ⇒ String?
readonly
The start of the time range to use for each widget independently from those of the dashboard.
-
#statistic ⇒ String?
readonly
The default statistic to be displayed for each metric.
-
#summary ⇒ AWSCDK::CloudWatch::TableSummaryProps?
readonly
Properties for displaying summary columns.
-
#thresholds ⇒ Array<AWSCDK::CloudWatch::TableThreshold>?
readonly
Thresholds for highlighting table cells.
-
#title ⇒ String?
readonly
Title for the graph.
-
#width ⇒ Numeric?
readonly
Width of the widget, in a grid of 24 units wide.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(account_id: nil, height: nil, region: nil, title: nil, width: nil, _end: nil, full_precision: nil, layout: nil, live_data: nil, metrics: nil, period: nil, set_period_to_time_range: nil, show_units_in_label: nil, start: nil, statistic: nil, summary: nil, thresholds: nil) ⇒ TableWidgetProps
constructor
A new instance of TableWidgetProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(account_id: nil, height: nil, region: nil, title: nil, width: nil, _end: nil, full_precision: nil, layout: nil, live_data: nil, metrics: nil, period: nil, set_period_to_time_range: nil, show_units_in_label: nil, start: nil, statistic: nil, summary: nil, thresholds: nil) ⇒ TableWidgetProps
Returns a new instance of TableWidgetProps.
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'cloud_watch/table_widget_props.rb', line 24 def initialize(account_id: nil, height: nil, region: nil, title: nil, width: nil, _end: nil, full_precision: nil, layout: nil, live_data: nil, metrics: nil, period: nil, set_period_to_time_range: nil, show_units_in_label: nil, start: nil, statistic: nil, summary: nil, thresholds: nil) @account_id = account_id Jsii::Type.check_type(@account_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "accountId") unless @account_id.nil? @height = height Jsii::Type.check_type(@height, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "height") unless @height.nil? @region = region Jsii::Type.check_type(@region, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "region") unless @region.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 = _end Jsii::Type.check_type(@_end, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "end") unless @_end.nil? @full_precision = full_precision Jsii::Type.check_type(@full_precision, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "fullPrecision") unless @full_precision.nil? @layout = layout Jsii::Type.check_type(@layout, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5UYWJsZUxheW91dCJ9")), "layout") unless @layout.nil? @live_data = live_data Jsii::Type.check_type(@live_data, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "liveData") unless @live_data.nil? @metrics = metrics Jsii::Type.check_type(@metrics, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jbG91ZHdhdGNoLklNZXRyaWMifSwia2luZCI6ImFycmF5In19")), "metrics") unless @metrics.nil? @period = period Jsii::Type.check_type(@period, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "period") unless @period.nil? @set_period_to_time_range = set_period_to_time_range Jsii::Type.check_type(@set_period_to_time_range, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "setPeriodToTimeRange") unless @set_period_to_time_range.nil? @show_units_in_label = show_units_in_label Jsii::Type.check_type(@show_units_in_label, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "showUnitsInLabel") unless @show_units_in_label.nil? @start = start Jsii::Type.check_type(@start, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "start") unless @start.nil? @statistic = statistic Jsii::Type.check_type(@statistic, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "statistic") unless @statistic.nil? @summary = summary.is_a?(Hash) ? ::AWSCDK::CloudWatch::TableSummaryProps.new(**summary.transform_keys(&:to_sym)) : summary Jsii::Type.check_type(@summary, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5UYWJsZVN1bW1hcnlQcm9wcyJ9")), "summary") unless @summary.nil? @thresholds = thresholds Jsii::Type.check_type(@thresholds, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jbG91ZHdhdGNoLlRhYmxlVGhyZXNob2xkIn0sImtpbmQiOiJhcnJheSJ9fQ==")), "thresholds") unless @thresholds.nil? end |
Instance Attribute Details
#_end ⇒ String? (readonly)
Default: When the dashboard loads, the end date will be the current time.
The end of the time range to use for each widget independently from those of the dashboard.
If you specify a value for end, you must also specify a value for start. Specify an absolute time in the ISO 8601 format. For example, 2018-12-17T06:00:00.000Z.
100 101 102 |
# File 'cloud_watch/table_widget_props.rb', line 100 def _end @_end end |
#account_id ⇒ String? (readonly)
Default: - Current account
The AWS account ID where the metrics are located.
This enables cross-account functionality for CloudWatch dashboards. Before using this feature, ensure that proper cross-account sharing is configured between the monitoring account and source account.
For more information, see: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html
72 73 74 |
# File 'cloud_watch/table_widget_props.rb', line 72 def account_id @account_id end |
#full_precision ⇒ Boolean? (readonly)
Default: false
Whether to show as many digits as can fit, before rounding.
105 106 107 |
# File 'cloud_watch/table_widget_props.rb', line 105 def full_precision @full_precision end |
#height ⇒ Numeric? (readonly)
Default: - 6 for Alarm and Graph widgets. 3 for single value widgets where most recent value of a metric is displayed.
Height of the widget.
77 78 79 |
# File 'cloud_watch/table_widget_props.rb', line 77 def height @height end |
#layout ⇒ AWSCDK::CloudWatch::TableLayout? (readonly)
Default: - TableLayout.HORIZONTAL
Table layout.
110 111 112 |
# File 'cloud_watch/table_widget_props.rb', line 110 def layout @layout end |
#live_data ⇒ Boolean? (readonly)
Default: false
Whether the graph should show live data.
115 116 117 |
# File 'cloud_watch/table_widget_props.rb', line 115 def live_data @live_data end |
#metrics ⇒ Array<AWSCDK::CloudWatch::IMetric>? (readonly)
Default: - No metrics
Metrics to display in the table.
120 121 122 |
# File 'cloud_watch/table_widget_props.rb', line 120 def metrics @metrics end |
#period ⇒ AWSCDK::Duration? (readonly)
Default: cdk.Duration.seconds(300)
The default period for all metrics in this widget.
The period is the length of time represented by one data point on the graph. This default can be overridden within each metric definition.
128 129 130 |
# File 'cloud_watch/table_widget_props.rb', line 128 def period @period end |
#region ⇒ String? (readonly)
Default: - Current region
The region the metrics of this graph should be taken from.
82 83 84 |
# File 'cloud_watch/table_widget_props.rb', line 82 def region @region end |
#set_period_to_time_range ⇒ Boolean? (readonly)
Default: false
Whether to show the value from the entire time range. Only applicable for Bar and Pie charts.
If false, values will be from the most recent period of your chosen time range; if true, shows the value from the entire time range.
136 137 138 |
# File 'cloud_watch/table_widget_props.rb', line 136 def set_period_to_time_range @set_period_to_time_range end |
#show_units_in_label ⇒ Boolean? (readonly)
Default: - false
Show the metrics units in the label column.
141 142 143 |
# File 'cloud_watch/table_widget_props.rb', line 141 def show_units_in_label @show_units_in_label end |
#start ⇒ String? (readonly)
Default: When the dashboard loads, the start time will be the default time range.
The start of the time range to use for each widget independently from those of the dashboard.
You can specify start without specifying end to specify a relative time range that ends with the current time. In this case, the value of start must begin with -P, and you can use M, H, D, W and M as abbreviations for minutes, hours, days, weeks and months. For example, -PT8H shows the last 8 hours and -P3M shows the last three months. You can also use start along with an end field, to specify an absolute time range. When specifying an absolute time range, use the ISO 8601 format. For example, 2018-12-17T06:00:00.000Z.
152 153 154 |
# File 'cloud_watch/table_widget_props.rb', line 152 def start @start end |
#statistic ⇒ String? (readonly)
Default: - The statistic for each metric is used
The default statistic to be displayed for each metric.
This default can be overridden within the definition of each individual metric
159 160 161 |
# File 'cloud_watch/table_widget_props.rb', line 159 def statistic @statistic end |
#summary ⇒ AWSCDK::CloudWatch::TableSummaryProps? (readonly)
Default: - no summary columns are shown
Properties for displaying summary columns.
164 165 166 |
# File 'cloud_watch/table_widget_props.rb', line 164 def summary @summary end |
#thresholds ⇒ Array<AWSCDK::CloudWatch::TableThreshold>? (readonly)
Default: - No thresholds
Thresholds for highlighting table cells.
169 170 171 |
# File 'cloud_watch/table_widget_props.rb', line 169 def thresholds @thresholds end |
#title ⇒ String? (readonly)
Default: - None
Title for the graph.
87 88 89 |
# File 'cloud_watch/table_widget_props.rb', line 87 def title @title end |
#width ⇒ Numeric? (readonly)
Default: 6
Width of the widget, in a grid of 24 units wide.
92 93 94 |
# File 'cloud_watch/table_widget_props.rb', line 92 def width @width end |
Class Method Details
.jsii_properties ⇒ Object
171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 |
# File 'cloud_watch/table_widget_props.rb', line 171 def self.jsii_properties { :account_id => "accountId", :height => "height", :region => "region", :title => "title", :width => "width", :_end => "end", :full_precision => "fullPrecision", :layout => "layout", :live_data => "liveData", :metrics => "metrics", :period => "period", :set_period_to_time_range => "setPeriodToTimeRange", :show_units_in_label => "showUnitsInLabel", :start => "start", :statistic => "statistic", :summary => "summary", :thresholds => "thresholds", } end |
Instance Method Details
#to_jsii ⇒ Object
193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 |
# File 'cloud_watch/table_widget_props.rb', line 193 def to_jsii result = {} result.merge!(super) result.merge!({ "accountId" => @account_id, "height" => @height, "region" => @region, "title" => @title, "width" => @width, "end" => @_end, "fullPrecision" => @full_precision, "layout" => @layout, "liveData" => @live_data, "metrics" => @metrics, "period" => @period, "setPeriodToTimeRange" => @set_period_to_time_range, "showUnitsInLabel" => @show_units_in_label, "start" => @start, "statistic" => @statistic, "summary" => @summary, "thresholds" => @thresholds, }) result.compact end |