PgBeam Docs
Analytics

UpdateSpendLimit

Update spend limit

Sets the monthly spend limit for an organization. Null removes the limit.

Usage

result, err := client.Analytics.UpdateSpendLimit(ctx, "org_xxx", &pgbeam.UpdateSpendLimitRequest{

  })

Parameters

ParameterTypeRequiredDescription
ctxcontext.ContextYesRequest context
orgIDstringYesUnique organization identifier.
req*pgbeam.UpdateSpendLimitRequestYesRequest body
req.SpendLimit*float64NoMonthly spend limit in dollars. Null to remove the limit.

Response

(*pgbeam.OrganizationPlan, error) — spend limit updated.

Example

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

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

result, err := client.Analytics.UpdateSpendLimit(ctx, "org_xxx", &pgbeam.UpdateSpendLimitRequest{
    SpendLimit: 0,
  })
if err != nil {
  log.Fatal(err)
}
fmt.Println(result)

Errors

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

On this page