Resource: awsTimestreamwriteTable
Provides a Timestream table resource.
Example Usage
Basic usage
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.timestreamwriteTable.TimestreamwriteTable(this, "example", {
databaseName: "${aws_timestreamwrite_database.example.database_name}",
tableName: "example",
});
Full usage
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.timestreamwriteTable.TimestreamwriteTable(this, "example", {
databaseName: "${aws_timestreamwrite_database.example.database_name}",
retentionProperties: {
magneticStoreRetentionPeriodInDays: 30,
memoryStoreRetentionPeriodInHours: 8,
},
tableName: "example",
tags: {
Name: "example-timestream-table",
},
});
Argument Reference
The following arguments are supported:
databaseName
– (Required) The name of the Timestream database.magneticStoreWriteProperties
- (Optional) Contains properties to set on the table when enabling magnetic store writes. See Magnetic Store Write Properties below for more details.retentionProperties
- (Optional) The retention duration for the memory store and magnetic store. See Retention Properties below for more details. If not provided,magneticStoreRetentionPeriodInDays
default to 73000 andmemoryStoreRetentionPeriodInHours
defaults to 6.tableName
- (Required) The name of the Timestream table.tags
- (Optional) Map of tags to assign to this resource. If configured with a providerdefaultTags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Magnetic Store Write Properties
The magneticStoreWriteProperties
block supports the following arguments:
enableMagneticStoreWrites
- (Required) A flag to enable magnetic store writes.magneticStoreRejectedDataLocation
- (Optional) The location to write error reports for records rejected asynchronously during magnetic store writes. See Magnetic Store Rejected Data Location below for more details.
Magnetic Store Rejected Data Location
The magneticStoreRejectedDataLocation
block supports the following arguments:
s3Configuration
- (Optional) Configuration of an S3 location to write error reports for records rejected, asynchronously, during magnetic store writes. See S3 Configuration below for more details.
S3 Configuration
The s3Configuration
block supports the following arguments:
bucketName
- (Optional) Bucket name of the customer S3 bucket.encryptionOption
- (Optional) Encryption option for the customer s3 location. Options are S3 server side encryption with an S3-managed key or KMS managed key. Valid values areSSE_KMS
andSSE_S3
.kmsKeyId
- (Optional) KMS key arn for the customer s3 location when encrypting with a KMS managed key.objectKeyPrefix
- (Optional) Object key prefix for the customer S3 location.
Retention Properties
The retentionProperties
block supports the following arguments:
magneticStoreRetentionPeriodInDays
- (Required) The duration for which data must be stored in the magnetic store. Minimum value of 1. Maximum value of 73000.memoryStoreRetentionPeriodInHours
- (Required) The duration for which data must be stored in the memory store. Minimum value of 1. Maximum value of 8766.
Attributes Reference
In addition to all arguments above, the following attributes are exported:
id
- ThetableName
anddatabaseName
separated by a colon (:
).arn
- The ARN that uniquely identifies this table.tagsAll
- A map of tags assigned to the resource, including those inherited from the providerdefaultTags
configuration block.
Import
Timestream tables can be imported using the tableName
and databaseName
separate by a colon (:
), e.g.,