Destroy a Droplet and All of its Associated Resources (Dangerous)
client.GPUDroplets.DestroyWithAssociatedResources.DeleteDangerous(ctx, dropletID, body) error
/v2/droplets/{droplet_id}/destroy_with_associated_resources/dangerous
To destroy a Droplet along with all of its associated resources, send a DELETE
request to the /v2/droplets/$DROPLET_ID/destroy_with_associated_resources/dangerous
endpoint. The headers of this request must include an X-Dangerous key set to
true. To preview which resources will be destroyed, first query the
Droplet's associated resources. This operation can not be reverse and should
be used with caution.
A successful response will include a 202 response code and no content. Use the status endpoint to check on the success or failure of the destruction of the individual resources.
Parameters
dropletID int64
minimum1
Destroy a Droplet and All of its Associated Resources (Dangerous)
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.DestroyWithAssociatedResources.DeleteDangerous(
context.TODO(),
int64(3164444),
gradient.GPUDropletDestroyWithAssociatedResourceDeleteDangerousParams{
XDangerous: gradient.F(true),
},
)
if err != nil {
panic(err.Error())
}
}