PgBeam Docs
Projects

DeleteReplica

Delete a replica

Removes a read replica from a database.

Usage

err := client.Projects.DeleteReplica(ctx, "db_xxx", "rep_xxx")

Parameters

ParameterTypeRequiredDescription
ctxcontext.ContextYesRequest context
databaseIDstringYesUnique database identifier (prefixed, e.g. db_xxx).
replicaIDstringYesUnique replica identifier (prefixed, e.g. rep_xxx).

Response

error — returns nil on success.

Example

import pgbeam "github.com/pgbeam/pgbeam-go"

client := pgbeam.NewClient(&pgbeam.ClientOptions{
  APIKey: "pgb_your_api_key",
})

err := client.Projects.DeleteReplica(ctx, "db_xxx", "rep_xxx")
if err != nil {
  log.Fatal(err)
}

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