Skip to main content

types

Creates, updates, deletes or gets a type resource or lists types in a region

Overview

Nametypes
TypeResource
DescriptionResource schema for AWS::Cassandra::Type
Idawscc.cassandra.types

Fields

NameDatatypeDescription
keyspace_namestringName of the Keyspace which contains the User-Defined Type.
type_namestringName of the User-Defined Type.
fieldsarrayField definitions of the User-Defined Type
direct_referring_tablesarrayList of Tables that directly reference the User-Defined Type in their columns.
direct_parent_typesarrayList of parent User-Defined Types that directly reference the User-Defined Type in their fields.
max_nesting_depthintegerMaximum nesting depth of the User-Defined Type across the field types.
last_modified_timestampnumberTimestamp of the last time the User-Defined Type's meta data was modified.
keyspace_arnstringARN of the Keyspace which contains the User-Defined Type.
regionstringAWS region.

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

Methods

NameResourceAccessible byRequired Params
create_resourcetypesINSERTKeyspaceName, TypeName, Fields, region
delete_resourcetypesDELETEIdentifier, region
list_resourcestypes_list_onlySELECTregion
get_resourcetypesSELECTIdentifier, region

SELECT examples

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 = '{{ region }}' AND
Identifier = '{{ keyspace_name }}|{{ type_name }}';

INSERT example

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

/*+ create */
INSERT INTO awscc.cassandra.types (
KeyspaceName,
TypeName,
Fields,
region
)
SELECT
'{{ keyspace_name }}',
'{{ type_name }}',
'{{ fields }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.cassandra.types
WHERE
Identifier = '{{ keyspace_name }}|{{ type_name }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

Additional Parameters

Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:

ParameterDescription
ClientToken
A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.
A client token is valid for 36 hours once used.
After that, a resource request with the same client token is treated as a new request.
If you do not specify a client token, one is generated for inclusion in the request.
RoleArn
The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.
If you do not specify a role, a temporary session is created using your AWS user credentials.
TypeVersionId
For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used.

Permissions

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

cassandra:Create,
cassandra:Select