Class: AWSCDK::CloudWatch::Row

Inherits:
Jsii::Object
  • Object
show all
Includes:
IWidget
Defined in:
cloud_watch/row.rb

Overview

A widget that contains other widgets in a horizontal row.

Widgets will be laid out next to each other

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*widgets) ⇒ Row

Returns a new instance of Row.

Parameters:



12
13
14
15
16
17
# File 'cloud_watch/row.rb', line 12

def initialize(*widgets)
  widgets.each_with_index do |item, index|
    Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5JV2lkZ2V0In0=")), "widgets[#{index}]")
  end
  Jsii::Object.instance_method(:initialize).bind(self).call(*widgets)
end

Class Method Details

.jsii_overridable_methodsObject



19
20
21
22
23
24
25
26
27
28
# File 'cloud_watch/row.rb', line 19

def self.jsii_overridable_methods
  {
    :height => { kind: :property, name: "height", is_optional: false },
    :widgets => { kind: :property, name: "widgets", is_optional: false },
    :width => { kind: :property, name: "width", is_optional: false },
    :add_widget => { kind: :method, name: "addWidget", is_optional: false },
    :position => { kind: :method, name: "position", is_optional: false },
    :to_json => { kind: :method, name: "toJson", is_optional: false },
  }
end

Instance Method Details

#add_widget(w) ⇒ void

This method returns an undefined value.

Add the widget to this container.

Parameters:



55
56
57
58
# File 'cloud_watch/row.rb', line 55

def add_widget(w)
  Jsii::Type.check_type(w, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5JV2lkZ2V0In0=")), "w")
  jsii_call_method("addWidget", [w])
end

#heightNumeric

The amount of vertical grid units the widget will take up.

Returns:

  • (Numeric)


33
34
35
# File 'cloud_watch/row.rb', line 33

def height()
  jsii_get_property("height")
end

#position(x, y) ⇒ void

This method returns an undefined value.

Place the widget at a given position.

Parameters:

  • x (Numeric)
  • y (Numeric)


65
66
67
68
69
# File 'cloud_watch/row.rb', line 65

def position(x, y)
  Jsii::Type.check_type(x, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "x")
  Jsii::Type.check_type(y, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "y")
  jsii_call_method("position", [x, y])
end

#to_jsonArray<Object>

Return the widget JSON for use in the dashboard.

Returns:

  • (Array<Object>)


74
75
76
# File 'cloud_watch/row.rb', line 74

def to_json()
  jsii_call_method("toJson", [])
end

#widgetsArray<AWSCDK::CloudWatch::IWidget>

List of contained widgets.

Returns:



40
41
42
# File 'cloud_watch/row.rb', line 40

def widgets()
  jsii_get_property("widgets")
end

#widthNumeric

The amount of horizontal grid units the widget will take up.

Returns:

  • (Numeric)


47
48
49
# File 'cloud_watch/row.rb', line 47

def width()
  jsii_get_property("width")
end