Skip to content
  • Auto
  • Light
  • Dark

Delete Selective

Selectively Destroy a Droplet and its Associated Resources
gpu_droplets.destroy_with_associated_resources.delete_selective(intdroplet_id, DestroyWithAssociatedResourceDeleteSelectiveParams**kwargs)
delete/v2/droplets/{droplet_id}/destroy_with_associated_resources/selective

To destroy a Droplet along with a sub-set of its associated resources, send a DELETE request to the /v2/droplets/$DROPLET_ID/destroy_with_associated_resources/selective endpoint. The JSON body of the request should include reserved_ips, snapshots, volumes, or volume_snapshots keys each set to an array of IDs for the associated resources to be destroyed. The IDs can be found by querying the Droplet's associated resources. Any associated resource not included in the request will remain and continue to accrue changes on your account.

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
droplet_idint
minimum1
floating_ipslist
optional
deprecated
List[str]

An array of unique identifiers for the floating IPs to be scheduled for deletion.

reserved_ipslist
optional
List[str]

An array of unique identifiers for the reserved IPs to be scheduled for deletion.

snapshotslist
optional
List[str]

An array of unique identifiers for the snapshots to be scheduled for deletion.

volume_snapshotslist
optional
List[str]

An array of unique identifiers for the volume snapshots to be scheduled for deletion.

volumeslist
optional
List[str]

An array of unique identifiers for the volumes to be scheduled for deletion.

from do_gradientai import GradientAI

client = GradientAI()
client.gpu_droplets.destroy_with_associated_resources.delete_selective(
    droplet_id=3164444,
)