CfnTableProps
- class aws_cdk.aws_timestream.CfnTableProps(*, database_name, magnetic_store_write_properties=None, retention_properties=None, table_name=None, tags=None)
Bases:
object
Properties for defining a
CfnTable
.- Parameters:
database_name (
str
) – The name of the Timestream database that contains this table. Length Constraints : Minimum length of 3 bytes. Maximum length of 256 bytes.magnetic_store_write_properties (
Union
[IResolvable
,MagneticStoreWritePropertiesProperty
,Dict
[str
,Any
],None
]) – Contains properties to set on the table when enabling magnetic store writes. This object has the following attributes: - EnableMagneticStoreWrites : Aboolean
flag to enable magnetic store writes. - MagneticStoreRejectedDataLocation : The location to write error reports for records rejected, asynchronously, during magnetic store writes. OnlyS3Configuration
objects are allowed. TheS3Configuration
object 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. BothBucketName
andEncryptionOption
are required whenS3Configuration
is specified. If you specifySSE_KMS
as yourEncryptionOption
thenKmsKeyId
is required .EnableMagneticStoreWrites
attribute is required whenMagneticStoreWriteProperties
is specified.MagneticStoreRejectedDataLocation
attribute is required whenEnableMagneticStoreWrites
is set totrue
. See the following examples: *JSON:: { “Type” : AWS::Timestream::Table”, “Properties”:{ “DatabaseName”:”TestDatabase”, “TableName”:”TestTable”, “MagneticStoreWriteProperties”:{ “EnableMagneticStoreWrites”:true, “MagneticStoreRejectedDataLocation”:{ “S3Configuration”:{ “BucketName”:”testbucket”, “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: “testbucket” EncryptionOption: “SSE_KMS” KmsKeyId: “1234abcd-12ab-34cd-56ef-1234567890ab” ObjectKeyPrefix: “prefix”retention_properties (
Union
[IResolvable
,RetentionPropertiesProperty
,Dict
[str
,Any
],None
]) – 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 typestring
. Both attributes are required whenRetentionProperties
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”table_name (
Optional
[str
]) – The name of the Timestream table. Length Constraints : Minimum length of 3 bytes. Maximum length of 256 bytes.tags (
Optional
[Sequence
[Union
[CfnTag
,Dict
[str
,Any
]]]]) – The tags to add to the table.
- Link:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-timestream-table.html
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk.aws_timestream as timestream cfn_table_props = timestream.CfnTableProps( database_name="databaseName", # the properties below are optional magnetic_store_write_properties=timestream.CfnTable.MagneticStoreWritePropertiesProperty( enable_magnetic_store_writes=False, # the properties below are optional magnetic_store_rejected_data_location=timestream.CfnTable.MagneticStoreRejectedDataLocationProperty( s3_configuration=timestream.CfnTable.S3ConfigurationProperty( bucket_name="bucketName", encryption_option="encryptionOption", # the properties below are optional kms_key_id="kmsKeyId", object_key_prefix="objectKeyPrefix" ) ) ), retention_properties=timestream.CfnTable.RetentionPropertiesProperty( magnetic_store_retention_period_in_days="magneticStoreRetentionPeriodInDays", memory_store_retention_period_in_hours="memoryStoreRetentionPeriodInHours" ), table_name="tableName", tags=[CfnTag( key="key", value="value" )] )
Attributes
- database_name
The name of the Timestream database that contains this table.
Length Constraints : Minimum length of 3 bytes. Maximum length of 256 bytes.
- magnetic_store_write_properties
Contains properties to set on the table when enabling magnetic store writes.
This object has the following attributes:
EnableMagneticStoreWrites : A
boolean
flag to enable magnetic store writes.MagneticStoreRejectedDataLocation : The location to write error reports for records rejected, asynchronously, during magnetic store writes. Only
S3Configuration
objects are allowed. TheS3Configuration
object 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
andEncryptionOption
are required whenS3Configuration
is specified. If you specifySSE_KMS
as yourEncryptionOption
thenKmsKeyId
is required .EnableMagneticStoreWrites
attribute is required whenMagneticStoreWriteProperties
is specified.MagneticStoreRejectedDataLocation
attribute is required whenEnableMagneticStoreWrites
is set totrue
.See the following examples:
*JSON:
{ "Type" : AWS::Timestream::Table", "Properties":{ "DatabaseName":"TestDatabase", "TableName":"TestTable", "MagneticStoreWriteProperties":{ "EnableMagneticStoreWrites":true, "MagneticStoreRejectedDataLocation":{ "S3Configuration":{ "BucketName":"testbucket", "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: "testbucket" EncryptionOption: "SSE_KMS" KmsKeyId: "1234abcd-12ab-34cd-56ef-1234567890ab" ObjectKeyPrefix: "prefix"
- retention_properties
.
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 whenRetentionProperties
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"
- Link:
- Type:
The retention duration for the memory store and magnetic store. This object has the following attributes
- table_name
The name of the Timestream table.
Length Constraints : Minimum length of 3 bytes. Maximum length of 256 bytes.
- tags
The tags to add to the table.