Interface CfnTableProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CfnTableProps.Jsii$Proxy
CfnTable.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.timestream.*;
Object magneticStoreWriteProperties;
Object retentionProperties;
CfnTableProps cfnTableProps = CfnTableProps.builder()
.databaseName("databaseName")
// the properties below are optional
.magneticStoreWriteProperties(magneticStoreWriteProperties)
.retentionProperties(retentionProperties)
.schema(SchemaProperty.builder()
.compositePartitionKey(List.of(PartitionKeyProperty.builder()
.type("type")
// the properties below are optional
.enforcementInRecord("enforcementInRecord")
.name("name")
.build()))
.build())
.tableName("tableName")
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forCfnTablePropsstatic final classAn implementation forCfnTableProps -
Method Summary
Modifier and TypeMethodDescriptionstatic CfnTableProps.Builderbuilder()The name of the Timestream database that contains this table.default ObjectContains properties to set on the table when enabling magnetic store writes.default ObjectThe retention duration for the memory store and magnetic store.default ObjectThe schema of the table.default StringThe name of the Timestream table.getTags()The tags to add to the table.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getDatabaseName
The name of the Timestream database that contains this table.Length Constraints : Minimum length of 3 bytes. Maximum length of 256 bytes.
- See Also:
-
getMagneticStoreWriteProperties
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
BucketNameandEncryptionOptionare required whenS3Configurationis specified. If you specifySSE_KMSas yourEncryptionOptionthenKmsKeyIdis required .EnableMagneticStoreWritesattribute is required whenMagneticStoreWritePropertiesis specified.MagneticStoreRejectedDataLocationattribute is required whenEnableMagneticStoreWritesis set totrue.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"
- See Also:
- EnableMagneticStoreWrites : A
-
getRetentionProperties
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 whenRetentionPropertiesis 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"
- See Also:
-
getSchema
The schema of the table.Returns union: either
IResolvableorCfnTable.SchemaProperty- See Also:
-
getTableName
The name of the Timestream table.Length Constraints : Minimum length of 3 bytes. Maximum length of 256 bytes.
- See Also:
-
getTags
The tags to add to the table.- See Also:
-
builder
- Returns:
- a
CfnTableProps.BuilderofCfnTableProps
-