KeyspacesClient

Amazon Keyspaces (for Apache Cassandra) is a scalable, highly available, and managed Apache Cassandra-compatible database service. Amazon Keyspaces makes it easy to migrate, run, and scale Cassandra workloads in the Amazon Web Services Cloud. With just a few clicks on the Amazon Web Services Management Console or a few lines of code, you can create keyspaces and tables in Amazon Keyspaces, without deploying any infrastructure or installing software.

In addition to supporting Cassandra Query Language (CQL) requests via open-source Cassandra drivers, Amazon Keyspaces supports data definition language (DDL) operations to manage keyspaces and tables using the Amazon Web Services SDK and CLI, as well as infrastructure as code (IaC) services and tools such as CloudFormation and Terraform. This API reference describes the supported DDL operations in detail.

For the list of all supported CQL APIs, see Supported Cassandra APIs, operations, and data types in Amazon Keyspaces in the Amazon Keyspaces Developer Guide.

To learn how Amazon Keyspaces API actions are recorded with CloudTrail, see Amazon Keyspaces information in CloudTrail in the Amazon Keyspaces Developer Guide.

For more information about Amazon Web Services APIs, for example how to implement retry logic or how to sign Amazon Web Services API requests, see Amazon Web Services APIs in the General Reference.

Properties

Link copied to clipboard
abstract override val config: KeyspacesClient.Config

KeyspacesClient's configuration

Functions

Link copied to clipboard

The CreateKeyspace operation adds a new keyspace to your account. In an Amazon Web Services account, keyspace names must be unique within each Region.

Link copied to clipboard
abstract suspend fun createTable(input: CreateTableRequest): CreateTableResponse

The CreateTable operation adds a new table to the specified keyspace. Within a keyspace, table names must be unique.

Link copied to clipboard

The DeleteKeyspace operation deletes a keyspace and all of its tables.

Link copied to clipboard
abstract suspend fun deleteTable(input: DeleteTableRequest): DeleteTableResponse

The DeleteTable operation deletes a table and all of its data. After a DeleteTable request is received, the specified table is in the DELETING state until Amazon Keyspaces completes the deletion. If the table is in the ACTIVE state, you can delete it. If a table is either in the CREATING or UPDATING states, then Amazon Keyspaces returns a ResourceInUseException. If the specified table does not exist, Amazon Keyspaces returns a ResourceNotFoundException. If the table is already in the DELETING state, no error is returned.

Link copied to clipboard
abstract suspend fun getKeyspace(input: GetKeyspaceRequest): GetKeyspaceResponse

Returns the name and the Amazon Resource Name (ARN) of the specified table.

Link copied to clipboard
abstract suspend fun getTable(input: GetTableRequest): GetTableResponse

Returns information about the table, including the table's name and current status, the keyspace name, configuration settings, and metadata.

Link copied to clipboard

Returns auto scaling related settings of the specified table in JSON format. If the table is a multi-Region table, the Amazon Web Services Region specific auto scaling settings of the table are included.

Link copied to clipboard
abstract suspend fun listKeyspaces(input: ListKeyspacesRequest = ListKeyspacesRequest { }): ListKeyspacesResponse

Returns a list of keyspaces.

Link copied to clipboard
abstract suspend fun listTables(input: ListTablesRequest): ListTablesResponse

Returns a list of tables for a specified keyspace.

Link copied to clipboard

Returns a list of all tags associated with the specified Amazon Keyspaces resource.

Link copied to clipboard

Restores the table to the specified point in time within the earliest_restorable_timestamp and the current time. For more information about restore points, see Time window for PITR continuous backups in the Amazon Keyspaces Developer Guide.

Link copied to clipboard
abstract suspend fun tagResource(input: TagResourceRequest): TagResourceResponse

Associates a set of tags with a Amazon Keyspaces resource. You can then activate these user-defined tags so that they appear on the Cost Management Console for cost allocation tracking. For more information, see Adding tags and labels to Amazon Keyspaces resources in the Amazon Keyspaces Developer Guide.

