import requests
url = "https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/zone-move/abort"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/zone-move/abort', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/zone-move/abort \
--header 'Authorization: Bearer <token>'{
"move": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source_cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"target_cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"zone": "<string>",
"status": "planned",
"plan": {
"target": {
"name": "<string>",
"zone": "<string>",
"network_mode": "<string>",
"storage_tier": "<string>",
"control_plane": {
"plan": "<string>",
"count": 123
},
"bastion_plan": "<string>",
"node_groups": [
{
"name": "<string>",
"plan": "<string>",
"count": 123
}
],
"existing_cluster_id": "<string>"
},
"stacks": [
{
"name": "<string>",
"carried": true,
"reason": "<string>",
"namespaces": [
"<string>"
],
"seeded": true,
"stopped_with_source": true,
"vault": {
"id": "<string>",
"name": "<string>",
"basis": "request"
}
}
],
"data": [
{
"stack": "<string>",
"namespace": "<string>",
"name": "<string>",
"kind": "<string>",
"engine": "<string>",
"requested_bytes": 123,
"storage_class": "<string>",
"target_storage_class": "<string>",
"claim_names": [
"<string>"
]
}
],
"not_carried": [
{
"what": "<string>",
"reason": "<string>"
}
],
"dns": [
{
"hostname": "<string>",
"mechanism": "<string>",
"source_origin": "<string>",
"target_origin": "<string>"
}
],
"storage_class_mapping": {},
"load_balancers": [
{
"service": {
"namespace": "<string>",
"name": "<string>"
},
"source_load_balancer_id": "<string>",
"target_load_balancer_id": "<string>"
}
],
"warnings": [
"<string>"
]
},
"steps": [
{
"name": "<string>",
"status": "pending",
"started_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z",
"message": "<string>"
}
],
"soak_until": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"error_excerpt": "<string>"
}
}Abort a zone move
Stops a move and puts the source back, recorded as aborted by the caller. During the cutover until the traffic moves (freezing, final_copy, or cutting_over before a repoint was recorded and before the DNS cutover settled) the final copy’s runs are cancelled and settled, the target is put in standby, the source is unfrozen and the maintenance page comes down; what the move copied onto the target - drafts, restored volumes, and the namespaces it created there - is then removed. Once the traffic may have moved, the abort is a full rollback: the names are pointed back, the target stands down, and the source is started and unfrozen; writes made on the target are not copied back and the target is kept. Before the cutover (provisioning, seeding, ready_for_cutover) the move is cancelled, the target’s copies are removed and nothing on the source changes. The move ends failed with the reason. The action only records the abort, so it is accepted while the move’s steps are failing; the recovery starts on the first pass about four minutes later, once any pass that held the move has ended. Requires stacks.write and clusters.operate on the source.
import requests
url = "https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/zone-move/abort"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/zone-move/abort', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/zone-move/abort \
--header 'Authorization: Bearer <token>'{
"move": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source_cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"target_cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"zone": "<string>",
"status": "planned",
"plan": {
"target": {
"name": "<string>",
"zone": "<string>",
"network_mode": "<string>",
"storage_tier": "<string>",
"control_plane": {
"plan": "<string>",
"count": 123
},
"bastion_plan": "<string>",
"node_groups": [
{
"name": "<string>",
"plan": "<string>",
"count": 123
}
],
"existing_cluster_id": "<string>"
},
"stacks": [
{
"name": "<string>",
"carried": true,
"reason": "<string>",
"namespaces": [
"<string>"
],
"seeded": true,
"stopped_with_source": true,
"vault": {
"id": "<string>",
"name": "<string>",
"basis": "request"
}
}
],
"data": [
{
"stack": "<string>",
"namespace": "<string>",
"name": "<string>",
"kind": "<string>",
"engine": "<string>",
"requested_bytes": 123,
"storage_class": "<string>",
"target_storage_class": "<string>",
"claim_names": [
"<string>"
]
}
],
"not_carried": [
{
"what": "<string>",
"reason": "<string>"
}
],
"dns": [
{
"hostname": "<string>",
"mechanism": "<string>",
"source_origin": "<string>",
"target_origin": "<string>"
}
],
"storage_class_mapping": {},
"load_balancers": [
{
"service": {
"namespace": "<string>",
"name": "<string>"
},
"source_load_balancer_id": "<string>",
"target_load_balancer_id": "<string>"
}
],
"warnings": [
"<string>"
]
},
"steps": [
{
"name": "<string>",
"status": "pending",
"started_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z",
"message": "<string>"
}
],
"soak_until": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"error_excerpt": "<string>"
}
}