create_type
¶
create_type(
keyspace_name: KeyspaceName,
type_name: TypeName,
field_definitions: FieldList,
*,
config_overrides: Optional[KeyspacesClientConfig] = None,
) -> CreateTypeResponse
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.
Parameters:
-
keyspace_name(KeyspaceName) –The name of the keyspace.
-
type_name(TypeName) –The name of the user-defined type.
UDT names must contain 48 characters or less, must begin with an alphabetic character, and can only contain alpha-numeric characters and underscores. Amazon Keyspaces converts upper case characters automatically into lower case characters.
Alternatively, you can declare a UDT name in double quotes. When declaring a UDT name inside double quotes, Amazon Keyspaces preserves upper casing and allows special characters.
You can also use double quotes as part of the name when you create the UDT, but you must escape each double quote character with an additional double quote character.
-
field_definitions(FieldList) –The field definitions, consisting of names and types, that define this type.
Raises:
-
AccessDeniedException–You don't have sufficient access permissions to perform this action.
-
ConflictException–Amazon Keyspaces couldn't complete the requested action. This error may occur if you try to perform an action and the same or a different action is already in progress, or if you try to create a resource that already exists.
-
InternalServerException–Amazon Keyspaces was unable to fully process this request because of an internal server error.
-
ResourceNotFoundException–The operation tried to access a keyspace, table, or type that doesn't exist. The resource might not be specified correctly, or its status might not be
ACTIVE. -
ServiceQuotaExceededException–The operation exceeded the service quota for this resource. For more information on service quotas, see Quotas in the Amazon Keyspaces Developer Guide.
-
ValidationException–The operation failed due to an invalid or malformed request.
-
UnknownServiceError–The service returned an error code this client does not model.