Skip to content

Delete autoscale pool and resources

client.GPUDroplets.Autoscale.DeleteDangerous(ctx, autoscalePoolID, body) error
delete/v2/droplets/autoscale/{autoscale_pool_id}/dangerous

To destroy an autoscale pool and its associated resources (Droplets), send a DELETE request to the /v2/droplets/autoscale/$AUTOSCALE_POOL_ID/dangerous endpoint.

ParametersExpand Collapse
autoscalePoolID string
body GPUDropletAutoscaleDeleteDangerousParams
XDangerous param.Field[bool]

Acknowledge this action will destroy the autoscale pool and its associated resources and can not be reversed.

Delete autoscale pool and resources
package main

import (
  "context"

  "github.com/stainless-sdks/-go"
  "github.com/stainless-sdks/-go/option"
)

func main() {
  client := gradient.NewClient(
    option.WithAccessToken("My Access Token"),
  )
  err := client.GPUDroplets.Autoscale.DeleteDangerous(
    context.TODO(),
    "0d3db13e-a604-4944-9827-7ec2642d32ac",
    gradient.GPUDropletAutoscaleDeleteDangerousParams{
      XDangerous: gradient.F(true),
    },
  )
  if err != nil {
    panic(err.Error())
  }
}
Returns Examples