Interface AstraPartialDatabaseInfo

Overview

Represents the partial metadata of a database, as returned from Db.info.

For the AstraFullDatabaseInfo, use either AstraDbAdmin.info or AstraAdmin.dbInfo.

This type includes a limited view of database properties, based on the Db's region, sufficient for most runtime use cases, but perhaps not for all administrative operations.

Example

const partialInfo = await db.info();
console.log(partialInfo.region); // e.g. "us-west2"

See

  • AstraBaseDatabaseInfo
  • AstraFullDatabaseInfo
interface AstraPartialDatabaseInfo {
    apiEndpoint: string;
    cloudProvider: AstraDatabaseCloudProvider;
    environment: "dev" | "prod" | "test";
    id: string;
    keyspaces: string[];
    name: string;
    raw: Record<string, any>;
    region: string;
    status: AstraDatabaseStatus;
}

Hierarchy (view full)

Properties

apiEndpoint: string

The region being used by the Db instance, the same as the Db.endpoint.

There may or may not be more api endpoints available, 1:1 with the number of regions available, but they are not listed here; see AstraFullDatabaseInfo for that.

The cloud provider where the database is hosted.

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

environment: "dev" | "prod" | "test"

The Astra environment in which the database is running.

Not relevant for most users' usage.

id: string

The unique UUID of the database.

keyspaces: string[]

The list of keyspaces currently present in the database.

The list may technically be empty in rare corner cases, if they have all been deleted, but it is quite unlikely.

name: string

The user-provided name of the database.

raw: Record<string, any>

The full raw response received from the DevOps API when querying for database metadata.

This field is provided for inspection or debugging, and contains fields not explicitly typed/present in this interface.

region: string

The region being used by the Db instance, extracted directly from the Db.endpoint.

There may or may not be more regions available, but they are not listed here; see AstraFullDatabaseInfo for that.

The current status of the database.

Common values include:

  • 'PENDING'
  • 'ACTIVE'
  • 'DELETING'
  • 'HIBERNATED'
  • 'TERMINATED'

Status values indicate the provisioning/operational state of the database.

AstraDatabaseStatus contains a large amount of possible statuses (though many are unlikely), but the enumeration is open to other statuses not mentioned.