Class: AWSCDK::CloudWatch::Spacer

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

Overview

A widget that doesn't display anything but takes up space.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(props = nil) ⇒ Spacer

Returns a new instance of Spacer.

Parameters:



10
11
12
13
14
# File 'cloud_watch/spacer.rb', line 10

def initialize(props = nil)
  props = props.is_a?(Hash) ? ::AWSCDK::CloudWatch::SpacerProps.new(**props.transform_keys(&:to_sym)) : props
  Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5TcGFjZXJQcm9wcyJ9")), "props") unless props.nil?
  Jsii::Object.instance_method(:initialize).bind(self).call(props)
end

Class Method Details

.jsii_overridable_methodsObject



16
17
18
19
20
21
22
23
# File 'cloud_watch/spacer.rb', line 16

def self.jsii_overridable_methods
  {
    :height => { kind: :property, name: "height", is_optional: false },
    :width => { kind: :property, name: "width", is_optional: false },
    :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)


28
29
30
# File 'cloud_watch/spacer.rb', line 28

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)


44
45
46
47
48
# File 'cloud_watch/spacer.rb', line 44

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


53
54
55
# File 'cloud_watch/spacer.rb', line 53

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

#widthNumeric

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

Returns:

  • (Numeric)


35
36
37
# File 'cloud_watch/spacer.rb', line 35

def width()
  jsii_get_property("width")
end