Skip to content

Delete Agent Config (hard delete)

client.AgentConfigs.Delete(ctx, agentConfigID) (*AgentConfigDeleteResponse, error)
DELETE/v5/agent_configs/{agent_config_id}

Permanently delete an agent config; this is a hard delete, not an archive, so the row is removed and cannot be restored.

Because a config is only a template, deleting it does not stop or alter any task already created from it. A user caller can only delete a config they created unless fine-grained access control grants access. The response echoes the deleted id.

ParametersExpand Collapse
agentConfigID string
ReturnsExpand Collapse
type AgentConfigDeleteResponse struct{…}
ID string
Deleted bool
Object AgentConfigDeleteResponseObjectOptional

Delete Agent Config (hard delete)

package main

import (
  "context"
  "fmt"

  "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"),
  )
  agentConfig, err := client.AgentConfigs.Delete(context.TODO(), "agent_config_id")
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", agentConfig.ID)
}
{
  "id": "id",
  "deleted": true,
  "object": "agent_config"
}
Returns Examples
{
  "id": "id",
  "deleted": true,
  "object": "agent_config"
}