Interface ListAstraDatabasesOptions

Represents the options for listing databases.

Field

include - Allows filtering so that databases in listed states are returned.

Field

provider - Allows filtering so that databases from a given provider are returned.

Field

limit - Specify the number of items for one page of data.

Field

skip - Starting value for retrieving a specific page of results.

interface ListAstraDatabasesOptions {
    include?: AstraDatabaseStatusFilter;
    limit?: number;
    maxTimeMS?: "ERROR: The `maxTimeMS` option is no longer available; the timeouts system has been overhauled, and timeouts should now be set using `timeout`";
    provider?: AstraDatabaseCloudProviderFilter;
    startingAfter?: string;
    timeout?: number | Pick<Partial<TimeoutDescriptor>, "requestTimeoutMs" | "databaseAdminTimeoutMs">;
}

Hierarchy (view full)

  • CommandOptions<{
        timeout: "databaseAdminTimeoutMs";
    }>
    • ListAstraDatabasesOptions

Properties

Allows filtering so that databases in listed states are returned.

limit?: number

Optional parameter for pagination purposes. Specify the number of items for one page of data.

Should be between 1 and 100.

Defaults to 25.

Default Value

25
maxTimeMS?: "ERROR: The `maxTimeMS` option is no longer available; the timeouts system has been overhauled, and timeouts should now be set using `timeout`"

This temporary error-ing property exists for migration convenience, and will be removed in a future version.

Deprecated

  • The maxTimeMS option is no longer available; the timeouts system has been overhauled, and timeouts should now be set using timeout, and defaults in timeoutDefaults. You may generally Ctrl+R replace maxTimeMS with timeout to retain the same behavior.

Allows filtering so that databases from a given provider are returned.

startingAfter?: string

Optional parameter for pagination purposes. Pass the UUID of the last item on the previous page to get the next page.

timeout?: number | Pick<Partial<TimeoutDescriptor>, "requestTimeoutMs" | "databaseAdminTimeoutMs">
Overview

Lets you specify timeouts for individual methods, in two different formats:

  • A subtype of TimeoutDescriptor, which lets you specify the timeout for specific categories.
  • A number, which specifies the "happy path" timeout for the method.
    • In single-call methods, this sets both the request & overall method timeouts.
    • In multi-call methods, this sets the overall method timeout (request timeouts are kept as default).

Example

// Both `requestTimeoutMs` and `generalMethodTimeoutMs` are set to 1000ms.
await coll.insertOne({ ... }, { timeout: 1000 });

// `requestTimeoutMs` is left as default, `generalMethodTimeoutMs` is set to 2000ms.
await coll.insertOne({ ... }, { timeout: { generalMethodTimeoutMs: 2000 } });

// Both `requestTimeoutMs` and `generalMethodTimeoutMs` are set to 2000ms.
await coll.insertMany([...], {
timeout: { requestTimeoutMs: 2000, generalMethodTimeoutMs: 2000 },
});

Example

// `requestTimeoutMs` is left as default, `generalMethodTimeoutMs` is set to 2000ms.
await coll.insertMany([...], { timeout: 2000 });

// `requestTimeoutMs` is left as default, `generalMethodTimeoutMs` is set to 2000ms.
await coll.insertMany([...], { timeout: { generalMethodTimeoutMs: 2000 } });

// Both `requestTimeoutMs` and `generalMethodTimeoutMs` are set to 2000ms.
await coll.insertMany([...], {
timeout: { requestTimeoutMs: 2000, generalMethodTimeoutMs: 2000 },
});

See TimeoutDescriptor for much more information.

See

TimeoutDescriptor