To list the associated billable resources that can be destroyed along with a cluster, send a GET request to the /v2/kubernetes/clusters/$K8S_CLUSTER_ID/destroy_with_associated_resources
endpoint.
Name | Type | Required | Description | Default Value |
---|---|---|---|---|
cluster_id |
string | True | A unique ID that can be used to reference a Kubernetes cluster. |
import os
from pydo import Client
client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))
resp = client.kubernetes.list_associated_resources(cluster_id="da8fda8")
See the API spec for this endpoint to view additional detail on responses, headers, parameters, and more.
The response will be a JSON object containing load_balancers
, volumes
, and volume_snapshots
keys. Each will be set to an array of objects containing the standard attributes for associated resources.
Unauthorized
The resource was not found.
API Rate limit exceeded
Server error.
Unexpected error