PgBeam Docs
Databases

updateDatabase

Update a database

Partially updates a database connection. Only provided fields are modified.

Usage

const result = await api.databases.updateDatabase({
    body: {
      ,
    },
  });

Parameters

ParameterTypeRequiredDescription
body.hoststringNoUpdated PostgreSQL host.
body.portnumberNoUpdated PostgreSQL port.
body.namestringNoUpdated PostgreSQL database name.
body.usernamestringNoUpdated PostgreSQL username.
body.passwordstringNoUpdated PostgreSQL password.
body.ssl_modeSSLModeNo
body.roleDatabaseRoleNo
body.pool_regionstringNoRegion where the connection pool is maintained (near the database). When set and different from the client's edge region, queries are relayed through the pool region's data plane. Empty means direct connection.
body.cache_configCacheConfigNo
body.pool_configPoolConfigNo

Response

Promise<Database> — database updated.

Example

import { PgBeamClient } from "pgbeam";

const client = new PgBeamClient({
  token: "pbk_...",
  baseUrl: "https://api.pgbeam.com",
});

const result = await client.api.databases.updateDatabase({
  body: {
      ,
    },
});

Errors

StatusDescription
400Invalid request parameters.
401Missing or invalid authentication.
403Operation not allowed by current plan limits.
404Resource not found.
429Rate limited. Try again later.

On this page