List AWS subnets
import requests
url = "https://platform.ankra.app/api/v1/clusters/aws/subnets"
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/subnets', 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/subnets \
--header 'Authorization: Bearer <token>'{
"subnets": [
{
"id": "<string>",
"name": "<string>",
"cidr": "<string>",
"availability_zone": "<string>",
"map_public_ip_on_launch": true,
"egress": {
"kind": "nat_gateway"
},
"foreign_instance_count": 123
}
]
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "Cluster not found"
}AWS Clusters
List AWS subnets
Bearer PAT authentication; RBAC permission clusters.read. Lists a VPC’s subnets with each one’s IPv4 default-route classification and the count of instances Ankra did not create; both are three-state and never collapse a failed read into a verdict. Answers 404 while the organisation’s aws_provider feature flag is off.
GET
/
api
/
v1
/
clusters
/
aws
/
subnets
List AWS subnets
import requests
url = "https://platform.ankra.app/api/v1/clusters/aws/subnets"
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/subnets', 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/subnets \
--header 'Authorization: Bearer <token>'{
"subnets": [
{
"id": "<string>",
"name": "<string>",
"cidr": "<string>",
"availability_zone": "<string>",
"map_public_ip_on_launch": true,
"egress": {
"kind": "nat_gateway"
},
"foreign_instance_count": 123
}
]
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"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.
Query Parameters
The organisation's AWS credential (a keys credential, or a role onboarded with the provisioning or self_managed scope).
AWS region slug, e.g. eu-west-1.
The VPC whose subnets to list.
Response
Successful response
Show child attributes
Show child attributes