types
Creates, updates, deletes or gets a type
resource or lists types
in a region
Overview
Name | types |
Type | Resource |
Description | Resource schema for AWS::Cassandra::Type |
Id | aws.cassandra.types |
Fields
Name | Datatype | Description |
---|---|---|
keyspace_name | string | Name of the Keyspace which contains the User-Defined Type. |
type_name | string | Name of the User-Defined Type. |
fields | array | Field definitions of the User-Defined Type |
direct_referring_tables | array | List of Tables that directly reference the User-Defined Type in their columns. |
direct_parent_types | array | List of parent User-Defined Types that directly reference the User-Defined Type in their fields. |
max_nesting_depth | integer | Maximum nesting depth of the User-Defined Type across the field types. |
last_modified_timestamp | number | Timestamp of the last time the User-Defined Type's meta data was modified. |
keyspace_arn | string | ARN of the Keyspace which contains the User-Defined Type. |
region | string | AWS region. |
For more information, see AWS::Cassandra::Type
.
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | KeyspaceName, TypeName, Fields, region |
delete_resource | DELETE | data__Identifier, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all types
in a region.
SELECT
region,
keyspace_name,
type_name,
fields,
direct_referring_tables,
direct_parent_types,
max_nesting_depth,
last_modified_timestamp,
keyspace_arn
FROM aws.cassandra.types
WHERE region = 'us-east-1';
Gets all properties from an individual type
.
SELECT
region,
keyspace_name,
type_name,
fields,
direct_referring_tables,
direct_parent_types,
max_nesting_depth,
last_modified_timestamp,
keyspace_arn
FROM aws.cassandra.types
WHERE region = 'us-east-1' AND data__Identifier = '<KeyspaceName>|<TypeName>';
INSERT
example
Use the following StackQL query and manifest file to create a new type
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.cassandra.types (
KeyspaceName,
TypeName,
Fields,
region
)
SELECT
'{{ KeyspaceName }}',
'{{ TypeName }}',
'{{ Fields }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.cassandra.types (
KeyspaceName,
TypeName,
Fields,
region
)
SELECT
'{{ KeyspaceName }}',
'{{ TypeName }}',
'{{ Fields }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: type
props:
- name: KeyspaceName
value: '{{ KeyspaceName }}'
- name: TypeName
value: '{{ TypeName }}'
- name: Fields
value:
- FieldName: '{{ FieldName }}'
FieldType: '{{ FieldType }}'
DELETE
example
/*+ delete */
DELETE FROM aws.cassandra.types
WHERE data__Identifier = '<KeyspaceName|TypeName>'
AND region = 'us-east-1';
Permissions
To operate on the types
resource, the following permissions are required:
Create
cassandra:Create,
cassandra:Select
Read
cassandra:Select
Delete
cassandra:Drop,
cassandra:Select
List
cassandra:Select