Class: AWSCDK::CloudWatch::DashboardVariableOptions

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
cloud_watch/dashboard_variable_options.rb

Overview

Options for DashboardVariable.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id:, input_type:, type:, value:, default_value: nil, label: nil, values: nil, visible: nil) ⇒ DashboardVariableOptions

Returns a new instance of DashboardVariableOptions.

Parameters:

  • id (String)

    Unique id.

  • input_type (AWSCDK::CloudWatch::VariableInputType)

    The way the variable value is selected.

  • type (AWSCDK::CloudWatch::VariableType)

    Type of the variable.

  • value (String)

    Pattern or property value to replace.

  • default_value (AWSCDK::CloudWatch::DefaultValue, nil) (defaults to: nil)

    Optional default value.

  • label (String, nil) (defaults to: nil)

    Optional label in the toolbar.

  • values (AWSCDK::CloudWatch::Values, nil) (defaults to: nil)

    Optional values (required for VariableInputType.RADIO and VariableInputType.SELECT dashboard variables).

  • visible (Boolean, nil) (defaults to: nil)

    Whether the variable is visible.



15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'cloud_watch/dashboard_variable_options.rb', line 15

def initialize(id:, input_type:, type:, value:, default_value: nil, label: nil, values: nil, visible: nil)
  @id = id
  Jsii::Type.check_type(@id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id")
  @input_type = input_type
  Jsii::Type.check_type(@input_type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5WYXJpYWJsZUlucHV0VHlwZSJ9")), "inputType")
  @type = type
  Jsii::Type.check_type(@type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5WYXJpYWJsZVR5cGUifQ==")), "type")
  @value = value
  Jsii::Type.check_type(@value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "value")
  @default_value = default_value
  Jsii::Type.check_type(@default_value, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5EZWZhdWx0VmFsdWUifQ==")), "defaultValue") unless @default_value.nil?
  @label = label
  Jsii::Type.check_type(@label, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "label") unless @label.nil?
  @values = values
  Jsii::Type.check_type(@values, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5WYWx1ZXMifQ==")), "values") unless @values.nil?
  @visible = visible
  Jsii::Type.check_type(@visible, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "visible") unless @visible.nil?
end

Instance Attribute Details

#default_valueAWSCDK::CloudWatch::DefaultValue? (readonly)

Note:

Default: - no default value is set

Optional default value.



54
55
56
# File 'cloud_watch/dashboard_variable_options.rb', line 54

def default_value
  @default_value
end

#idString (readonly)

Unique id.

Returns:

  • (String)


37
38
39
# File 'cloud_watch/dashboard_variable_options.rb', line 37

def id
  @id
end

#input_typeAWSCDK::CloudWatch::VariableInputType (readonly)

The way the variable value is selected.



41
42
43
# File 'cloud_watch/dashboard_variable_options.rb', line 41

def input_type
  @input_type
end

#labelString? (readonly)

Note:

Default: - the variable's value

Optional label in the toolbar.

Returns:

  • (String, nil)


59
60
61
# File 'cloud_watch/dashboard_variable_options.rb', line 59

def label
  @label
end

#typeAWSCDK::CloudWatch::VariableType (readonly)

Type of the variable.



45
46
47
# File 'cloud_watch/dashboard_variable_options.rb', line 45

def type
  @type
end

#valueString (readonly)

Pattern or property value to replace.

Returns:

  • (String)


49
50
51
# File 'cloud_watch/dashboard_variable_options.rb', line 49

def value
  @value
end

#valuesAWSCDK::CloudWatch::Values? (readonly)

Note:

Default: - no values

Optional values (required for VariableInputType.RADIO and VariableInputType.SELECT dashboard variables).

Returns:



64
65
66
# File 'cloud_watch/dashboard_variable_options.rb', line 64

def values
  @values
end

#visibleBoolean? (readonly)

Note:

Default: - true

Whether the variable is visible.

Returns:

  • (Boolean, nil)


69
70
71
# File 'cloud_watch/dashboard_variable_options.rb', line 69

def visible
  @visible
end

Class Method Details

.jsii_propertiesObject



71
72
73
74
75
76
77
78
79
80
81
82
# File 'cloud_watch/dashboard_variable_options.rb', line 71

def self.jsii_properties
  {
    :id => "id",
    :input_type => "inputType",
    :type => "type",
    :value => "value",
    :default_value => "defaultValue",
    :label => "label",
    :values => "values",
    :visible => "visible",
  }
end

Instance Method Details

#to_jsiiObject



84
85
86
87
88
89
90
91
92
93
94
95
96
97
# File 'cloud_watch/dashboard_variable_options.rb', line 84

def to_jsii
  result = {}
  result.merge!({
    "id" => @id,
    "inputType" => @input_type,
    "type" => @type,
    "value" => @value,
    "defaultValue" => @default_value,
    "label" => @label,
    "values" => @values,
    "visible" => @visible,
  })
  result.compact
end