Skip to main content

tables

Creates, updates, deletes or gets a table resource or lists tables in a region

Overview

Nametables
TypeResource
DescriptionResource schema for AWS::Cassandra::Table
Idaws.cassandra.tables

Fields

NameDatatypeDescription
keyspace_namestringName for Cassandra keyspace
table_namestringName for Cassandra table
regular_columnsarrayNon-key columns of the table
partition_key_columnsarrayPartition key columns of the table
clustering_key_columnsarrayClustering key columns of the table
billing_modeobject
point_in_time_recovery_enabledbooleanIndicates whether point in time recovery is enabled (true) or disabled (false) on the table
client_side_timestamps_enabledbooleanIndicates whether client side timestamps are enabled (true) or disabled (false) on the table. False by default, once it is enabled it cannot be disabled again.
tagsarrayAn array of key-value pairs to apply to this resource
default_time_to_liveintegerDefault TTL (Time To Live) in seconds, where zero is disabled. If the value is greater than zero, TTL is enabled for the entire table and an expiration timestamp is added to each column.
encryption_specificationobjectRepresents the settings used to enable server-side encryption
auto_scaling_specificationsobjectRepresents the read and write settings used for AutoScaling.
replica_specificationsarray
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTKeyspaceName, PartitionKeyColumns, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all tables in a region.

SELECT
region,
keyspace_name,
table_name,
regular_columns,
partition_key_columns,
clustering_key_columns,
billing_mode,
point_in_time_recovery_enabled,
client_side_timestamps_enabled,
tags,
default_time_to_live,
encryption_specification,
auto_scaling_specifications,
replica_specifications
FROM aws.cassandra.tables
WHERE region = 'us-east-1';

Gets all properties from an individual table.

SELECT
region,
keyspace_name,
table_name,
regular_columns,
partition_key_columns,
clustering_key_columns,
billing_mode,
point_in_time_recovery_enabled,
client_side_timestamps_enabled,
tags,
default_time_to_live,
encryption_specification,
auto_scaling_specifications,
replica_specifications
FROM aws.cassandra.tables
WHERE region = 'us-east-1' AND data__Identifier = '<KeyspaceName>|<TableName>';

INSERT example

Use the following StackQL query and manifest file to create a new table resource, using stack-deploy.

/*+ create */
INSERT INTO aws.cassandra.tables (
KeyspaceName,
PartitionKeyColumns,
region
)
SELECT
'{{ KeyspaceName }}',
'{{ PartitionKeyColumns }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.cassandra.tables
WHERE data__Identifier = '<KeyspaceName|TableName>'
AND region = 'us-east-1';

Permissions

To operate on the tables resource, the following permissions are required:

Create

cassandra:Create,
cassandra:CreateMultiRegionResource,
cassandra:Select,
cassandra:SelectMultiRegionResource,
cassandra:TagResource,
cassandra:TagMultiRegionResource,
kms:CreateGrant,
kms:DescribeKey,
kms:Encrypt,
kms:Decrypt,
application-autoscaling:DescribeScalableTargets,
application-autoscaling:DescribeScalingPolicies,
application-autoscaling:DeregisterScalableTarget,
application-autoscaling:RegisterScalableTarget,
application-autoscaling:PutScalingPolicy,
cloudwatch:DeleteAlarms,
cloudwatch:DescribeAlarms,
cloudwatch:GetMetricData,
cloudwatch:PutMetricAlarm

Read

cassandra:Select,
cassandra:SelectMultiRegionResource,
application-autoscaling:DescribeScalableTargets,
application-autoscaling:DescribeScalingPolicies,
application-autoscaling:DeregisterScalableTarget,
application-autoscaling:RegisterScalableTarget,
application-autoscaling:PutScalingPolicy,
cloudwatch:DeleteAlarms,
cloudwatch:DescribeAlarms,
cloudwatch:GetMetricData,
cloudwatch:PutMetricAlarm

Update

cassandra:Alter,
cassandra:AlterMultiRegionResource,
cassandra:Select,
cassandra:SelectMultiRegionResource,
cassandra:TagResource,
cassandra:TagMultiRegionResource,
cassandra:UntagResource,
cassandra:UntagMultiRegionResource,
kms:CreateGrant,
kms:DescribeKey,
kms:Encrypt,
kms:Decrypt,
application-autoscaling:DescribeScalableTargets,
application-autoscaling:DescribeScalingPolicies,
application-autoscaling:DeregisterScalableTarget,
application-autoscaling:RegisterScalableTarget,
application-autoscaling:PutScalingPolicy,
cloudwatch:DeleteAlarms,
cloudwatch:DescribeAlarms,
cloudwatch:GetMetricData,
cloudwatch:PutMetricAlarm

Delete

cassandra:Drop,
cassandra:DropMultiRegionResource,
cassandra:Select,
cassandra:SelectMultiRegionResource,
application-autoscaling:DescribeScalableTargets,
application-autoscaling:DescribeScalingPolicies,
application-autoscaling:DeregisterScalableTarget,
application-autoscaling:RegisterScalableTarget,
application-autoscaling:PutScalingPolicy,
cloudwatch:DeleteAlarms,
cloudwatch:DescribeAlarms,
cloudwatch:GetMetricData,
cloudwatch:PutMetricAlarm

List

cassandra:Select,
cassandra:SelectMultiRegionResource,
application-autoscaling:DescribeScalableTargets,
application-autoscaling:DescribeScalingPolicies,
application-autoscaling:DeregisterScalableTarget,
application-autoscaling:RegisterScalableTarget,
application-autoscaling:PutScalingPolicy,
cloudwatch:DeleteAlarms,
cloudwatch:DescribeAlarms,
cloudwatch:GetMetricData,
cloudwatch:PutMetricAlarm