Class CfnTable
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.timestream.CfnTable
- All Implemented Interfaces:
IEnvironmentAware,IInspectable,ITaggable,ITableRef,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.118.0 (build 02eec31)",
date="2025-11-10T13:40:16.530Z")
@Stability(Stable)
public class CfnTable
extends CfnResource
implements IInspectable, ITableRef, ITaggable
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.*;
Object magneticStoreWriteProperties;
Object retentionProperties;
CfnTable cfnTable = CfnTable.Builder.create(this, "MyCfnTable")
.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 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 interfaceAn attribute used in partitioning data in a table.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.static interfaceA Schema specifies the expected data model of the table.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.services.timestream.ITableRef
ITableRef.Jsii$Default, ITableRef.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnTable(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnTable(software.amazon.jsii.JsiiObjectRef objRef) CfnTable(software.constructs.Construct scope, String id, CfnTableProps props) -
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 schema of the table.The name of the Timestream table.A reference to a Table resource.getTags()Tag Manager which manages the tags for this resource.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.voidsetRetentionProperties(Object value) The retention duration for the memory store and magnetic store.voidsetSchema(IResolvable value) The schema of the table.voidsetSchema(CfnTable.SchemaProperty value) The schema of the table.voidsetTableName(String value) The name of the Timestream table.voidsetTagsRaw(List<CfnTag> value) The tags to add to the table.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getEnv, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods 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.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.IEnvironmentAware
getEnvMethods 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 software.constructs.Construct scope, @NotNull String id, @NotNull CfnTableProps props) - Parameters:
scope- Scope in which this resource is defined. This parameter is required.id- Construct identifier for this resource (unique in its scope). This parameter is required.props- Resource properties. This parameter is required.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector- tree inspector to collect and process attributes. This parameter is required.
-
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
-
getTableRef
A reference to a Table resource.- Specified by:
getTableRefin interfaceITableRef
-
getTags
Tag Manager which manages the tags for this resource. -
getDatabaseName
The name of the Timestream database that contains this table. -
setDatabaseName
The name of the Timestream database that contains this table. -
getMagneticStoreWriteProperties
Contains properties to set on the table when enabling magnetic store writes. -
setMagneticStoreWriteProperties
Contains properties to set on the table when enabling magnetic store writes. -
getRetentionProperties
The retention duration for the memory store and magnetic store.This object has the following attributes:.
-
setRetentionProperties
The retention duration for the memory store and magnetic store.This object has the following attributes:.
-
getSchema
The schema of the table.Returns union: either
IResolvableorCfnTable.SchemaProperty -
setSchema
The schema of the table. -
setSchema
The schema of the table. -
getTableName
The name of the Timestream table. -
setTableName
The name of the Timestream table. -
getTagsRaw
The tags to add to the table. -
setTagsRaw
The tags to add to the table.
-