PgBeam
PgBeam Docs
Honeytokens

UpdateHoneytoken

Update a honeytoken

Updates a honeytoken's relation or action.

Usage

result, err := client.Honeytokens.UpdateHoneytoken(ctx, "prj_xxx", "hnt_xxx", pgbeam.HoneytokenInput{
    RelationName: "customer_ssns",
    Action: "...",
  })

Parameters

ParameterTypeRequiredDescription
ctxcontext.ContextYesRequest context
projectIDstringYesUnique project identifier (prefixed, e.g. prj_xxx).
honeytokenIDstringYesUnique honeytoken identifier (prefixed, e.g. hnt_xxx).
reqpgbeam.HoneytokenInputYesRequest body
req.SchemaName*stringNoOptional schema. Null or empty matches the unqualified/public form.
req.RelationNamestringYesRelation (table or view) name of the decoy.
req.ActionstringYesResponse when the honeytoken is tripped.

Response

(*pgbeam.Honeytoken, error): updated honeytoken.

Example

import pgbeam "go.pgbeam.com/sdk"

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

result, err := client.Honeytokens.UpdateHoneytoken(ctx, "prj_xxx", "hnt_xxx", pgbeam.HoneytokenInput{
    SchemaName: "public",
    RelationName: "customer_ssns",
    Action: "...",
  })
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.
404Resource not found.

On this page