Class CfnTable
A CloudFormation AWS::Timestream::Table
.
Inherited Members
Namespace: Amazon.CDK.AWS.Timestream
Assembly: Amazon.CDK.AWS.Timestream.dll
Syntax (csharp)
public class CfnTable : CfnResource, IConstruct, IDependable, IInspectable
Syntax (vb)
Public Class CfnTable
Inherits CfnResource
Implements IConstruct, IDependable, IInspectable
Remarks
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.
CloudformationResource: AWS::Timestream::Table
Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-timestream-table.html
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Timestream;
var cfnTable = new CfnTable(this, "MyCfnTable", new CfnTableProps {
DatabaseName = "databaseName",
// the properties below are optional
MagneticStoreWriteProperties = new MagneticStoreWritePropertiesProperty {
EnableMagneticStoreWrites = false,
// the properties below are optional
MagneticStoreRejectedDataLocation = new MagneticStoreRejectedDataLocationProperty {
S3Configuration = new S3ConfigurationProperty {
BucketName = "bucketName",
EncryptionOption = "encryptionOption",
// the properties below are optional
KmsKeyId = "kmsKeyId",
ObjectKeyPrefix = "objectKeyPrefix"
}
}
},
RetentionProperties = new RetentionPropertiesProperty {
MagneticStoreRetentionPeriodInDays = "magneticStoreRetentionPeriodInDays",
MemoryStoreRetentionPeriodInHours = "memoryStoreRetentionPeriodInHours"
},
TableName = "tableName",
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} }
});
Synopsis
Constructors
CfnTable(Construct, String, ICfnTableProps) | Create a new |
CfnTable(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnTable(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Properties
AttrArn | The |
AttrName | The name of the table. |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
DatabaseName | The name of the Timestream database that contains this table. |
MagneticStoreWriteProperties | Contains properties to set on the table when enabling magnetic store writes. |
RetentionProperties | The retention duration for the memory store and magnetic store. This object has the following attributes:. |
TableName | The name of the Timestream table. |
Tags | The tags to add to the table. |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnTable(Construct, String, ICfnTableProps)
Create a new AWS::Timestream::Table
.
public CfnTable(Construct scope, string id, ICfnTableProps props)
Parameters
- scope Construct
- scope in which this resource is defined.
- id System.String
- scoped id of the resource.
- props ICfnTableProps
- resource properties.
CfnTable(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnTable(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnTable(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnTable(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
AttrArn
The arn
of the table.
public virtual string AttrArn { get; }
Property Value
System.String
Remarks
CloudformationAttribute: Arn
AttrName
The name of the table.
public virtual string AttrName { get; }
Property Value
System.String
Remarks
CloudformationAttribute: Name
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
DatabaseName
The name of the Timestream database that contains this table.
public virtual string DatabaseName { get; set; }
Property Value
System.String
Remarks
Length Constraints : Minimum length of 3 bytes. Maximum length of 256 bytes.
MagneticStoreWriteProperties
Contains properties to set on the table when enabling magnetic store writes.
public virtual object MagneticStoreWriteProperties { get; set; }
Property Value
System.Object
Remarks
This object has the following attributes:
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" KmsKeyId: "1234abcd-12ab-34cd-56ef-1234567890ab" ObjectKeyPrefix: "prefix"
RetentionProperties
The retention duration for the memory store and magnetic store. This object has the following attributes:.
public virtual object RetentionProperties { get; set; }
Property Value
System.Object
Remarks
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"
TableName
The name of the Timestream table.
public virtual string TableName { get; set; }
Property Value
System.String
Remarks
Length Constraints : Minimum length of 3 bytes. Maximum length of 256 bytes.
Tags
The tags to add to the table.
public virtual TagManager Tags { get; }
Property Value
Remarks
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
- tree inspector to collect and process attributes.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>