java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, ITaggable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.97.0 (build 729de35)", date="2024-04-18T17:54:25.648Z") @Stability(Stable) public class CfnTable extends CfnResource implements IInspectable, 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:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String 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

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      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:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrArn

      @Stability(Stable) @NotNull public String getAttrArn()
      The arn of the table.
    • getAttrName

      @Stability(Stable) @NotNull public String getAttrName()
      The name of the table.
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getTags

      @Stability(Stable) @NotNull public TagManager getTags()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getTags in interface ITaggable
    • getDatabaseName

      @Stability(Stable) @NotNull public String getDatabaseName()
      The name of the Timestream database that contains this table.
    • setDatabaseName

      @Stability(Stable) public void setDatabaseName(@NotNull String value)
      The name of the Timestream database that contains this table.
    • getMagneticStoreWriteProperties

      @Stability(Stable) @Nullable public Object getMagneticStoreWriteProperties()
      Contains properties to set on the table when enabling magnetic store writes.
    • setMagneticStoreWriteProperties

      @Stability(Stable) public void setMagneticStoreWriteProperties(@Nullable Object value)
      Contains properties to set on the table when enabling magnetic store writes.
    • getRetentionProperties

      @Stability(Stable) @Nullable public Object getRetentionProperties()
      The retention duration for the memory store and magnetic store.

      This object has the following attributes:.

    • setRetentionProperties

      @Stability(Stable) public void setRetentionProperties(@Nullable Object value)
      The retention duration for the memory store and magnetic store.

      This object has the following attributes:.

    • getSchema

      @Stability(Stable) @Nullable public Object getSchema()
      The schema of the table.
    • setSchema

      @Stability(Stable) public void setSchema(@Nullable IResolvable value)
      The schema of the table.
    • setSchema

      @Stability(Stable) public void setSchema(@Nullable CfnTable.SchemaProperty value)
      The schema of the table.
    • getTableName

      @Stability(Stable) @Nullable public String getTableName()
      The name of the Timestream table.
    • setTableName

      @Stability(Stable) public void setTableName(@Nullable String value)
      The name of the Timestream table.
    • getTagsRaw

      @Stability(Stable) @Nullable public List<CfnTag> getTagsRaw()
      The tags to add to the table.
    • setTagsRaw

      @Stability(Stable) public void setTagsRaw(@Nullable List<CfnTag> value)
      The tags to add to the table.