Class: AWSCDK::IoT::CfnThingTypeProps

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

Overview

Properties for defining a CfnThingType.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(deprecate_thing_type: nil, tags: nil, thing_type_name: nil, thing_type_properties: nil) ⇒ CfnThingTypeProps

Returns a new instance of CfnThingTypeProps.

Parameters:

  • deprecate_thing_type (Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

    Deprecates a thing type. You can not associate new things with deprecated thing type.

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

    Metadata which can be used to manage the thing type.

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

    The name of the thing type.

  • thing_type_properties (AWSCDK::IResolvable, AWSCDK::IoT::CfnThingType::ThingTypePropertiesProperty, nil) (defaults to: nil)

    The thing type properties for the thing type to create.



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

def initialize(deprecate_thing_type: nil, tags: nil, thing_type_name: nil, thing_type_properties: nil)
  @deprecate_thing_type = deprecate_thing_type
  Jsii::Type.check_type(@deprecate_thing_type, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "deprecateThingType") unless @deprecate_thing_type.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?
  @thing_type_name = thing_type_name
  Jsii::Type.check_type(@thing_type_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "thingTypeName") unless @thing_type_name.nil?
  @thing_type_properties = thing_type_properties.is_a?(Hash) ? ::AWSCDK::IoT::CfnThingType::ThingTypePropertiesProperty.new(**thing_type_properties.transform_keys(&:to_sym)) : thing_type_properties
  Jsii::Type.check_type(@thing_type_properties, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19pb3QuQ2ZuVGhpbmdUeXBlLlRoaW5nVHlwZVByb3BlcnRpZXNQcm9wZXJ0eSJ9XX19")), "thingTypeProperties") unless @thing_type_properties.nil?
end

Instance Attribute Details

#deprecate_thing_typeBoolean, ... (readonly)

Deprecates a thing type. You can not associate new things with deprecated thing type.

Requires permission to access the DeprecateThingType action.



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

def deprecate_thing_type
  @deprecate_thing_type
end

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

Metadata which can be used to manage the thing type.



35
36
37
# File 'io_t/cfn_thing_type_props.rb', line 35

def tags
  @tags
end

#thing_type_nameString? (readonly)

The name of the thing type.



40
41
42
# File 'io_t/cfn_thing_type_props.rb', line 40

def thing_type_name
  @thing_type_name
end

#thing_type_propertiesAWSCDK::IResolvable, ... (readonly)

The thing type properties for the thing type to create.

It contains information about the new thing type including a description, a list of searchable thing attribute names, and a list of propagating attributes. After a thing type is created, you can only update Mqtt5Configuration .



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

def thing_type_properties
  @thing_type_properties
end

Class Method Details

.jsii_propertiesObject



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

def self.jsii_properties
  {
    :deprecate_thing_type => "deprecateThingType",
    :tags => "tags",
    :thing_type_name => "thingTypeName",
    :thing_type_properties => "thingTypeProperties",
  }
end

Instance Method Details

#to_jsiiObject



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

def to_jsii
  result = {}
  result.merge!({
    "deprecateThingType" => @deprecate_thing_type,
    "tags" => @tags,
    "thingTypeName" => @thing_type_name,
    "thingTypeProperties" => @thing_type_properties,
  })
  result.compact
end