Keyspaces / Client / get_type

get_type#

Keyspaces.Client.get_type(**kwargs)#

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.

See also: AWS API Documentation

Request Syntax

response = client.get_type(
    keyspaceName='string',
    typeName='string'
)
Parameters:
  • keyspaceName (string) –

    [REQUIRED]

    The name of the keyspace that contains this type.

  • typeName (string) –

    [REQUIRED]

    The formatted name of the type. For example, if the name of the type was created without double quotes, Amazon Keyspaces saved the name in lower-case characters. If the name was created in double quotes, you must use double quotes to specify the type name.

Return type:

dict

Returns:

Response Syntax

{
    'keyspaceName': 'string',
    'typeName': 'string',
    'fieldDefinitions': [
        {
            'name': 'string',
            'type': 'string'
        },
    ],
    'lastModifiedTimestamp': datetime(2015, 1, 1),
    'status': 'ACTIVE'|'CREATING'|'DELETING'|'RESTORING',
    'directReferringTables': [
        'string',
    ],
    'directParentTypes': [
        'string',
    ],
    'maxNestingDepth': 123,
    'keyspaceArn': 'string'
}

Response Structure

  • (dict) –

    • keyspaceName (string) –

      The name of the keyspace that contains this type.

    • typeName (string) –

      The name of the type.

    • fieldDefinitions (list) –

      The names and types that define this type.

      • (dict) –

        A field definition consists out of a name and a type.

        • name (string) –

          The identifier.

        • type (string) –

          Any supported Cassandra data type, including collections and other user-defined types that are contained in the same keyspace.

          For more information, see Cassandra data type support in the Amazon Keyspaces Developer Guide.

    • lastModifiedTimestamp (datetime) –

      The timestamp that shows when this type was last modified.

    • status (string) –

      The status of this type.

    • directReferringTables (list) –

      The tables that use this type.

      • (string) –

    • directParentTypes (list) –

      The types that use this type.

      • (string) –

    • maxNestingDepth (integer) –

      The level of nesting implemented for this type.

    • keyspaceArn (string) –

      The unique identifier of the keyspace that contains this type in the format of an Amazon Resource Name (ARN).

Exceptions

  • Keyspaces.Client.exceptions.ValidationException

  • Keyspaces.Client.exceptions.ServiceQuotaExceededException

  • Keyspaces.Client.exceptions.InternalServerException

  • Keyspaces.Client.exceptions.AccessDeniedException

  • Keyspaces.Client.exceptions.ResourceNotFoundException