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 | awscc.cassandra.types |
Fields
- get (all properties)
- list (identifiers only)
| 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. |
| 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. |
region | string | AWS region. |
For more information, see AWS::Cassandra::Type.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | types | INSERT | KeyspaceName, TypeName, Fields, region |
delete_resource | types | DELETE | Identifier, region |
list_resources | types_list_only | SELECT | region |
get_resource | types | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
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 awscc.cassandra.types
WHERE
region = 'us-east-1' AND
Identifier = '{{ keyspace_name }}|{{ type_name }}';
Lists all types in a region.
SELECT
region,
keyspace_name,
type_name
FROM awscc.cassandra.types_list_only
WHERE
region = 'us-east-1';
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 awscc.cassandra.types (
KeyspaceName,
TypeName,
Fields,
region
)
SELECT
'{{ keyspace_name }}',
'{{ type_name }}',
'{{ fields }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.cassandra.types (
KeyspaceName,
TypeName,
Fields,
region
)
SELECT
'{{ keyspace_name }}',
'{{ type_name }}',
'{{ fields }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: type
props:
- name: keyspace_name
value: '{{ keyspace_name }}'
- name: type_name
value: '{{ type_name }}'
- name: fields
value:
- field_name: '{{ field_name }}'
field_type: '{{ field_type }}'
DELETE example
/*+ delete */
DELETE FROM awscc.cassandra.types
WHERE
Identifier = '{{ keyspace_name }}|{{ type_name }}' AND
region = 'us-east-1';
Permissions
To operate on the types resource, the following permissions are required:
- Create
- Read
- Delete
- List
cassandra:Create,
cassandra:Select
cassandra:Select
cassandra:Drop,
cassandra:Select
cassandra:Select