Skip to main content

keyspaces

Creates, updates, deletes or gets a keyspace resource or lists keyspaces in a region

Overview

Namekeyspaces
TypeResource
DescriptionResource schema for AWS::Cassandra::Keyspace
Idawscc.cassandra.keyspaces

Fields

NameDatatypeDescription
keyspace_namestringName for Cassandra keyspace
tagsarray
replication_specificationobject
client_side_timestamps_enabledbooleanIndicates whether client-side timestamps are enabled (true) or disabled (false) for all tables in the keyspace. To add a Region to a single-Region keyspace with at least one table, the value must be set to true. After you enabled client-side timestamps for a table, you can’t disable it again.
regionstringAWS region.

For more information, see AWS::Cassandra::Keyspace.

Methods

NameResourceAccessible byRequired Params
create_resourcekeyspacesINSERT, region
delete_resourcekeyspacesDELETEIdentifier, region
update_resourcekeyspacesUPDATEIdentifier, PatchDocument, region
list_resourceskeyspaces_list_onlySELECTregion
get_resourcekeyspacesSELECTIdentifier, region

SELECT examples

Gets all properties from an individual keyspace.

SELECT
region,
keyspace_name,
tags,
replication_specification,
client_side_timestamps_enabled
FROM awscc.cassandra.keyspaces
WHERE
region = 'us-east-1' AND
Identifier = '{{ keyspace_name }}';

INSERT example

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

/*+ create */
INSERT INTO awscc.cassandra.keyspaces (
,
region
)
SELECT
'{{ }}',
'{{ region }}';

UPDATE example

Use the following StackQL query and manifest file to update a keyspace resource, using stack-deploy.

/*+ update */
UPDATE awscc.cassandra.keyspaces
SET PatchDocument = string('{{ {
"Tags": tags,
"ReplicationSpecification": replication_specification,
"ClientSideTimestampsEnabled": client_side_timestamps_enabled
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ keyspace_name }}';

DELETE example

/*+ delete */
DELETE FROM awscc.cassandra.keyspaces
WHERE
Identifier = '{{ keyspace_name }}' AND
region = 'us-east-1';

Permissions

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

cassandra:Create,
cassandra:CreateMultiRegionResource,
cassandra:Select,
cassandra:SelectMultiRegionResource,
cassandra:TagResource,
cassandra:TagMultiRegionResource,
iam:CreateServiceLinkedRole