CfnTableProps

class aws_cdk.aws_cassandra.CfnTableProps(*, keyspace_name, partition_key_columns, billing_mode=None, clustering_key_columns=None, default_time_to_live=None, encryption_specification=None, point_in_time_recovery_enabled=None, regular_columns=None, table_name=None, tags=None)

Bases: object

Properties for defining a CfnTable.

Parameters
  • keyspace_name (str) – The name of the keyspace in which to create the table. The keyspace must already exist.

  • partition_key_columns (Union[IResolvable, Sequence[Union[ColumnProperty, IResolvable]]]) – One or more columns that uniquely identify every row in the table. Every table must have a partition key.

  • billing_mode (Union[IResolvable, BillingModeProperty, None]) – The billing mode for the table, which determines how you’ll be charged for reads and writes:. - On-demand mode (default) - You pay based on the actual reads and writes your application performs. - Provisioned mode - Lets you specify the number of reads and writes per second that you need for your application. If you don’t specify a value for this property, then the table will use on-demand mode.

  • clustering_key_columns (Union[IResolvable, Sequence[Union[IResolvable, ClusteringKeyColumnProperty]], None]) – One or more columns that determine how the table data is sorted.

  • default_time_to_live (Union[int, float, None]) – The default Time To Live (TTL) value for all rows in a table in seconds. 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 .

  • encryption_specification (Union[IResolvable, EncryptionSpecificationProperty, None]) – The encryption at rest options for the table. - AWS owned key (default) - The key is owned by Amazon Keyspaces. - Customer managed key - The key is stored in your account and is created, owned, and managed by you. .. epigraph:: 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 .

  • point_in_time_recovery_enabled (Union[bool, IResolvable, None]) – Specifies if point-in-time recovery is enabled or disabled for the table. The options are PointInTimeRecoveryEnabled=true and PointInTimeRecoveryEnabled=false . If not specified, the default is PointInTimeRecoveryEnabled=false .

  • regular_columns (Union[IResolvable, Sequence[Union[ColumnProperty, IResolvable]], None]) – 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. You can add regular columns to existing tables by adding them to the template.

  • table_name (Optional[str]) – The name of the table to be created. 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 . .. epigraph:: If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no 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}$

  • tags (Optional[Sequence[CfnTag]]) – A list of key-value pair tags to be attached to the resource.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cassandra-table.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_cassandra as cassandra

cfn_table_props = cassandra.CfnTableProps(
    keyspace_name="keyspaceName",
    partition_key_columns=[cassandra.CfnTable.ColumnProperty(
        column_name="columnName",
        column_type="columnType"
    )],

    # the properties below are optional
    billing_mode=cassandra.CfnTable.BillingModeProperty(
        mode="mode",

        # the properties below are optional
        provisioned_throughput=cassandra.CfnTable.ProvisionedThroughputProperty(
            read_capacity_units=123,
            write_capacity_units=123
        )
    ),
    clustering_key_columns=[cassandra.CfnTable.ClusteringKeyColumnProperty(
        column=cassandra.CfnTable.ColumnProperty(
            column_name="columnName",
            column_type="columnType"
        ),

        # the properties below are optional
        order_by="orderBy"
    )],
    default_time_to_live=123,
    encryption_specification=cassandra.CfnTable.EncryptionSpecificationProperty(
        encryption_type="encryptionType",

        # the properties below are optional
        kms_key_identifier="kmsKeyIdentifier"
    ),
    point_in_time_recovery_enabled=False,
    regular_columns=[cassandra.CfnTable.ColumnProperty(
        column_name="columnName",
        column_type="columnType"
    )],
    table_name="tableName",
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)

Attributes

billing_mode

.

  • On-demand mode (default) - You pay based on the actual reads and writes your application performs.

  • Provisioned mode - Lets you specify the number of reads and writes per second that you need for your application.

If you don’t specify a value for this property, then the table will use on-demand mode.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cassandra-table.html#cfn-cassandra-table-billingmode

Type

The billing mode for the table, which determines how you’ll be charged for reads and writes

Return type

Union[IResolvable, BillingModeProperty, None]

clustering_key_columns

One or more columns that determine how the table data is sorted.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cassandra-table.html#cfn-cassandra-table-clusteringkeycolumns

Return type

Union[IResolvable, List[Union[IResolvable, ClusteringKeyColumnProperty]], None]

default_time_to_live

The default Time To Live (TTL) value for all rows in a table in seconds.

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 .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cassandra-table.html#cfn-cassandra-table-defaulttimetolive

Return type

Union[int, float, None]

encryption_specification

The encryption at rest options for the table.

  • AWS owned key (default) - The key is owned by Amazon Keyspaces.

  • Customer managed key - The key is stored in your account and is created, owned, and managed by you.

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 .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cassandra-table.html#cfn-cassandra-table-encryptionspecification

Return type

Union[IResolvable, EncryptionSpecificationProperty, None]

keyspace_name

The name of the keyspace in which to create the table.

The keyspace must already exist.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cassandra-table.html#cfn-cassandra-table-keyspacename

Return type

str

partition_key_columns

One or more columns that uniquely identify every row in the table.

Every table must have a partition key.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cassandra-table.html#cfn-cassandra-table-partitionkeycolumns

Return type

Union[IResolvable, List[Union[ColumnProperty, IResolvable]]]

point_in_time_recovery_enabled

Specifies if point-in-time recovery is enabled or disabled for the table.

The options are PointInTimeRecoveryEnabled=true and PointInTimeRecoveryEnabled=false . If not specified, the default is PointInTimeRecoveryEnabled=false .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cassandra-table.html#cfn-cassandra-table-pointintimerecoveryenabled

Return type

Union[bool, IResolvable, None]

regular_columns

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.

You can add regular columns to existing tables by adding them to the template.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cassandra-table.html#cfn-cassandra-table-regularcolumns

Return type

Union[IResolvable, List[Union[ColumnProperty, IResolvable]], None]

table_name

The name of the table to be created.

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 . .. epigraph:

If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no 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}$

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cassandra-table.html#cfn-cassandra-table-tablename

Return type

Optional[str]

tags

A list of key-value pair tags to be attached to the resource.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cassandra-table.html#cfn-cassandra-table-tags

Return type

Optional[List[CfnTag]]