import requests
url = "https://platform.ankra.app/api/v1/clusters/aws/{cluster_id}/deprovision-volumes"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/clusters/aws/{cluster_id}/deprovision-volumes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/api/v1/clusters/aws/{cluster_id}/deprovision-volumes \
--header 'Authorization: Bearer <token>'{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"state": "present",
"volume_count": 123,
"volumes": [
{
"volume_id": "<string>",
"persistent_volume": "<string>",
"claim": "<string>",
"storage_class": "<string>",
"capacity": "<string>"
}
],
"kept_volumes": [
{
"volume_id": "<string>",
"persistent_volume": "<string>",
"claim": "<string>",
"storage_class": "<string>",
"capacity": "<string>"
}
],
"retention_policy": "retain",
"warning": "<string>",
"consent_required": true
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "Cluster not found"
}The persistent volumes deleting a AWS cluster removes
What deleting the cluster does to its persistent volumes: the cloud volumes its CSI driver provisioned that DELETE /api/v1/clusters/aws/{cluster_id} deletes with the cluster, or keeps when the cluster’s retention_policy retains them. Read it before the delete to name the volumes and ask for accept_volume_data_loss. A cluster whose inventory was never synced, or could not be read, is unknown, never none. Answers 404 while the organisation’s aws_provider feature flag is off.
import requests
url = "https://platform.ankra.app/api/v1/clusters/aws/{cluster_id}/deprovision-volumes"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/clusters/aws/{cluster_id}/deprovision-volumes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/api/v1/clusters/aws/{cluster_id}/deprovision-volumes \
--header 'Authorization: Bearer <token>'{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"state": "present",
"volume_count": 123,
"volumes": [
{
"volume_id": "<string>",
"persistent_volume": "<string>",
"claim": "<string>",
"storage_class": "<string>",
"capacity": "<string>"
}
],
"kept_volumes": [
{
"volume_id": "<string>",
"persistent_volume": "<string>",
"claim": "<string>",
"storage_class": "<string>",
"capacity": "<string>"
}
],
"retention_policy": "retain",
"warning": "<string>",
"consent_required": true
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "Cluster not found"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
PAT organisation override.
Path Parameters
Response
What the delete does to the cluster's volumes.
What deleting a self-managed cluster does to its persistent volumes (the cloud volumes its CSI driver provisioned).
present (the delete removes at least one volume), none (it removes none: the cluster has none, or its retention_policy keeps them), or unknown (the inventory was never synced or could not be read). Unknown is never taken as none.
present, none, unknown How many volumes the delete removes; null when state is unknown.
The volumes the delete removes, sorted by claim.
Show child attributes
Show child attributes
The volumes the cluster's retention_policy keeps; they keep billing at the provider.
Show child attributes
Show child attributes
The cluster's effective retention_policy on AWS and Scaleway (retain when unset); null on providers without one.
retain, delete The sentence to show before the delete; empty when it touches no volume.
True when the delete removes volumes or cannot tell whether it does (state present or unknown): the delete then needs accept_volume_data_loss.