Class CfnTable
- All Implemented Interfaces:
IConstruct,IDependable,IInspectable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct
AWS::Timestream::Table.
The CreateTable operation adds a new table to an existing database in your account. In an AWS account, table names must be at least unique within each Region if they are in the same database. You may have identical table names in the same Region if the tables are in separate databases. While creating the table, you must specify the table name, database name, and the retention properties. Service quotas apply . See code sample for details.
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.*;
CfnTable cfnTable = CfnTable.Builder.create(this, "MyCfnTable")
.databaseName("databaseName")
// the properties below are optional
.magneticStoreWriteProperties(MagneticStoreWritePropertiesProperty.builder()
.enableMagneticStoreWrites(false)
// the properties below are optional
.magneticStoreRejectedDataLocation(MagneticStoreRejectedDataLocationProperty.builder()
.s3Configuration(S3ConfigurationProperty.builder()
.bucketName("bucketName")
.encryptionOption("encryptionOption")
// the properties below are optional
.kmsKeyId("kmsKeyId")
.objectKeyPrefix("objectKeyPrefix")
.build())
.build())
.build())
.retentionProperties(RetentionPropertiesProperty.builder()
.magneticStoreRetentionPeriodInDays("magneticStoreRetentionPeriodInDays")
.memoryStoreRetentionPeriodInHours("memoryStoreRetentionPeriodInHours")
.build())
.tableName("tableName")
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnTable.static interfaceThe location to write error reports for records rejected, asynchronously, during magnetic store writes.static interfaceThe set of properties on a table for configuring magnetic store writes.static interfaceRetention properties contain the duration for which your time-series data must be stored in the magnetic store and the memory store.static interfaceThe configuration that specifies an S3 location.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThearnof the table.The name of the table.The name of the Timestream database that contains this table.Contains properties to set on the table when enabling magnetic store writes.The retention duration for the memory store and magnetic store.The name of the Timestream table.getTags()The tags to add to the table.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidsetDatabaseName(String value) The name of the Timestream database that contains this table.voidContains properties to set on the table when enabling magnetic store writes.voidContains properties to set on the table when enabling magnetic store writes.voidThe retention duration for the memory store and magnetic store.voidThe retention duration for the memory store and magnetic store.voidsetTableName(String value) The name of the Timestream table.Methods inherited from class software.amazon.awscdk.core.CfnResource
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.core.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.core.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validateMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnTable
protected CfnTable(software.amazon.jsii.JsiiObjectRef objRef) -
CfnTable
protected CfnTable(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnTable
@Stability(Stable) public CfnTable(@NotNull Construct scope, @NotNull String id, @NotNull CfnTableProps props) Create a newAWS::Timestream::Table.- Parameters:
scope-- scope in which this resource is defined.
id-- scoped id of the resource.
props-- resource properties.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector-- tree inspector to collect and process attributes.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrArn
Thearnof the table. -
getAttrName
The name of the table. -
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getTags
The tags to add to the table. -
getDatabaseName
The name of the Timestream database that contains this table.Length Constraints : Minimum length of 3 bytes. Maximum length of 256 bytes.
-
setDatabaseName
The name of the Timestream database that contains this table.Length Constraints : Minimum length of 3 bytes. Maximum length of 256 bytes.
-
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":"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
-
setMagneticStoreWriteProperties
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":"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
-
setMagneticStoreWriteProperties
@Stability(Stable) public void setMagneticStoreWriteProperties(@Nullable CfnTable.MagneticStoreWritePropertiesProperty value) 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":"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
-
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"
-
setRetentionProperties
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"
-
setRetentionProperties
@Stability(Stable) public void setRetentionProperties(@Nullable CfnTable.RetentionPropertiesProperty value) 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"
-
getTableName
The name of the Timestream table.Length Constraints : Minimum length of 3 bytes. Maximum length of 256 bytes.
-
setTableName
The name of the Timestream table.Length Constraints : Minimum length of 3 bytes. Maximum length of 256 bytes.
-