Class CfnTableProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnTableProps>
- Enclosing interface:
CfnTableProps
CfnTableProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.databaseName
(String databaseName) Sets the value ofCfnTableProps.getDatabaseName()
magneticStoreWriteProperties
(Object magneticStoreWriteProperties) Sets the value ofCfnTableProps.getMagneticStoreWriteProperties()
retentionProperties
(Object retentionProperties) Sets the value ofCfnTableProps.getRetentionProperties()
schema
(IResolvable schema) Sets the value ofCfnTableProps.getSchema()
schema
(CfnTable.SchemaProperty schema) Sets the value ofCfnTableProps.getSchema()
Sets the value ofCfnTableProps.getTableName()
Sets the value ofCfnTableProps.getTags()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
databaseName
Sets the value ofCfnTableProps.getDatabaseName()
- Parameters:
databaseName
- The name of the Timestream database that contains this table. This parameter is required. Length Constraints : Minimum length of 3 bytes. Maximum length of 256 bytes.- Returns:
this
-
magneticStoreWriteProperties
@Stability(Stable) public CfnTableProps.Builder magneticStoreWriteProperties(Object magneticStoreWriteProperties) Sets the value ofCfnTableProps.getMagneticStoreWriteProperties()
- Parameters:
magneticStoreWriteProperties
- 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"
- EnableMagneticStoreWrites : A
- Returns:
this
-
retentionProperties
Sets the value ofCfnTableProps.getRetentionProperties()
- Parameters:
retentionProperties
- 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 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"
- Returns:
this
-
schema
Sets the value ofCfnTableProps.getSchema()
- Parameters:
schema
- The schema of the table.- Returns:
this
-
schema
Sets the value ofCfnTableProps.getSchema()
- Parameters:
schema
- The schema of the table.- Returns:
this
-
tableName
Sets the value ofCfnTableProps.getTableName()
- Parameters:
tableName
- The name of the Timestream table. Length Constraints : Minimum length of 3 bytes. Maximum length of 256 bytes.- Returns:
this
-
tags
Sets the value ofCfnTableProps.getTags()
- Parameters:
tags
- The tags to add to the table.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnTableProps>
- Returns:
- a new instance of
CfnTableProps
- Throws:
NullPointerException
- if any required attribute was not provided
-