Class: AWSCDK::IoT::CfnTopicRule::TimestreamActionProperty

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

Overview

Describes an action that writes records into an Amazon Timestream table.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(database_name:, dimensions:, role_arn:, table_name:, timestamp: nil) ⇒ TimestreamActionProperty

Returns a new instance of TimestreamActionProperty.

Parameters:



2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
# File 'io_t/cfn_topic_rule.rb', line 2896

def initialize(database_name:, dimensions:, role_arn:, table_name:, timestamp: nil)
  @database_name = database_name
  Jsii::Type.check_type(@database_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "databaseName")
  @dimensions = dimensions
  Jsii::Type.check_type(@dimensions, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaW90LkNmblRvcGljUnVsZS5UaW1lc3RyZWFtRGltZW5zaW9uUHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "dimensions")
  @role_arn = role_arn
  Jsii::Type.check_type(@role_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "roleArn")
  @table_name = table_name
  Jsii::Type.check_type(@table_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "tableName")
  @timestamp = timestamp.is_a?(Hash) ? ::AWSCDK::IoT::CfnTopicRule::TimestreamTimestampProperty.new(**timestamp.transform_keys(&:to_sym)) : timestamp
  Jsii::Type.check_type(@timestamp, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19pb3QuQ2ZuVG9waWNSdWxlLlRpbWVzdHJlYW1UaW1lc3RhbXBQcm9wZXJ0eSJ9XX19")), "timestamp") unless @timestamp.nil?
end

Instance Attribute Details

#database_nameString (readonly)

The name of an Amazon Timestream database that has the table to write records into.



2913
2914
2915
# File 'io_t/cfn_topic_rule.rb', line 2913

def database_name
  @database_name
end

#dimensionsAWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::IoT::CfnTopicRule::TimestreamDimensionProperty> (readonly)

Metadata attributes of the time series that are written in each measure record.



2918
2919
2920
# File 'io_t/cfn_topic_rule.rb', line 2918

def dimensions
  @dimensions
end

#role_arnString (readonly)

The Amazon Resource Name (ARN) of the role that grants AWS IoT permission to write to the Timestream database table.



2923
2924
2925
# File 'io_t/cfn_topic_rule.rb', line 2923

def role_arn
  @role_arn
end

#table_nameString (readonly)

The table where the message data will be written.



2928
2929
2930
# File 'io_t/cfn_topic_rule.rb', line 2928

def table_name
  @table_name
end

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

The value to use for the entry's timestamp.

If blank, the time that the entry was processed is used.



2935
2936
2937
# File 'io_t/cfn_topic_rule.rb', line 2935

def timestamp
  @timestamp
end

Class Method Details

.jsii_propertiesObject



2937
2938
2939
2940
2941
2942
2943
2944
2945
# File 'io_t/cfn_topic_rule.rb', line 2937

def self.jsii_properties
  {
    :database_name => "databaseName",
    :dimensions => "dimensions",
    :role_arn => "roleArn",
    :table_name => "tableName",
    :timestamp => "timestamp",
  }
end

Instance Method Details

#to_jsiiObject



2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
# File 'io_t/cfn_topic_rule.rb', line 2947

def to_jsii
  result = {}
  result.merge!({
    "databaseName" => @database_name,
    "dimensions" => @dimensions,
    "roleArn" => @role_arn,
    "tableName" => @table_name,
    "timestamp" => @timestamp,
  })
  result.compact
end