Module: AWSCDK::CloudWatch::IWidget

Included in:
Column, ConcreteWidget, Row, Spacer
Defined in:
cloud_watch/i_widget.rb

Overview

A single dashboard widget.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.jsii_overridable_methodsObject



54
55
56
57
58
59
60
61
62
63
# File 'cloud_watch/i_widget.rb', line 54

def self.jsii_overridable_methods
  {
    :height => { kind: :property, name: "height", is_optional: false },
    :width => { kind: :property, name: "width", is_optional: false },
    :warnings => { kind: :property, name: "warnings", is_optional: true },
    :warnings_v2 => { kind: :property, name: "warningsV2", is_optional: true },
    :position => { kind: :method, name: "position", is_optional: false },
    :to_json => { kind: :method, name: "toJson", is_optional: false },
  }
end

Instance Method Details

#heightNumeric

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

Returns:

  • (Numeric)


10
11
12
# File 'cloud_watch/i_widget.rb', line 10

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)


41
42
43
44
45
# File 'cloud_watch/i_widget.rb', line 41

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>)


50
51
52
# File 'cloud_watch/i_widget.rb', line 50

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

#warningsArray<String>?

Deprecated.
  • use warningsV2

Any warnings that are produced as a result of putting together this widget.

Returns:

  • (Array<String>, nil)


25
26
27
# File 'cloud_watch/i_widget.rb', line 25

def warnings()
  jsii_get_property("warnings")
end

#warnings_v2Hash{String => String}?

Any warnings that are produced as a result of putting together this widget.

Returns:

  • (Hash{String => String}, nil)


32
33
34
# File 'cloud_watch/i_widget.rb', line 32

def warnings_v2()
  jsii_get_property("warningsV2")
end

#widthNumeric

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

Returns:

  • (Numeric)


17
18
19
# File 'cloud_watch/i_widget.rb', line 17

def width()
  jsii_get_property("width")
end