Class: AWSCDK::IoT::CfnTopicRule::LocationActionProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::IoT::CfnTopicRule::LocationActionProperty
- Defined in:
- io_t/cfn_topic_rule.rb
Overview
Describes an action to send device location updates from an MQTT message to an Amazon Location tracker resource.
Instance Attribute Summary collapse
-
#device_id ⇒ String
readonly
The unique ID of the device providing the location data.
-
#latitude ⇒ String
readonly
A string that evaluates to a double value that represents the latitude of the device's location.
-
#longitude ⇒ String
readonly
A string that evaluates to a double value that represents the longitude of the device's location.
-
#role_arn ⇒ String
readonly
The IAM role that grants permission to write to the Amazon Location resource.
-
#timestamp ⇒ AWSCDK::IResolvable, ...
readonly
The time that the location data was sampled.
-
#tracker_name ⇒ String
readonly
The name of the tracker resource in Amazon Location in which the location is updated.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(device_id:, latitude:, longitude:, role_arn:, tracker_name:, timestamp: nil) ⇒ LocationActionProperty
constructor
A new instance of LocationActionProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(device_id:, latitude:, longitude:, role_arn:, tracker_name:, timestamp: nil) ⇒ LocationActionProperty
Returns a new instance of LocationActionProperty.
2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 |
# File 'io_t/cfn_topic_rule.rb', line 2125 def initialize(device_id:, latitude:, longitude:, role_arn:, tracker_name:, timestamp: nil) @device_id = device_id Jsii::Type.check_type(@device_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "deviceId") @latitude = latitude Jsii::Type.check_type(@latitude, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "latitude") @longitude = longitude Jsii::Type.check_type(@longitude, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "longitude") @role_arn = role_arn Jsii::Type.check_type(@role_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "roleArn") @tracker_name = tracker_name Jsii::Type.check_type(@tracker_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "trackerName") @timestamp = .is_a?(Hash) ? ::AWSCDK::IoT::CfnTopicRule::TimestampProperty.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(@timestamp, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19pb3QuQ2ZuVG9waWNSdWxlLlRpbWVzdGFtcFByb3BlcnR5In1dfX0=")), "timestamp") unless @timestamp.nil? end |
Instance Attribute Details
#device_id ⇒ String (readonly)
The unique ID of the device providing the location data.
2144 2145 2146 |
# File 'io_t/cfn_topic_rule.rb', line 2144 def device_id @device_id end |
#latitude ⇒ String (readonly)
A string that evaluates to a double value that represents the latitude of the device's location.
2149 2150 2151 |
# File 'io_t/cfn_topic_rule.rb', line 2149 def latitude @latitude end |
#longitude ⇒ String (readonly)
A string that evaluates to a double value that represents the longitude of the device's location.
2154 2155 2156 |
# File 'io_t/cfn_topic_rule.rb', line 2154 def longitude @longitude end |
#role_arn ⇒ String (readonly)
The IAM role that grants permission to write to the Amazon Location resource.
2159 2160 2161 |
# File 'io_t/cfn_topic_rule.rb', line 2159 def role_arn @role_arn end |
#timestamp ⇒ AWSCDK::IResolvable, ... (readonly)
The time that the location data was sampled.
The default value is the time the MQTT message was processed.
2171 2172 2173 |
# File 'io_t/cfn_topic_rule.rb', line 2171 def @timestamp end |
#tracker_name ⇒ String (readonly)
The name of the tracker resource in Amazon Location in which the location is updated.
2164 2165 2166 |
# File 'io_t/cfn_topic_rule.rb', line 2164 def tracker_name @tracker_name end |
Class Method Details
.jsii_properties ⇒ Object
2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 |
# File 'io_t/cfn_topic_rule.rb', line 2173 def self.jsii_properties { :device_id => "deviceId", :latitude => "latitude", :longitude => "longitude", :role_arn => "roleArn", :tracker_name => "trackerName", :timestamp => "timestamp", } end |
Instance Method Details
#to_jsii ⇒ Object
2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 |
# File 'io_t/cfn_topic_rule.rb', line 2184 def to_jsii result = {} result.merge!({ "deviceId" => @device_id, "latitude" => @latitude, "longitude" => @longitude, "roleArn" => @role_arn, "trackerName" => @tracker_name, "timestamp" => @timestamp, }) result.compact end |