Class: AWSCDK::IoT::CfnDimensionProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
io_t/cfn_dimension_props.rb

Overview

Properties for defining a CfnDimension.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(string_values:, type:, name: nil, tags: nil) ⇒ CfnDimensionProps

Returns a new instance of CfnDimensionProps.

Parameters:

  • string_values (Array<String>)

    Specifies the value or list of values for the dimension.

  • type (String)

    Specifies the type of dimension.

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

    A unique identifier for the dimension.

  • tags (Array<AWSCDK::CfnTag>, nil) (defaults to: nil)

    Metadata that can be used to manage the dimension.



13
14
15
16
17
18
19
20
21
22
# File 'io_t/cfn_dimension_props.rb', line 13

def initialize(string_values:, type:, name: nil, tags: nil)
  @string_values = string_values
  Jsii::Type.check_type(@string_values, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "stringValues")
  @type = type
  Jsii::Type.check_type(@type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "type")
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") unless @name.nil?
  @tags = tags.is_a?(Array) ? tags.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil?
end

Instance Attribute Details

#nameString? (readonly)

A unique identifier for the dimension.



42
43
44
# File 'io_t/cfn_dimension_props.rb', line 42

def name
  @name
end

#string_valuesArray<String> (readonly)

Specifies the value or list of values for the dimension.

For TOPIC_FILTER dimensions, this is a pattern used to match the MQTT topic (for example, "admin/#").



30
31
32
# File 'io_t/cfn_dimension_props.rb', line 30

def string_values
  @string_values
end

#tagsArray<AWSCDK::CfnTag>? (readonly)

Metadata that can be used to manage the dimension.



47
48
49
# File 'io_t/cfn_dimension_props.rb', line 47

def tags
  @tags
end

#typeString (readonly)

Specifies the type of dimension.

Supported types: TOPIC_FILTER.



37
38
39
# File 'io_t/cfn_dimension_props.rb', line 37

def type
  @type
end

Class Method Details

.jsii_propertiesObject



49
50
51
52
53
54
55
56
# File 'io_t/cfn_dimension_props.rb', line 49

def self.jsii_properties
  {
    :string_values => "stringValues",
    :type => "type",
    :name => "name",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



58
59
60
61
62
63
64
65
66
67
# File 'io_t/cfn_dimension_props.rb', line 58

def to_jsii
  result = {}
  result.merge!({
    "stringValues" => @string_values,
    "type" => @type,
    "name" => @name,
    "tags" => @tags,
  })
  result.compact
end