Interface AstraDatabaseConfig

Overview

Represents the core definition options for creating a new vector-enabled DataStax Astra database.

This includes required settings such as the database name, cloud provider, and region, as well as an optionally specified keyspace.

Note that:

  • If no keyspace is provided, Astra will automatically provide a keyspace named default_keyspace.
  • Available regions may vary depending on the selected cloud provider.
  • It is not possible to create a non-vector database through the Data API clients.

Disclaimer: database creation is a lengthy operation, and may take upwards of 2-3 minutes


Example

These options are used in the first parameter of the createDatabase method.

Example

const dbAdmin = await admin.createDatabase({
name: 'my-db',
cloudProvider: 'GCP',
region: 'us-central1',
});

See

  • AstraAdmin.createDatabase
  • CreateAstraDatabaseOptions
interface AstraDatabaseConfig {
    cloudProvider: AstraDatabaseCloudProvider;
    keyspace?: string;
    name: string;
    region: string;
}

Properties

The cloud provider where the database will be hosted.

Supported values include 'AWS', 'GCP', and 'AZURE'.

Note: available regions vary across providers.

keyspace?: string

The default keyspace to create within the database, e.g. my_keyspace.

If omitted, Astra will automatically provide a keyspace named default_keyspace.

name: string

A user-defined name for the database, e.g. my_database.

region: string

The specific cloud region in which the database will be deployed, e.g. us-east1.

Note: the region must be valid for the selected cloudProvider.