CfnTable

class aws_cdk.aws_cassandra.CfnTable(scope, id, *, keyspace_name, partition_key_columns, auto_scaling_specifications=None, billing_mode=None, client_side_timestamps_enabled=None, clustering_key_columns=None, default_time_to_live=None, encryption_specification=None, point_in_time_recovery_enabled=None, regular_columns=None, replica_specifications=None, table_name=None, tags=None)

Bases: CfnResource

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 .

See:

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

CloudformationResource:

AWS::Cassandra::Table

ExampleMetadata:

fixture=_generated

Example:

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

cfn_table = cassandra.CfnTable(self, "MyCfnTable",
    keyspace_name="keyspaceName",
    partition_key_columns=[cassandra.CfnTable.ColumnProperty(
        column_name="columnName",
        column_type="columnType"
    )],

    # the properties below are optional
    auto_scaling_specifications=cassandra.CfnTable.AutoScalingSpecificationProperty(
        read_capacity_auto_scaling=cassandra.CfnTable.AutoScalingSettingProperty(
            auto_scaling_disabled=False,
            maximum_units=123,
            minimum_units=123,
            scaling_policy=cassandra.CfnTable.ScalingPolicyProperty(
                target_tracking_scaling_policy_configuration=cassandra.CfnTable.TargetTrackingScalingPolicyConfigurationProperty(
                    target_value=123,

                    # the properties below are optional
                    disable_scale_in=False,
                    scale_in_cooldown=123,
                    scale_out_cooldown=123
                )
            )
        ),
        write_capacity_auto_scaling=cassandra.CfnTable.AutoScalingSettingProperty(
            auto_scaling_disabled=False,
            maximum_units=123,
            minimum_units=123,
            scaling_policy=cassandra.CfnTable.ScalingPolicyProperty(
                target_tracking_scaling_policy_configuration=cassandra.CfnTable.TargetTrackingScalingPolicyConfigurationProperty(
                    target_value=123,

                    # the properties below are optional
                    disable_scale_in=False,
                    scale_in_cooldown=123,
                    scale_out_cooldown=123
                )
            )
        )
    ),
    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
        )
    ),
    client_side_timestamps_enabled=False,
    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"
    )],
    replica_specifications=[cassandra.CfnTable.ReplicaSpecificationProperty(
        region="region",

        # the properties below are optional
        read_capacity_auto_scaling=cassandra.CfnTable.AutoScalingSettingProperty(
            auto_scaling_disabled=False,
            maximum_units=123,
            minimum_units=123,
            scaling_policy=cassandra.CfnTable.ScalingPolicyProperty(
                target_tracking_scaling_policy_configuration=cassandra.CfnTable.TargetTrackingScalingPolicyConfigurationProperty(
                    target_value=123,

                    # the properties below are optional
                    disable_scale_in=False,
                    scale_in_cooldown=123,
                    scale_out_cooldown=123
                )
            )
        ),
        read_capacity_units=123
    )],
    table_name="tableName",
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)
Parameters:
  • scope (Construct) – Scope in which this resource is defined.

  • id (str) – Construct identifier for this resource (unique in its scope).

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

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

  • auto_scaling_specifications (Union[IResolvable, AutoScalingSpecificationProperty, Dict[str, Any], None]) – The optional auto scaling capacity settings for a table in provisioned capacity mode.

  • billing_mode (Union[IResolvable, BillingModeProperty, Dict[str, Any], 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.

  • client_side_timestamps_enabled (Union[bool, IResolvable, None]) – Enables client-side timestamps for the table. 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.

  • clustering_key_columns (Union[IResolvable, Sequence[Union[IResolvable, ClusteringKeyColumnProperty, Dict[str, Any]]], 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, Dict[str, Any], 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[IResolvable, ColumnProperty, Dict[str, Any]]], 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.

  • replica_specifications (Union[IResolvable, Sequence[Union[IResolvable, ReplicaSpecificationProperty, Dict[str, Any]]], None]) – The AWS Region specific settings of a multi-Region table. For a multi-Region table, you can configure the table’s read capacity differently per AWS Region. You can do this by configuring the following parameters. - region : The Region where these settings are applied. (Required) - readCapacityUnits : The provisioned read capacity units. (Optional) - readCapacityAutoScaling : The read capacity auto scaling settings for the table. (Optional)

  • 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 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}$

  • tags (Optional[Sequence[Union[CfnTag, Dict[str, Any]]]]) – An array of key-value pairs to apply to this resource. For more information, see Tag .

Methods

add_deletion_override(path)

Syntactic sugar for addOverride(path, undefined).

Parameters:

path (str) – The path of the value to delete.

Return type:

None

add_dependency(target)

Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.

This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.

Parameters:

target (CfnResource) –

Return type:

None

add_depends_on(target)

(deprecated) Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.

Parameters:

target (CfnResource) –

Deprecated:

use addDependency

Stability:

deprecated

Return type:

None

add_metadata(key, value)

Add a value to the CloudFormation Resource Metadata.

Parameters:
  • key (str) –

  • value (Any) –

See:

Return type:

None

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html

Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.

add_override(path, value)

Adds an override to the synthesized CloudFormation resource.

To add a property override, either use addPropertyOverride or prefix path with “Properties.” (i.e. Properties.TopicName).

If the override is nested, separate each nested level using a dot (.) in the path parameter. If there is an array as part of the nesting, specify the index in the path.

To include a literal . in the property name, prefix with a \. In most programming languages you will need to write this as "\\." because the \ itself will need to be escaped.

For example:

cfn_resource.add_override("Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes", ["myattribute"])
cfn_resource.add_override("Properties.GlobalSecondaryIndexes.1.ProjectionType", "INCLUDE")

would add the overrides Example:

"Properties": {
  "GlobalSecondaryIndexes": [
    {
      "Projection": {
        "NonKeyAttributes": [ "myattribute" ]
        ...
      }
      ...
    },
    {
      "ProjectionType": "INCLUDE"
      ...
    },
  ]
  ...
}

The value argument to addOverride will not be processed or translated in any way. Pass raw JSON values in here with the correct capitalization for CloudFormation. If you pass CDK classes or structs, they will be rendered with lowercased key names, and CloudFormation will reject the template.

Parameters:
  • path (str) –

    • The path of the property, you can use dot notation to override values in complex types. Any intermediate keys will be created as needed.

  • value (Any) –

    • The value. Could be primitive or complex.

Return type:

None

add_property_deletion_override(property_path)

Adds an override that deletes the value of a property from the resource definition.

Parameters:

property_path (str) – The path to the property.

Return type:

None

add_property_override(property_path, value)

Adds an override to a resource property.

Syntactic sugar for addOverride("Properties.<...>", value).

Parameters:
  • property_path (str) – The path of the property.

  • value (Any) – The value.

Return type:

None

apply_removal_policy(policy=None, *, apply_to_update_replace_policy=None, default=None)

Sets the deletion policy of the resource based on the removal policy specified.

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you’ve removed it from the CDK application or because you’ve made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN). In some cases, a snapshot can be taken of the resource prior to deletion (RemovalPolicy.SNAPSHOT). A list of resources that support this policy can be found in the following link:

Parameters:
  • policy (Optional[RemovalPolicy]) –

  • apply_to_update_replace_policy (Optional[bool]) – Apply the same deletion policy to the resource’s “UpdateReplacePolicy”. Default: true

  • default (Optional[RemovalPolicy]) – The default policy to apply in case the removal policy is not defined. Default: - Default value is resource specific. To determine the default value for a resource, please consult that specific resource’s documentation.

See:

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options

Return type:

None

get_att(attribute_name, type_hint=None)

Returns a token for an runtime attribute of this resource.

Ideally, use generated attribute accessors (e.g. resource.arn), but this can be used for future compatibility in case there is no generated attribute.

Parameters:
  • attribute_name (str) – The name of the attribute.

  • type_hint (Optional[ResolutionTypeHint]) –

Return type:

Reference

get_metadata(key)

Retrieve a value value from the CloudFormation Resource Metadata.

Parameters:

key (str) –

See:

Return type:

Any

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html

Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.

inspect(inspector)

Examines the CloudFormation resource and discloses attributes.

Parameters:

inspector (TreeInspector) – tree inspector to collect and process attributes.

Return type:

None

obtain_dependencies()

Retrieves an array of resources this resource depends on.

This assembles dependencies on resources across stacks (including nested stacks) automatically.

Return type:

List[Union[Stack, CfnResource]]

obtain_resource_dependencies()

Get a shallow copy of dependencies between this resource and other resources in the same stack.

Return type:

List[CfnResource]

override_logical_id(new_logical_id)

Overrides the auto-generated logical ID with a specific ID.

Parameters:

new_logical_id (str) – The new logical ID to use for this stack element.

Return type:

None

remove_dependency(target)

Indicates that this resource no longer depends on another resource.

This can be used for resources across stacks (including nested stacks) and the dependency will automatically be removed from the relevant scope.

Parameters:

target (CfnResource) –

Return type:

None

replace_dependency(target, new_target)

Replaces one dependency with another.

Parameters:
Return type:

None

to_string()

Returns a string representation of this construct.

Return type:

str

Returns:

a string representation of this resource

Attributes

CFN_RESOURCE_TYPE_NAME = 'AWS::Cassandra::Table'
auto_scaling_specifications

The optional auto scaling capacity settings for a table in provisioned capacity mode.

billing_mode

.

Type:

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

cfn_options

Options for this resource, such as condition, update policy etc.

cfn_resource_type

AWS resource type.

client_side_timestamps_enabled

Enables client-side timestamps for the table.

clustering_key_columns

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

creation_stack

return:

the stack trace of the point where this Resource was created from, sourced from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most node +internal+ entries filtered.

default_time_to_live

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

encryption_specification

The encryption at rest options for the table.

keyspace_name

The name of the keyspace to create the table in.

logical_id

The logical ID for this CloudFormation stack element.

The logical ID of the element is calculated from the path of the resource node in the construct tree.

To override this value, use overrideLogicalId(newLogicalId).

Returns:

the logical ID as a stringified token. This value will only get resolved during synthesis.

node

The tree node.

partition_key_columns

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

point_in_time_recovery_enabled

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

ref

Return a string that will be resolved to a CloudFormation { Ref } for this element.

If, by any chance, the intrinsic reference of a resource is not a string, you could coerce it to an IResolvable through Lazy.any({ produce: resource.ref }).

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.

replica_specifications

The AWS Region specific settings of a multi-Region table.

stack

The stack in which this element is defined.

CfnElements must be defined within a stack scope (directly or indirectly).

table_name

The name of the table to be created.

tags

Tag Manager which manages the tags for this resource.

tags_raw

An array of key-value pairs to apply to this resource.

Static Methods

classmethod is_cfn_element(x)

Returns true if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of instanceof to allow stack elements from different versions of this library to be included in the same stack.

Parameters:

x (Any) –

Return type:

bool

Returns:

The construct as a stack element or undefined if it is not a stack element.

classmethod is_cfn_resource(x)

Check whether the given object is a CfnResource.

Parameters:

x (Any) –

Return type:

bool

classmethod is_construct(x)

Checks if x is a construct.

Use this method instead of instanceof to properly detect Construct instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the constructs library on disk are seen as independent, completely different libraries. As a consequence, the class Construct in each copy of the constructs library is seen as a different class, and an instance of one class will not test as instanceof the other class. npm install will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the constructs library can be accidentally installed, and instanceof will behave unpredictably. It is safest to avoid using instanceof, and using this type-testing method instead.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Construct.

AutoScalingSettingProperty

class CfnTable.AutoScalingSettingProperty(*, auto_scaling_disabled=None, maximum_units=None, minimum_units=None, scaling_policy=None)

Bases: object

The optional auto scaling settings for a table with provisioned throughput capacity.

To turn on auto scaling for a table in throughputMode:PROVISIONED , you must specify the following parameters.

Configure the minimum and maximum capacity units. The auto scaling policy ensures that capacity never goes below the minimum or above the maximum range.

  • minimumUnits : The minimum level of throughput the table should always be ready to support. The value must be between 1 and the max throughput per second quota for your account (40,000 by default).

  • maximumUnits : The maximum level of throughput the table should always be ready to support. The value must be between 1 and the max throughput per second quota for your account (40,000 by default).

  • scalingPolicy : Amazon Keyspaces supports the target tracking scaling policy. The auto scaling target is a percentage of the provisioned capacity of the table.

For more information, see Managing throughput capacity automatically with Amazon Keyspaces auto scaling in the Amazon Keyspaces Developer Guide .

Parameters:
  • auto_scaling_disabled (Union[bool, IResolvable, None]) – This optional parameter enables auto scaling for the table if set to false . Default: - false

  • maximum_units (Union[int, float, None]) – Manage costs by specifying the maximum amount of throughput to provision. The value must be between 1 and the max throughput per second quota for your account (40,000 by default).

  • minimum_units (Union[int, float, None]) – The minimum level of throughput the table should always be ready to support. The value must be between 1 and the max throughput per second quota for your account (40,000 by default).

  • scaling_policy (Union[IResolvable, ScalingPolicyProperty, Dict[str, Any], None]) – Amazon Keyspaces supports the target tracking auto scaling policy. With this policy, Amazon Keyspaces auto scaling ensures that the table’s ratio of consumed to provisioned capacity stays at or near the target value that you specify. You define the target value as a percentage between 20 and 90.

See:

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

ExampleMetadata:

fixture=_generated

Example:

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

auto_scaling_setting_property = cassandra.CfnTable.AutoScalingSettingProperty(
    auto_scaling_disabled=False,
    maximum_units=123,
    minimum_units=123,
    scaling_policy=cassandra.CfnTable.ScalingPolicyProperty(
        target_tracking_scaling_policy_configuration=cassandra.CfnTable.TargetTrackingScalingPolicyConfigurationProperty(
            target_value=123,

            # the properties below are optional
            disable_scale_in=False,
            scale_in_cooldown=123,
            scale_out_cooldown=123
        )
    )
)

Attributes

auto_scaling_disabled

This optional parameter enables auto scaling for the table if set to false .

Default:
  • false

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cassandra-table-autoscalingsetting.html#cfn-cassandra-table-autoscalingsetting-autoscalingdisabled

maximum_units

Manage costs by specifying the maximum amount of throughput to provision.

The value must be between 1 and the max throughput per second quota for your account (40,000 by default).

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cassandra-table-autoscalingsetting.html#cfn-cassandra-table-autoscalingsetting-maximumunits

minimum_units

The minimum level of throughput the table should always be ready to support.

The value must be between 1 and the max throughput per second quota for your account (40,000 by default).

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cassandra-table-autoscalingsetting.html#cfn-cassandra-table-autoscalingsetting-minimumunits

scaling_policy

Amazon Keyspaces supports the target tracking auto scaling policy.

With this policy, Amazon Keyspaces auto scaling ensures that the table’s ratio of consumed to provisioned capacity stays at or near the target value that you specify. You define the target value as a percentage between 20 and 90.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cassandra-table-autoscalingsetting.html#cfn-cassandra-table-autoscalingsetting-scalingpolicy

AutoScalingSpecificationProperty

class CfnTable.AutoScalingSpecificationProperty(*, read_capacity_auto_scaling=None, write_capacity_auto_scaling=None)

Bases: object

The optional auto scaling capacity settings for a table in provisioned capacity mode.

Parameters:
See:

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

ExampleMetadata:

fixture=_generated

Example:

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

auto_scaling_specification_property = cassandra.CfnTable.AutoScalingSpecificationProperty(
    read_capacity_auto_scaling=cassandra.CfnTable.AutoScalingSettingProperty(
        auto_scaling_disabled=False,
        maximum_units=123,
        minimum_units=123,
        scaling_policy=cassandra.CfnTable.ScalingPolicyProperty(
            target_tracking_scaling_policy_configuration=cassandra.CfnTable.TargetTrackingScalingPolicyConfigurationProperty(
                target_value=123,

                # the properties below are optional
                disable_scale_in=False,
                scale_in_cooldown=123,
                scale_out_cooldown=123
            )
        )
    ),
    write_capacity_auto_scaling=cassandra.CfnTable.AutoScalingSettingProperty(
        auto_scaling_disabled=False,
        maximum_units=123,
        minimum_units=123,
        scaling_policy=cassandra.CfnTable.ScalingPolicyProperty(
            target_tracking_scaling_policy_configuration=cassandra.CfnTable.TargetTrackingScalingPolicyConfigurationProperty(
                target_value=123,

                # the properties below are optional
                disable_scale_in=False,
                scale_in_cooldown=123,
                scale_out_cooldown=123
            )
        )
    )
)

Attributes

read_capacity_auto_scaling

The auto scaling settings for the table’s read capacity.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cassandra-table-autoscalingspecification.html#cfn-cassandra-table-autoscalingspecification-readcapacityautoscaling

write_capacity_auto_scaling

The auto scaling settings for the table’s write capacity.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cassandra-table-autoscalingspecification.html#cfn-cassandra-table-autoscalingspecification-writecapacityautoscaling

BillingModeProperty

class CfnTable.BillingModeProperty(*, mode, provisioned_throughput=None)

Bases: object

Determines the billing mode for the table - on-demand or provisioned.

Parameters:
  • mode (str) – The billing mode for the table:. - On-demand mode - ON_DEMAND - Provisioned mode - PROVISIONED .. epigraph:: If you choose PROVISIONED mode, then you also need to specify provisioned throughput (read and write capacity) for the table. Valid values: ON_DEMAND | PROVISIONED Default: - “ON_DEMAND”

  • provisioned_throughput (Union[IResolvable, ProvisionedThroughputProperty, Dict[str, Any], None]) – The provisioned read capacity and write capacity for the table. For more information, see Provisioned throughput capacity mode in the Amazon Keyspaces Developer Guide .

See:

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

ExampleMetadata:

fixture=_generated

Example:

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

billing_mode_property = cassandra.CfnTable.BillingModeProperty(
    mode="mode",

    # the properties below are optional
    provisioned_throughput=cassandra.CfnTable.ProvisionedThroughputProperty(
        read_capacity_units=123,
        write_capacity_units=123
    )
)

Attributes

mode

.

  • On-demand mode - ON_DEMAND

  • Provisioned mode - PROVISIONED

If you choose PROVISIONED mode, then you also need to specify provisioned throughput (read and write capacity) for the table.

Valid values: ON_DEMAND | PROVISIONED

Default:
  • “ON_DEMAND”

See:

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

Type:

The billing mode for the table

provisioned_throughput

The provisioned read capacity and write capacity for the table.

For more information, see Provisioned throughput capacity mode in the Amazon Keyspaces Developer Guide .

See:

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

ClusteringKeyColumnProperty

class CfnTable.ClusteringKeyColumnProperty(*, column, order_by=None)

Bases: object

Defines an individual column within the clustering key.

Parameters:
  • column (Union[IResolvable, ColumnProperty, Dict[str, Any]]) – The name and data type of this clustering key column.

  • order_by (Optional[str]) – The order in which this column’s data is stored:. - ASC (default) - The column’s data is stored in ascending order. - DESC - The column’s data is stored in descending order. Default: - “ASC”

See:

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

ExampleMetadata:

fixture=_generated

Example:

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

clustering_key_column_property = cassandra.CfnTable.ClusteringKeyColumnProperty(
    column=cassandra.CfnTable.ColumnProperty(
        column_name="columnName",
        column_type="columnType"
    ),

    # the properties below are optional
    order_by="orderBy"
)

Attributes

column

The name and data type of this clustering key column.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cassandra-table-clusteringkeycolumn.html#cfn-cassandra-table-clusteringkeycolumn-column

order_by

.

  • ASC (default) - The column’s data is stored in ascending order.

  • DESC - The column’s data is stored in descending order.

Default:
  • “ASC”

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cassandra-table-clusteringkeycolumn.html#cfn-cassandra-table-clusteringkeycolumn-orderby

Type:

The order in which this column’s data is stored

ColumnProperty

class CfnTable.ColumnProperty(*, column_name, column_type)

Bases: object

The name and data type of an individual column in a table.

In addition to the data type, you can also use the following two keywords:

  • STATIC if the table has a clustering column. Static columns store values that are shared by all rows in the same partition.

  • FROZEN for collection data types. In frozen collections the values of the collection are serialized into a single immutable value, and Amazon Keyspaces treats them like a BLOB .

Parameters:
  • column_name (str) – The name of the column. For more information, see Identifiers in the Amazon Keyspaces Developer Guide .

  • column_type (str) – The data type of the column. For more information, see Data types in the Amazon Keyspaces Developer Guide .

See:

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

ExampleMetadata:

fixture=_generated

Example:

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

column_property = cassandra.CfnTable.ColumnProperty(
    column_name="columnName",
    column_type="columnType"
)

Attributes

column_name

The name of the column.

For more information, see Identifiers in the Amazon Keyspaces Developer Guide .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cassandra-table-column.html#cfn-cassandra-table-column-columnname

column_type

The data type of the column.

For more information, see Data types in the Amazon Keyspaces Developer Guide .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cassandra-table-column.html#cfn-cassandra-table-column-columntype

EncryptionSpecificationProperty

class CfnTable.EncryptionSpecificationProperty(*, encryption_type, kms_key_identifier=None)

Bases: object

Specifies the encryption at rest option selected for the table.

Parameters:
  • encryption_type (str) – The encryption at rest options for the table. - AWS owned key (default) - AWS_OWNED_KMS_KEY - Customer managed key - CUSTOMER_MANAGED_KMS_KEY .. epigraph:: If you choose CUSTOMER_MANAGED_KMS_KEY , a kms_key_identifier in the format of a key ARN is required. Valid values: CUSTOMER_MANAGED_KMS_KEY | AWS_OWNED_KMS_KEY . Default: - “AWS_OWNED_KMS_KEY”

  • kms_key_identifier (Optional[str]) – Requires a kms_key_identifier in the format of a key ARN.

See:

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

ExampleMetadata:

fixture=_generated

Example:

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

encryption_specification_property = cassandra.CfnTable.EncryptionSpecificationProperty(
    encryption_type="encryptionType",

    # the properties below are optional
    kms_key_identifier="kmsKeyIdentifier"
)

Attributes

encryption_type

The encryption at rest options for the table.

  • AWS owned key (default) - AWS_OWNED_KMS_KEY

  • Customer managed key - CUSTOMER_MANAGED_KMS_KEY

If you choose CUSTOMER_MANAGED_KMS_KEY , a kms_key_identifier in the format of a key ARN is required.

Valid values: CUSTOMER_MANAGED_KMS_KEY | AWS_OWNED_KMS_KEY .

Default:
  • “AWS_OWNED_KMS_KEY”

See:

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

kms_key_identifier

Requires a kms_key_identifier in the format of a key ARN.

See:

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

ProvisionedThroughputProperty

class CfnTable.ProvisionedThroughputProperty(*, read_capacity_units, write_capacity_units)

Bases: object

The provisioned throughput for the table, which consists of ReadCapacityUnits and WriteCapacityUnits .

Parameters:
  • read_capacity_units (Union[int, float]) – The amount of read capacity that’s provisioned for the table. For more information, see Read/write capacity mode in the Amazon Keyspaces Developer Guide .

  • write_capacity_units (Union[int, float]) –

    The amount of write capacity that’s provisioned for the table. For more information, see Read/write capacity mode in the Amazon Keyspaces Developer Guide .

See:

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

ExampleMetadata:

fixture=_generated

Example:

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

provisioned_throughput_property = cassandra.CfnTable.ProvisionedThroughputProperty(
    read_capacity_units=123,
    write_capacity_units=123
)

Attributes

read_capacity_units

The amount of read capacity that’s provisioned for the table.

For more information, see Read/write capacity mode in the Amazon Keyspaces Developer Guide .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cassandra-table-provisionedthroughput.html#cfn-cassandra-table-provisionedthroughput-readcapacityunits

write_capacity_units

The amount of write capacity that’s provisioned for the table.

For more information, see Read/write capacity mode in the Amazon Keyspaces Developer Guide .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cassandra-table-provisionedthroughput.html#cfn-cassandra-table-provisionedthroughput-writecapacityunits

ReplicaSpecificationProperty

class CfnTable.ReplicaSpecificationProperty(*, region, read_capacity_auto_scaling=None, read_capacity_units=None)

Bases: object

The AWS Region specific settings of a multi-Region table.

For a multi-Region table, you can configure the table’s read capacity differently per AWS Region. You can do this by configuring the following parameters.

  • region : The Region where these settings are applied. (Required)

  • readCapacityUnits : The provisioned read capacity units. (Optional)

  • readCapacityAutoScaling : The read capacity auto scaling settings for the table. (Optional)

Parameters:
  • region (str) – The AWS Region.

  • read_capacity_auto_scaling (Union[IResolvable, AutoScalingSettingProperty, Dict[str, Any], None]) – The read capacity auto scaling settings for the multi-Region table in the specified AWS Region.

  • read_capacity_units (Union[int, float, None]) – The provisioned read capacity units for the multi-Region table in the specified AWS Region.

See:

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

ExampleMetadata:

fixture=_generated

Example:

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

replica_specification_property = cassandra.CfnTable.ReplicaSpecificationProperty(
    region="region",

    # the properties below are optional
    read_capacity_auto_scaling=cassandra.CfnTable.AutoScalingSettingProperty(
        auto_scaling_disabled=False,
        maximum_units=123,
        minimum_units=123,
        scaling_policy=cassandra.CfnTable.ScalingPolicyProperty(
            target_tracking_scaling_policy_configuration=cassandra.CfnTable.TargetTrackingScalingPolicyConfigurationProperty(
                target_value=123,

                # the properties below are optional
                disable_scale_in=False,
                scale_in_cooldown=123,
                scale_out_cooldown=123
            )
        )
    ),
    read_capacity_units=123
)

Attributes

read_capacity_auto_scaling

The read capacity auto scaling settings for the multi-Region table in the specified AWS Region.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cassandra-table-replicaspecification.html#cfn-cassandra-table-replicaspecification-readcapacityautoscaling

read_capacity_units

The provisioned read capacity units for the multi-Region table in the specified AWS Region.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cassandra-table-replicaspecification.html#cfn-cassandra-table-replicaspecification-readcapacityunits

region

The AWS Region.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cassandra-table-replicaspecification.html#cfn-cassandra-table-replicaspecification-region

ScalingPolicyProperty

class CfnTable.ScalingPolicyProperty(*, target_tracking_scaling_policy_configuration=None)

Bases: object

Amazon Keyspaces supports the target tracking auto scaling policy.

With this policy, Amazon Keyspaces auto scaling ensures that the table’s ratio of consumed to provisioned capacity stays at or near the target value that you specify. You define the target value as a percentage between 20 and 90.

Parameters:

target_tracking_scaling_policy_configuration (Union[IResolvable, TargetTrackingScalingPolicyConfigurationProperty, Dict[str, Any], None]) – The auto scaling policy that scales a table based on the ratio of consumed to provisioned capacity.

See:

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

ExampleMetadata:

fixture=_generated

Example:

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

scaling_policy_property = cassandra.CfnTable.ScalingPolicyProperty(
    target_tracking_scaling_policy_configuration=cassandra.CfnTable.TargetTrackingScalingPolicyConfigurationProperty(
        target_value=123,

        # the properties below are optional
        disable_scale_in=False,
        scale_in_cooldown=123,
        scale_out_cooldown=123
    )
)

Attributes

target_tracking_scaling_policy_configuration

The auto scaling policy that scales a table based on the ratio of consumed to provisioned capacity.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cassandra-table-scalingpolicy.html#cfn-cassandra-table-scalingpolicy-targettrackingscalingpolicyconfiguration

TargetTrackingScalingPolicyConfigurationProperty

class CfnTable.TargetTrackingScalingPolicyConfigurationProperty(*, target_value, disable_scale_in=None, scale_in_cooldown=None, scale_out_cooldown=None)

Bases: object

Amazon Keyspaces supports the target tracking auto scaling policy for a provisioned table.

This policy scales a table based on the ratio of consumed to provisioned capacity. The auto scaling target is a percentage of the provisioned capacity of the table.

  • targetTrackingScalingPolicyConfiguration : To define the target tracking policy, you must define the target value.

  • targetValue : The target utilization rate of the table. Amazon Keyspaces auto scaling ensures that the ratio of consumed capacity to provisioned capacity stays at or near this value. You define targetValue as a percentage. A double between 20 and 90. (Required)

  • disableScaleIn : A boolean that specifies if scale-in is disabled or enabled for the table. This parameter is disabled by default. To turn on scale-in , set the boolean value to FALSE . This means that capacity for a table can be automatically scaled down on your behalf. (Optional)

  • scaleInCooldown : A cooldown period in seconds between scaling activities that lets the table stabilize before another scale in activity starts. If no value is provided, the default is 0. (Optional)

  • scaleOutCooldown : A cooldown period in seconds between scaling activities that lets the table stabilize before another scale out activity starts. If no value is provided, the default is 0. (Optional)

Parameters:
  • target_value (Union[int, float]) – Specifies the target value for the target tracking auto scaling policy. Amazon Keyspaces auto scaling scales up capacity automatically when traffic exceeds this target utilization rate, and then back down when it falls below the target. This ensures that the ratio of consumed capacity to provisioned capacity stays at or near this value. You define targetValue as a percentage. An integer between 20 and 90.

  • disable_scale_in (Union[bool, IResolvable, None]) – Specifies if scale-in is enabled. When auto scaling automatically decreases capacity for a table, the table scales in . When scaling policies are set, they can’t scale in the table lower than its minimum capacity.

  • scale_in_cooldown (Union[int, float, None]) – Specifies a scale-in cool down period. A cooldown period in seconds between scaling activities that lets the table stabilize before another scaling activity starts. Default: - 0

  • scale_out_cooldown (Union[int, float, None]) – Specifies a scale out cool down period. A cooldown period in seconds between scaling activities that lets the table stabilize before another scaling activity starts. Default: - 0

See:

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

ExampleMetadata:

fixture=_generated

Example:

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

target_tracking_scaling_policy_configuration_property = cassandra.CfnTable.TargetTrackingScalingPolicyConfigurationProperty(
    target_value=123,

    # the properties below are optional
    disable_scale_in=False,
    scale_in_cooldown=123,
    scale_out_cooldown=123
)

Attributes

disable_scale_in

Specifies if scale-in is enabled.

When auto scaling automatically decreases capacity for a table, the table scales in . When scaling policies are set, they can’t scale in the table lower than its minimum capacity.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cassandra-table-targettrackingscalingpolicyconfiguration.html#cfn-cassandra-table-targettrackingscalingpolicyconfiguration-disablescalein

scale_in_cooldown

Specifies a scale-in cool down period.

A cooldown period in seconds between scaling activities that lets the table stabilize before another scaling activity starts.

Default:
  • 0

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cassandra-table-targettrackingscalingpolicyconfiguration.html#cfn-cassandra-table-targettrackingscalingpolicyconfiguration-scaleincooldown

scale_out_cooldown

Specifies a scale out cool down period.

A cooldown period in seconds between scaling activities that lets the table stabilize before another scaling activity starts.

Default:
  • 0

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cassandra-table-targettrackingscalingpolicyconfiguration.html#cfn-cassandra-table-targettrackingscalingpolicyconfiguration-scaleoutcooldown

target_value

Specifies the target value for the target tracking auto scaling policy.

Amazon Keyspaces auto scaling scales up capacity automatically when traffic exceeds this target utilization rate, and then back down when it falls below the target. This ensures that the ratio of consumed capacity to provisioned capacity stays at or near this value. You define targetValue as a percentage. An integer between 20 and 90.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cassandra-table-targettrackingscalingpolicyconfiguration.html#cfn-cassandra-table-targettrackingscalingpolicyconfiguration-targetvalue