Class: AWSCDK::IoT::CfnThingProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::IoT::CfnThingProps
- Defined in:
- io_t/cfn_thing_props.rb
Overview
Properties for defining a CfnThing.
Instance Attribute Summary collapse
-
#attribute_payload ⇒ AWSCDK::IResolvable, ...
readonly
A string that contains up to three key value pairs.
-
#thing_name ⇒ String?
readonly
The name of the thing to update.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attribute_payload: nil, thing_name: nil) ⇒ CfnThingProps
constructor
A new instance of CfnThingProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(attribute_payload: nil, thing_name: nil) ⇒ CfnThingProps
Returns a new instance of CfnThingProps.
11 12 13 14 15 16 |
# File 'io_t/cfn_thing_props.rb', line 11 def initialize(attribute_payload: nil, thing_name: nil) @attribute_payload = attribute_payload.is_a?(Hash) ? ::AWSCDK::IoT::CfnThing::AttributePayloadProperty.new(**attribute_payload.transform_keys(&:to_sym)) : attribute_payload Jsii::Type.check_type(@attribute_payload, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19pb3QuQ2ZuVGhpbmcuQXR0cmlidXRlUGF5bG9hZFByb3BlcnR5In1dfX0=")), "attributePayload") unless @attribute_payload.nil? @thing_name = thing_name Jsii::Type.check_type(@thing_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "thingName") unless @thing_name.nil? end |
Instance Attribute Details
#attribute_payload ⇒ AWSCDK::IResolvable, ... (readonly)
A string that contains up to three key value pairs.
Maximum length of 800. Duplicates not allowed.
24 25 26 |
# File 'io_t/cfn_thing_props.rb', line 24 def attribute_payload @attribute_payload end |
#thing_name ⇒ String? (readonly)
The name of the thing to update.
You can't change a thing's name. To change a thing's name, you must create a new thing, give it the new name, and then delete the old thing.
31 32 33 |
# File 'io_t/cfn_thing_props.rb', line 31 def thing_name @thing_name end |
Class Method Details
.jsii_properties ⇒ Object
33 34 35 36 37 38 |
# File 'io_t/cfn_thing_props.rb', line 33 def self.jsii_properties { :attribute_payload => "attributePayload", :thing_name => "thingName", } end |
Instance Method Details
#to_jsii ⇒ Object
40 41 42 43 44 45 46 47 |
# File 'io_t/cfn_thing_props.rb', line 40 def to_jsii result = {} result.merge!({ "attributePayload" => @attribute_payload, "thingName" => @thing_name, }) result.compact end |