Skip to main content

types

Creates, updates, deletes, gets or lists a types resource.

Overview

Nametypes
TypeResource
Idaws.keyspaces.types

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
direct_parent_typesarrayThe types that use this type.
direct_referring_tablesarrayThe tables that use this type.
field_definitionsarrayThe names and types that define this type.
keyspace_arnstringThe unique identifier of the keyspace that contains this type in the format of an Amazon Resource Name (ARN). (pattern: <code>arn:(aws[a-zA-Z0-9-]):cassandra:.+.</code>)
keyspace_namestringThe name of the keyspace that contains this type. (pattern: <code>[a-zA-Z0-9][a-zA-Z0-9_]{0,47}</code>)
last_modified_timestampstring (date-time)The timestamp that shows when this type was last modified.
max_nesting_depthintegerThe level of nesting implemented for this type.
statusstringThe status of this type. (ACTIVE, CREATING, DELETING, RESTORING)
type_namestringThe name of the type.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_typeselectregionThe GetType operation returns information about the type, for example the field definitions, the timestamp when the type was last modified, the level of nesting, the status, and details about if the type is used in other types and tables. To read keyspace metadata using GetType, the IAM principal needs Select action permissions for the system keyspace. To configure the required permissions, see Permissions to view a UDT in the Amazon Keyspaces Developer Guide.
list_typesselectregionThe ListTypes operation returns a list of types for a specified keyspace. To read keyspace metadata using ListTypes, the IAM principal needs Select action permissions for the system keyspace. To configure the required permissions, see Permissions to view a UDT in the Amazon Keyspaces Developer Guide.
create_typeinsertregion, keyspaceName, typeName, fieldDefinitionsThe CreateType operation creates a new user-defined type in the specified keyspace. To configure the required permissions, see Permissions to create a UDT in the Amazon Keyspaces Developer Guide. For more information, see User-defined types (UDTs) in the Amazon Keyspaces Developer Guide.
delete_typedeleteregionThe DeleteType operation deletes a user-defined type (UDT). You can only delete a type that is not used in a table or another UDT. To configure the required permissions, see Permissions to delete a UDT in the Amazon Keyspaces Developer Guide.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

The GetType operation returns information about the type, for example the field definitions, the timestamp when the type was last modified, the level of nesting, the status, and details about if the type is used in other types and tables. To read keyspace metadata using GetType, the IAM principal needs Select action permissions for the system keyspace. To configure the required permissions, see Permissions to view a UDT in the Amazon Keyspaces Developer Guide.

SELECT
direct_parent_types,
direct_referring_tables,
field_definitions,
keyspace_arn,
keyspace_name,
last_modified_timestamp,
max_nesting_depth,
status,
type_name
FROM aws.keyspaces.types
WHERE region = '{{ region }}' -- required
;

INSERT examples

The CreateType operation creates a new user-defined type in the specified keyspace. To configure the required permissions, see Permissions to create a UDT in the Amazon Keyspaces Developer Guide. For more information, see User-defined types (UDTs) in the Amazon Keyspaces Developer Guide.

INSERT INTO aws.keyspaces.types (
keyspaceName,
typeName,
fieldDefinitions,
region
)
SELECT
'{{ keyspaceName }}' /* required */,
'{{ typeName }}' /* required */,
'{{ fieldDefinitions }}' /* required */,
'{{ region }}'
RETURNING
keyspace_arn,
type_name
;

DELETE examples

The DeleteType operation deletes a user-defined type (UDT). You can only delete a type that is not used in a table or another UDT. To configure the required permissions, see Permissions to delete a UDT in the Amazon Keyspaces Developer Guide.

DELETE FROM aws.keyspaces.types
WHERE region = '{{ region }}' --required
;