Class: AWSCDK::Timestream::CfnTableProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Timestream::CfnTableProps
- Defined in:
- timestream/cfn_table_props.rb
Overview
Properties for defining a CfnTable.
Instance Attribute Summary collapse
-
#database_name ⇒ String, AWSCDK::Interfaces::AWSTimestream::IDatabaseRef
readonly
The name of the Timestream database that contains this table.
-
#magnetic_store_write_properties ⇒ Object?
readonly
Contains properties to set on the table when enabling magnetic store writes.
-
#retention_properties ⇒ Object?
readonly
The retention duration for the memory store and magnetic store.
-
#schema ⇒ AWSCDK::IResolvable, ...
readonly
The schema of the table.
-
#table_name ⇒ String?
readonly
The name of the Timestream table.
-
#tags ⇒ Array<AWSCDK::CfnTag>?
readonly
The tags to add to the table.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(database_name:, magnetic_store_write_properties: nil, retention_properties: nil, schema: nil, table_name: nil, tags: nil) ⇒ CfnTableProps
constructor
A new instance of CfnTableProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(database_name:, magnetic_store_write_properties: nil, retention_properties: nil, schema: nil, table_name: nil, tags: nil) ⇒ CfnTableProps
Returns a new instance of CfnTableProps.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'timestream/cfn_table_props.rb', line 15 def initialize(database_name:, magnetic_store_write_properties: nil, retention_properties: nil, schema: nil, table_name: nil, tags: nil) @database_name = database_name Jsii::Type.check_type(@database_name, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c190aW1lc3RyZWFtLklEYXRhYmFzZVJlZiJ9XX19")), "databaseName") @magnetic_store_write_properties = magnetic_store_write_properties Jsii::Type.check_type(@magnetic_store_write_properties, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "magneticStoreWriteProperties") unless @magnetic_store_write_properties.nil? @retention_properties = retention_properties Jsii::Type.check_type(@retention_properties, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "retentionProperties") unless @retention_properties.nil? @schema = schema.is_a?(Hash) ? ::AWSCDK::Timestream::CfnTable::SchemaProperty.new(**schema.transform_keys(&:to_sym)) : schema Jsii::Type.check_type(@schema, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c190aW1lc3RyZWFtLkNmblRhYmxlLlNjaGVtYVByb3BlcnR5In1dfX0=")), "schema") unless @schema.nil? @table_name = table_name Jsii::Type.check_type(@table_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "tableName") unless @table_name.nil? @tags = .is_a?(Array) ? .map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil? end |
Instance Attribute Details
#database_name ⇒ String, AWSCDK::Interfaces::AWSTimestream::IDatabaseRef (readonly)
The name of the Timestream database that contains this table.
Length Constraints : Minimum length of 3 bytes. Maximum length of 256 bytes.
36 37 38 |
# File 'timestream/cfn_table_props.rb', line 36 def database_name @database_name end |
#magnetic_store_write_properties ⇒ Object? (readonly)
Contains properties to set on the table when enabling magnetic store writes.
This object has the following attributes:
- EnableMagneticStoreWrites : A
booleanflag to enable magnetic store writes. - MagneticStoreRejectedDataLocation : The location to write error reports for records rejected, asynchronously, during magnetic store writes. Only
S3Configurationobjects are allowed. TheS3Configurationobject has the following attributes: - BucketName : The name of the S3 bucket.
- EncryptionOption : The encryption option for the S3 location. Valid values are S3 server-side encryption with an S3 managed key (
SSE_S3) or AWS managed key (SSE_KMS). - KmsKeyId : The AWS KMS key ID to use when encrypting with an AWS managed key.
- ObjectKeyPrefix : The prefix to use option for the objects stored in S3.
Both BucketName and EncryptionOption are required when S3Configuration is specified. If you specify SSE_KMS as your EncryptionOption then KmsKeyId is required .
EnableMagneticStoreWrites attribute is required when MagneticStoreWriteProperties is specified. MagneticStoreRejectedDataLocation attribute is required when EnableMagneticStoreWrites is set to true .
See the following examples:
JSON
{ "Type" : AWS::Timestream::Table", "Properties":{ "DatabaseName":"TestDatabase", "TableName":"TestTable", "MagneticStoreWriteProperties":{ "EnableMagneticStoreWrites":true, "MagneticStoreRejectedDataLocation":{ "S3Configuration":{ "BucketName":" amzn-s3-demo-bucket ", "EncryptionOption":"SSE_KMS", "KmsKeyId":"1234abcd-12ab-34cd-56ef-1234567890ab", "ObjectKeyPrefix":"prefix" } } } }
}
YAML
Type: AWS::Timestream::Table
DependsOn: TestDatabase
Properties: TableName: "TestTable" DatabaseName: "TestDatabase" MagneticStoreWriteProperties: EnableMagneticStoreWrites: true MagneticStoreRejectedDataLocation: S3Configuration: BucketName: " amzn-s3-demo-bucket " EncryptionOption: "SSE_KMS" KmsKeyId: "1234abcd-12ab-34cd-56ef-1234567890ab" ObjectKeyPrefix: "prefix"
71 72 73 |
# File 'timestream/cfn_table_props.rb', line 71 def magnetic_store_write_properties @magnetic_store_write_properties end |
#retention_properties ⇒ Object? (readonly)
The retention duration for the memory store and magnetic store. This object has the following attributes:.
- MemoryStoreRetentionPeriodInHours : Retention duration for memory store, in hours.
- MagneticStoreRetentionPeriodInDays : Retention duration for magnetic store, in days.
Both attributes are of type string . Both attributes are required when RetentionProperties is specified.
See the following examples:
JSON
{ "Type" : AWS::Timestream::Table", "Properties" : { "DatabaseName" : "TestDatabase", "TableName" : "TestTable", "RetentionProperties" : { "MemoryStoreRetentionPeriodInHours": "24", "MagneticStoreRetentionPeriodInDays": "7" } } }
YAML
Type: AWS::Timestream::Table
DependsOn: TestDatabase
Properties: TableName: "TestTable" DatabaseName: "TestDatabase" RetentionProperties: MemoryStoreRetentionPeriodInHours: "24" MagneticStoreRetentionPeriodInDays: "7"
95 96 97 |
# File 'timestream/cfn_table_props.rb', line 95 def retention_properties @retention_properties end |
#schema ⇒ AWSCDK::IResolvable, ... (readonly)
The schema of the table.
100 101 102 |
# File 'timestream/cfn_table_props.rb', line 100 def schema @schema end |
#table_name ⇒ String? (readonly)
The name of the Timestream table.
Length Constraints : Minimum length of 3 bytes. Maximum length of 256 bytes.
107 108 109 |
# File 'timestream/cfn_table_props.rb', line 107 def table_name @table_name end |
#tags ⇒ Array<AWSCDK::CfnTag>? (readonly)
The tags to add to the table.
112 113 114 |
# File 'timestream/cfn_table_props.rb', line 112 def @tags end |
Class Method Details
.jsii_properties ⇒ Object
114 115 116 117 118 119 120 121 122 123 |
# File 'timestream/cfn_table_props.rb', line 114 def self.jsii_properties { :database_name => "databaseName", :magnetic_store_write_properties => "magneticStoreWriteProperties", :retention_properties => "retentionProperties", :schema => "schema", :table_name => "tableName", :tags => "tags", } end |
Instance Method Details
#to_jsii ⇒ Object
125 126 127 128 129 130 131 132 133 134 135 136 |
# File 'timestream/cfn_table_props.rb', line 125 def to_jsii result = {} result.merge!({ "databaseName" => @database_name, "magneticStoreWriteProperties" => @magnetic_store_write_properties, "retentionProperties" => @retention_properties, "schema" => @schema, "tableName" => @table_name, "tags" => @tags, }) result.compact end |