Skip to content

Delete a Load Balancer

client.GPUDroplets.LoadBalancers.Delete(ctx, lbID) error
delete/v2/load_balancers/{lb_id}

To delete a load balancer instance, disassociating any Droplets assigned to it and removing it from your account, send a DELETE request to /v2/load_balancers/$LOAD_BALANCER_ID.

A successful request will receive a 204 status code with no body in response. This indicates that the request was processed successfully.

ParametersExpand Collapse
lbID string
minimum1
Delete a Load Balancer
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.LoadBalancers.Delete(context.TODO(), "4de7ac8b-495b-4884-9a69-1050c6793cd6")
  if err != nil {
    panic(err.Error())
  }
}
Returns Examples