tables
Creates, updates, deletes or gets a table
resource or lists tables
in a region
Overview
Name | tables |
Type | Resource |
Description | Resource schema for AWS::Cassandra::Table |
Id | aws.cassandra.tables |
Fields
Name | Datatype | Description |
---|---|---|
keyspace_name | string | Name for Cassandra keyspace |
table_name | string | Name for Cassandra table |
regular_columns | array | Non-key columns of the table |
partition_key_columns | array | Partition key columns of the table |
clustering_key_columns | array | Clustering key columns of the table |
billing_mode | object | |
point_in_time_recovery_enabled | boolean | Indicates whether point in time recovery is enabled (true) or disabled (false) on the table |
client_side_timestamps_enabled | boolean | Indicates 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. |
tags | array | An array of key-value pairs to apply to this resource |
default_time_to_live | integer | Default 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_specification | object | Represents the settings used to enable server-side encryption |
auto_scaling_specifications | object | Represents the read and write settings used for AutoScaling. |
replica_specifications | array | |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | KeyspaceName, PartitionKeyColumns, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.cassandra.tables (
KeyspaceName,
PartitionKeyColumns,
region
)
SELECT
'{{ KeyspaceName }}',
'{{ PartitionKeyColumns }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.cassandra.tables (
KeyspaceName,
TableName,
RegularColumns,
PartitionKeyColumns,
ClusteringKeyColumns,
BillingMode,
PointInTimeRecoveryEnabled,
ClientSideTimestampsEnabled,
Tags,
DefaultTimeToLive,
EncryptionSpecification,
AutoScalingSpecifications,
ReplicaSpecifications,
region
)
SELECT
'{{ KeyspaceName }}',
'{{ TableName }}',
'{{ RegularColumns }}',
'{{ PartitionKeyColumns }}',
'{{ ClusteringKeyColumns }}',
'{{ BillingMode }}',
'{{ PointInTimeRecoveryEnabled }}',
'{{ ClientSideTimestampsEnabled }}',
'{{ Tags }}',
'{{ DefaultTimeToLive }}',
'{{ EncryptionSpecification }}',
'{{ AutoScalingSpecifications }}',
'{{ ReplicaSpecifications }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: table
props:
- name: KeyspaceName
value: '{{ KeyspaceName }}'
- name: TableName
value: '{{ TableName }}'
- name: RegularColumns
value:
- ColumnName: '{{ ColumnName }}'
ColumnType: '{{ ColumnType }}'
- name: PartitionKeyColumns
value:
- null
- name: ClusteringKeyColumns
value:
- Column: null
OrderBy: '{{ OrderBy }}'
- name: BillingMode
value:
Mode: '{{ Mode }}'
ProvisionedThroughput:
ReadCapacityUnits: '{{ ReadCapacityUnits }}'
WriteCapacityUnits: '{{ WriteCapacityUnits }}'
- name: PointInTimeRecoveryEnabled
value: '{{ PointInTimeRecoveryEnabled }}'
- name: ClientSideTimestampsEnabled
value: '{{ ClientSideTimestampsEnabled }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
- name: DefaultTimeToLive
value: '{{ DefaultTimeToLive }}'
- name: EncryptionSpecification
value:
EncryptionType: '{{ EncryptionType }}'
KmsKeyIdentifier: '{{ KmsKeyIdentifier }}'
- name: AutoScalingSpecifications
value:
WriteCapacityAutoScaling:
AutoScalingDisabled: '{{ AutoScalingDisabled }}'
MinimumUnits: '{{ MinimumUnits }}'
MaximumUnits: '{{ MaximumUnits }}'
ScalingPolicy:
TargetTrackingScalingPolicyConfiguration:
DisableScaleIn: '{{ DisableScaleIn }}'
ScaleInCooldown: '{{ ScaleInCooldown }}'
ScaleOutCooldown: '{{ ScaleOutCooldown }}'
TargetValue: '{{ TargetValue }}'
ReadCapacityAutoScaling: null
- name: ReplicaSpecifications
value:
- Region: '{{ Region }}'
ReadCapacityUnits: '{{ ReadCapacityUnits }}'
ReadCapacityAutoScaling: null
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