Skip to content

Delete Secret

Deprecated
client.Secrets.Delete(ctx, secretID) error
DELETE/v5/sgp/secrets/{secret_id}

Delete a secret from both the cloud provider and SGP metadata.

ParametersExpand Collapse
secretID string

Delete Secret

package main

import (
  "context"

  "github.com/scaleapi/sgp-dev-go"
  "github.com/scaleapi/sgp-dev-go/option"
)

func main() {
  client := sgpdev.NewClient(
    option.WithAPIKey("My API Key"),
    option.WithAccountID("My Account ID"),
  )
  err := client.Secrets.Delete(context.TODO(), "secret_id")
  if err != nil {
    panic(err.Error())
  }
}
Returns Examples