Link copied to clipboard

Removes the association of tags from a Amazon Keyspaces resource.

Link copied to clipboard
abstract suspend fun updateTable(input: UpdateTableRequest): UpdateTableResponse

Adds new columns to the table or updates one of the table's settings, for example capacity mode, auto scaling, encryption, point-in-time recovery, or ttl settings. Note that you can only update one specific table setting per update operation.

Inherited functions

Link copied to clipboard
expect abstract fun close()
Link copied to clipboard

The CreateKeyspace operation adds a new keyspace to your account. In an Amazon Web Services account, keyspace names must be unique within each Region.

Link copied to clipboard
inline suspend fun KeyspacesClient.createTable(crossinline block: CreateTableRequest.Builder.() -> Unit): CreateTableResponse

The CreateTable operation adds a new table to the specified keyspace. Within a keyspace, table names must be unique.

Link copied to clipboard

The DeleteKeyspace operation deletes a keyspace and all of its tables.

Link copied to clipboard
inline suspend fun KeyspacesClient.deleteTable(crossinline block: DeleteTableRequest.Builder.() -> Unit): DeleteTableResponse

The DeleteTable operation deletes a table and all of its data. After a DeleteTable request is received, the specified table is in the DELETING state until Amazon Keyspaces completes the deletion. If the table is in the ACTIVE state, you can delete it. If a table is either in the CREATING or UPDATING states, then Amazon Keyspaces returns a ResourceInUseException. If the specified table does not exist, Amazon Keyspaces returns a ResourceNotFoundException. If the table is already in the DELETING state, no error is returned.

Link copied to clipboard
inline suspend fun KeyspacesClient.getKeyspace(crossinline block: GetKeyspaceRequest.Builder.() -> Unit): GetKeyspaceResponse

Returns the name and the Amazon Resource Name (ARN) of the specified table.

Link copied to clipboard
inline suspend fun KeyspacesClient.getTable(crossinline block: GetTableRequest.Builder.() -> Unit): GetTableResponse

Returns information about the table, including the table's name and current status, the keyspace name, configuration settings, and metadata.

Link copied to clipboard

Returns auto scaling related settings of the specified table in JSON format. If the table is a multi-Region table, the Amazon Web Services Region specific auto scaling settings of the table are included.

Link copied to clipboard

Returns a list of keyspaces.

Link copied to clipboard
inline suspend fun KeyspacesClient.listTables(crossinline block: ListTablesRequest.Builder.() -> Unit): ListTablesResponse

Returns a list of tables for a specified keyspace.

Link copied to clipboard

Returns a list of all tags associated with the specified Amazon Keyspaces resource.

Link copied to clipboard

Restores the table to the specified point in time within the earliest_restorable_timestamp and the current time. For more information about restore points, see Time window for PITR continuous backups in the Amazon Keyspaces Developer Guide.

Link copied to clipboard
inline suspend fun KeyspacesClient.tagResource(crossinline block: TagResourceRequest.Builder.() -> Unit): TagResourceResponse

Associates a set of tags with a Amazon Keyspaces resource. You can then activate these user-defined tags so that they appear on the Cost Management Console for cost allocation tracking. For more information, see Adding tags and labels to Amazon Keyspaces resources in the Amazon Keyspaces Developer Guide.

Link copied to clipboard

Removes the association of tags from a Amazon Keyspaces resource.

Link copied to clipboard
inline suspend fun KeyspacesClient.updateTable(crossinline block: UpdateTableRequest.Builder.() -> Unit): UpdateTableResponse

Adds new columns to the table or updates one of the table's settings, for example capacity mode, auto scaling, encryption, point-in-time recovery, or ttl settings. Note that you can only update one specific table setting per update operation.

Link copied to clipboard

Create a copy of the client with one or more configuration values overridden. This method allows the caller to perform scoped config overrides for one or more client operations.