keyspaces
Creates, updates, deletes or gets a keyspace
resource or lists keyspaces
in a region
Overview
Name | keyspaces |
Type | Resource |
Description | Resource schema for AWS::Cassandra::Keyspace |
Id | aws.cassandra.keyspaces |
Fields
Name | Datatype | Description |
---|---|---|
keyspace_name | string | Name for Cassandra keyspace |
tags | array | |
replication_specification | object | |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | , 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 keyspaces
in a region.
SELECT
region,
keyspace_name,
tags,
replication_specification
FROM aws.cassandra.keyspaces
WHERE region = 'us-east-1';
Gets all properties from an individual keyspace
.
SELECT
region,
keyspace_name,
tags,
replication_specification
FROM aws.cassandra.keyspaces
WHERE region = 'us-east-1' AND data__Identifier = '<KeyspaceName>';
INSERT
example
Use the following StackQL query and manifest file to create a new keyspace
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.cassandra.keyspaces (
,
region
)
SELECT
'{{ }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.cassandra.keyspaces (
KeyspaceName,
Tags,
ReplicationSpecification,
region
)
SELECT
'{{ KeyspaceName }}',
'{{ Tags }}',
'{{ ReplicationSpecification }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: keyspace
props:
- name: KeyspaceName
value: '{{ KeyspaceName }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
- name: ReplicationSpecification
value:
ReplicationStrategy: '{{ ReplicationStrategy }}'
RegionList:
- '{{ RegionList[0] }}'
DELETE
example
/*+ delete */
DELETE FROM aws.cassandra.keyspaces
WHERE data__Identifier = '<KeyspaceName>'
AND region = 'us-east-1';
Permissions
To operate on the keyspaces
resource, the following permissions are required:
Create
cassandra:Create,
cassandra:CreateMultiRegionResource,
cassandra:Select,
cassandra:SelectMultiRegionResource,
cassandra:TagResource,
cassandra:TagMultiRegionResource,
iam:CreateServiceLinkedRole
Read
cassandra:Select,
cassandra:SelectMultiRegionResource
Update
cassandra:Alter,
cassandra:AlterMultiRegionResource,
cassandra:Select,
cassandra:SelectMultiRegionResource,
cassandra:TagResource,
cassandra:TagMultiRegionResource,
cassandra:UntagResource,
cassandra:UntagMultiRegionResource
Delete
cassandra:Drop,
cassandra:DropMultiRegionResource,
cassandra:Select,
cassandra:SelectMultiRegionResource
List
cassandra:Select,
cassandra:SelectMultiRegionResource