@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-22T19:35:35.559Z") public class CfnTable extends CfnResource implements IInspectable
You can use the AWS::Cassandra::Table
resource to create a new table in Amazon Keyspaces (for Apache Cassandra). For more information, see Create a keyspace and a table in the Amazon Keyspaces Developer Guide .
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.cassandra.*; CfnTable cfnTable = CfnTable.Builder.create(this, "MyCfnTable") .keyspaceName("keyspaceName") .partitionKeyColumns(List.of(ColumnProperty.builder() .columnName("columnName") .columnType("columnType") .build())) // the properties below are optional .billingMode(BillingModeProperty.builder() .mode("mode") // the properties below are optional .provisionedThroughput(ProvisionedThroughputProperty.builder() .readCapacityUnits(123) .writeCapacityUnits(123) .build()) .build()) .clientSideTimestampsEnabled(false) .clusteringKeyColumns(List.of(ClusteringKeyColumnProperty.builder() .column(ColumnProperty.builder() .columnName("columnName") .columnType("columnType") .build()) // the properties below are optional .orderBy("orderBy") .build())) .defaultTimeToLive(123) .encryptionSpecification(EncryptionSpecificationProperty.builder() .encryptionType("encryptionType") // the properties below are optional .kmsKeyIdentifier("kmsKeyIdentifier") .build()) .pointInTimeRecoveryEnabled(false) .regularColumns(List.of(ColumnProperty.builder() .columnName("columnName") .columnType("columnType") .build())) .tableName("tableName") .tags(List.of(CfnTag.builder() .key("key") .value("value") .build())) .build();
Modifier and Type | Class and Description |
---|---|
static interface |
CfnTable.BillingModeProperty
Determines the billing mode for the table - on-demand or provisioned.
|
static class |
CfnTable.Builder
A fluent builder for
CfnTable . |
static interface |
CfnTable.ClusteringKeyColumnProperty
Defines an individual column within the clustering key.
|
static interface |
CfnTable.ColumnProperty
The name and data type of an individual column in a table.
|
static interface |
CfnTable.EncryptionSpecificationProperty
Specifies the encryption at rest option selected for the table.
|
static interface |
CfnTable.ProvisionedThroughputProperty
The provisioned throughput for the table, which consists of `ReadCapacityUnits` and `WriteCapacityUnits` .
|
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnTable(Construct scope,
java.lang.String id,
CfnTableProps props)
Create a new `AWS::Cassandra::Table`.
|
protected |
CfnTable(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnTable(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getBillingMode()
The billing mode for the table, which determines how you'll be charged for reads and writes:.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.Object |
getClientSideTimestampsEnabled()
Enables client-side timestamps for the table.
|
java.lang.Object |
getClusteringKeyColumns()
One or more columns that determine how the table data is sorted.
|
java.lang.Number |
getDefaultTimeToLive()
The default Time To Live (TTL) value for all rows in a table in seconds.
|
java.lang.Object |
getEncryptionSpecification()
The encryption at rest options for the table.
|
java.lang.String |
getKeyspaceName()
The name of the keyspace to create the table in.
|
java.lang.Object |
getPartitionKeyColumns()
One or more columns that uniquely identify every row in the table.
|
java.lang.Object |
getPointInTimeRecoveryEnabled()
Specifies if point-in-time recovery is enabled or disabled for the table.
|
java.lang.Object |
getRegularColumns()
One or more columns that are not part of the primary key - that is, columns that are *not* defined as partition key columns or clustering key columns.
|
java.lang.String |
getTableName()
The name of the table to be created.
|
TagManager |
getTags()
A list of key-value pair tags to be attached to the resource.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setBillingMode(CfnTable.BillingModeProperty value)
The billing mode for the table, which determines how you'll be charged for reads and writes:.
|
void |
setBillingMode(IResolvable value)
The billing mode for the table, which determines how you'll be charged for reads and writes:.
|
void |
setClientSideTimestampsEnabled(java.lang.Boolean value)
Enables client-side timestamps for the table.
|
void |
setClientSideTimestampsEnabled(IResolvable value)
Enables client-side timestamps for the table.
|
void |
setClusteringKeyColumns(IResolvable value)
One or more columns that determine how the table data is sorted.
|
void |
setClusteringKeyColumns(java.util.List<java.lang.Object> value)
One or more columns that determine how the table data is sorted.
|
void |
setDefaultTimeToLive(java.lang.Number value)
The default Time To Live (TTL) value for all rows in a table in seconds.
|
void |
setEncryptionSpecification(CfnTable.EncryptionSpecificationProperty value)
The encryption at rest options for the table.
|
void |
setEncryptionSpecification(IResolvable value)
The encryption at rest options for the table.
|
void |
setKeyspaceName(java.lang.String value)
The name of the keyspace to create the table in.
|
void |
setPartitionKeyColumns(IResolvable value)
One or more columns that uniquely identify every row in the table.
|
void |
setPartitionKeyColumns(java.util.List<java.lang.Object> value)
One or more columns that uniquely identify every row in the table.
|
void |
setPointInTimeRecoveryEnabled(java.lang.Boolean value)
Specifies if point-in-time recovery is enabled or disabled for the table.
|
void |
setPointInTimeRecoveryEnabled(IResolvable value)
Specifies if point-in-time recovery is enabled or disabled for the table.
|
void |
setRegularColumns(IResolvable value)
One or more columns that are not part of the primary key - that is, columns that are *not* defined as partition key columns or clustering key columns.
|
void |
setRegularColumns(java.util.List<java.lang.Object> value)
One or more columns that are not part of the primary key - that is, columns that are *not* defined as partition key columns or clustering key columns.
|
void |
setTableName(java.lang.String value)
The name of the table to be created.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnTable(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnTable(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnTable(Construct scope, java.lang.String id, 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.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public TagManager getTags()
public java.lang.String getKeyspaceName()
The keyspace must already exist.
public void setKeyspaceName(java.lang.String value)
The keyspace must already exist.
public java.lang.Object getPartitionKeyColumns()
Every table must have a partition key.
public void setPartitionKeyColumns(IResolvable value)
Every table must have a partition key.
public void setPartitionKeyColumns(java.util.List<java.lang.Object> value)
Every table must have a partition key.
public java.lang.Object getBillingMode()
If you don't specify a value for this property, then the table will use on-demand mode.
public void setBillingMode(IResolvable value)
If you don't specify a value for this property, then the table will use on-demand mode.
public void setBillingMode(CfnTable.BillingModeProperty value)
If you don't specify a value for this property, then the table will use on-demand mode.
public java.lang.Object getClientSideTimestampsEnabled()
By default, the setting is disabled. You can enable client-side timestamps with the following option:
status: "enabled"
After client-side timestamps are enabled for a table, you can't disable this setting.
public void setClientSideTimestampsEnabled(java.lang.Boolean value)
By default, the setting is disabled. You can enable client-side timestamps with the following option:
status: "enabled"
After client-side timestamps are enabled for a table, you can't disable this setting.
public void setClientSideTimestampsEnabled(IResolvable value)
By default, the setting is disabled. You can enable client-side timestamps with the following option:
status: "enabled"
After client-side timestamps are enabled for a table, you can't disable this setting.
public java.lang.Object getClusteringKeyColumns()
public void setClusteringKeyColumns(IResolvable value)
public void setClusteringKeyColumns(java.util.List<java.lang.Object> value)
public java.lang.Number getDefaultTimeToLive()
The maximum configurable value is 630,720,000 seconds, which is the equivalent of 20 years. By default, the TTL value for a table is 0, which means data does not expire.
For more information, see Setting the default TTL value for a table in the Amazon Keyspaces Developer Guide .
public void setDefaultTimeToLive(java.lang.Number value)
The maximum configurable value is 630,720,000 seconds, which is the equivalent of 20 years. By default, the TTL value for a table is 0, which means data does not expire.
For more information, see Setting the default TTL value for a table in the Amazon Keyspaces Developer Guide .
public java.lang.Object getEncryptionSpecification()
If you choose encryption with a customer managed key, you must specify a valid customer managed KMS key with permissions granted to Amazon Keyspaces.
For more information, see Encryption at rest in Amazon Keyspaces in the Amazon Keyspaces Developer Guide .
public void setEncryptionSpecification(IResolvable value)
If you choose encryption with a customer managed key, you must specify a valid customer managed KMS key with permissions granted to Amazon Keyspaces.
For more information, see Encryption at rest in Amazon Keyspaces in the Amazon Keyspaces Developer Guide .
public void setEncryptionSpecification(CfnTable.EncryptionSpecificationProperty value)
If you choose encryption with a customer managed key, you must specify a valid customer managed KMS key with permissions granted to Amazon Keyspaces.
For more information, see Encryption at rest in Amazon Keyspaces in the Amazon Keyspaces Developer Guide .
public java.lang.Object getPointInTimeRecoveryEnabled()
The options are PointInTimeRecoveryEnabled=true
and PointInTimeRecoveryEnabled=false
. If not specified, the default is PointInTimeRecoveryEnabled=false
.
public void setPointInTimeRecoveryEnabled(java.lang.Boolean value)
The options are PointInTimeRecoveryEnabled=true
and PointInTimeRecoveryEnabled=false
. If not specified, the default is PointInTimeRecoveryEnabled=false
.
public void setPointInTimeRecoveryEnabled(IResolvable value)
The options are PointInTimeRecoveryEnabled=true
and PointInTimeRecoveryEnabled=false
. If not specified, the default is PointInTimeRecoveryEnabled=false
.
public java.lang.Object getRegularColumns()
You can add regular columns to existing tables by adding them to the template.
public void setRegularColumns(IResolvable value)
You can add regular columns to existing tables by adding them to the template.
public void setRegularColumns(java.util.List<java.lang.Object> value)
You can add regular columns to existing tables by adding them to the template.
public java.lang.String getTableName()
The table name is case sensitive. If you don't specify a name, AWS CloudFormation generates a unique ID and uses that ID for the table name. For more information, see Name type .
If you specify a name, you can't perform updates that require replacing this resource. You can perform updates that require no interruption or some interruption. If you must replace the resource, specify a new name.
Length constraints: Minimum length of 3. Maximum length of 255.
Pattern: ^[a-zA-Z0-9][a-zA-Z0-9_]{1,47}$
public void setTableName(java.lang.String value)
The table name is case sensitive. If you don't specify a name, AWS CloudFormation generates a unique ID and uses that ID for the table name. For more information, see Name type .
If you specify a name, you can't perform updates that require replacing this resource. You can perform updates that require no interruption or some interruption. If you must replace the resource, specify a new name.
Length constraints: Minimum length of 3. Maximum length of 255.
Pattern: ^[a-zA-Z0-9][a-zA-Z0-9_]{1,47}$