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 = '{{ region }}' 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 = '{{ region }}';
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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ 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
;
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 = '{{ 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:
| Parameter | Description |
|---|---|
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:
- Create
- Read
- Delete
- List
cassandra:Create,
cassandra:Select
cassandra:Select
cassandra:Drop,
cassandra:Select
cassandra:Select