@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:42.589Z") @Stability(value=Stable) public class CfnTable extends CfnResource implements IInspectable
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)
.tableName("tableName")
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.build();
| Modifier and Type | Class and Description |
|---|---|
static class |
CfnTable.Builder
A fluent builder for
CfnTable. |
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$Proxy| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnTable(software.constructs.Construct scope,
String id,
CfnTableProps props)
Create a new `AWS::Timestream::Table`.
|
protected |
CfnTable(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnTable(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
String |
getAttrArn()
The `arn` of the table.
|
String |
getAttrName()
The name of the table.
|
protected Map<String,Object> |
getCfnProperties() |
String |
getDatabaseName()
The name of the Timestream database that contains this table.
|
Object |
getMagneticStoreWriteProperties()
Contains properties to set on the table when enabling magnetic store writes.
|
Object |
getRetentionProperties()
The retention duration for the memory store and magnetic store.
|
String |
getTableName()
The name of the Timestream table.
|
TagManager |
getTags()
The tags to add to the table.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected Map<String,Object> |
renderProperties(Map<String,Object> props) |
void |
setDatabaseName(String value)
The name of the Timestream database that contains this table.
|
void |
setMagneticStoreWriteProperties(Object value)
Contains properties to set on the table when enabling magnetic store writes.
|
void |
setRetentionProperties(Object value)
The retention duration for the memory store and magnetic store.
|
void |
setTableName(String value)
The name of the Timestream table.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, shouldSynthesize, toString, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
protected CfnTable(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnTable(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnTable(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
CfnTableProps props)
scope - - scope in which this resource is defined. This parameter is required.id - - scoped id of the resource. This parameter is required.props - - resource properties. This parameter is required.@Stability(value=Stable)
public void inspect(@NotNull
TreeInspector inspector)
inspect in interface IInspectableinspector - - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties in class CfnResourceprops - This parameter is required.@Stability(value=Stable) @NotNull public String getAttrArn()
@Stability(value=Stable) @NotNull public String getAttrName()
@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull public TagManager getTags()
@Stability(value=Stable) @NotNull public String getDatabaseName()
Length Constraints : Minimum length of 3 bytes. Maximum length of 256 bytes.
@Stability(value=Stable)
public void setDatabaseName(@NotNull
String value)
Length Constraints : Minimum length of 3 bytes. Maximum length of 256 bytes.
@Stability(value=Stable) @NotNull public Object getMagneticStoreWriteProperties()
This object has the following attributes:
boolean flag to enable magnetic store writes.S3Configuration objects are allowed. The S3Configuration object has the following attributes:SSE_S3 ) or AWS managed key ( SSE_KMS ).
Both BucketName and EncryptionOption are required when S3Configuration is specified. If you specify SSE_KMS as your EncryptionOption then KmsKeyId is required .
EnableMagneticStoreWrites attribute is required when MagneticStoreWriteProperties is specified. MagneticStoreRejectedDataLocation attribute is required when EnableMagneticStoreWrites is set to true .
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" BucketName: "1234abcd-12ab-34cd-56ef-1234567890ab" EncryptionOption: "prefix"
@Stability(value=Stable)
public void setMagneticStoreWriteProperties(@NotNull
Object value)
This object has the following attributes:
boolean flag to enable magnetic store writes.S3Configuration objects are allowed. The S3Configuration object has the following attributes:SSE_S3 ) or AWS managed key ( SSE_KMS ).
Both BucketName and EncryptionOption are required when S3Configuration is specified. If you specify SSE_KMS as your EncryptionOption then KmsKeyId is required .
EnableMagneticStoreWrites attribute is required when MagneticStoreWriteProperties is specified. MagneticStoreRejectedDataLocation attribute is required when EnableMagneticStoreWrites is set to true .
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" BucketName: "1234abcd-12ab-34cd-56ef-1234567890ab" EncryptionOption: "prefix"
@Stability(value=Stable) @NotNull public Object getRetentionProperties()
Both attributes are of type string . Both attributes are required when RetentionProperties 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"
@Stability(value=Stable)
public void setRetentionProperties(@NotNull
Object value)
Both attributes are of type string . Both attributes are required when RetentionProperties 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"
@Stability(value=Stable) @Nullable public String getTableName()
Length Constraints : Minimum length of 3 bytes. Maximum length of 256 bytes.
@Stability(value=Stable)
public void setTableName(@Nullable
String value)
Length Constraints : Minimum length of 3 bytes. Maximum length of 256 bytes.
Copyright © 2022. All rights reserved.