List AWS subnets
import requests
url = "https://platform.ankra.app/org/clusters/aws/subnets"
headers = {"cookie": "ankra_session="}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {cookie: 'ankra_session='}};
fetch('https://platform.ankra.app/org/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/org/clusters/aws/subnets \
--cookie ankra_session={
"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
Browser session 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
/
org
/
clusters
/
aws
/
subnets
List AWS subnets
import requests
url = "https://platform.ankra.app/org/clusters/aws/subnets"
headers = {"cookie": "ankra_session="}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {cookie: 'ankra_session='}};
fetch('https://platform.ankra.app/org/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/org/clusters/aws/subnets \
--cookie ankra_session={
"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
Browser session. Mutations also require X-Ankra-CSRF.
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