> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aviatrix.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List VPC all subnets

> Retrieve list VPC all subnets.



## OpenAPI

````yaml /openapi/10.0/aviatrix-api.json get /v2/api/list_vpc_all_subnets
openapi: 3.1.0
info:
  title: Aviatrix Controller API
  version: '10.0'
  description: >-
    Aviatrix Controller API — version 10.0. Selected operations with Mintlify
    metadata.
servers: []
security: []
tags:
  - name: policies
    x-group: Policies
  - name: authentication
    x-group: Authentication
  - name: account-management
    x-group: Account Management
  - name: rbac
    x-group: RBAC & Permissions
  - name: gateways
    x-group: Gateways
  - name: transit
    x-group: Transit
  - name: nat
    x-group: NAT
  - name: app-domains
    x-group: SmartGroups
  - name: certificates
    x-group: Certificates
  - name: mitm
    x-group: MITM
  - name: monitoring
    x-group: Monitoring & Diagnostics
  - name: fqdn
    x-group: FQDN
  - name: logging
    x-group: Logging
  - name: vpn
    x-group: UserVPN
  - name: site-to-cloud
    x-group: Site-to-Cloud
  - name: controller
    x-group: Controller
  - name: bgp
    x-group: BGP
  - name: general
    x-group: General
  - name: firenet
    x-group: FireNet
  - name: networking
    x-group: Networking
  - name: tgw
    x-group: AWS TGW
  - name: ips
    x-group: IPS
  - name: saml
    x-group: SAML
paths:
  /v2/api/list_vpc_all_subnets:
    get:
      tags:
        - networking
      operationId: list_vpc_all_subnets_get
      parameters:
        - description: A vpc region.
          in: query
          name: region
          required: true
          schema:
            enum:
              - ''
              - acs-ap-northeast-1 (Tokyo)
              - acs-ap-south-1 (Mumbai)
              - acs-ap-southeast-1 (Singapore)
              - acs-ap-southeast-2 (Sydney)
              - acs-ap-southeast-3 (Kuala Lumpur)
              - acs-ap-southeast-5 (Jakarta)
              - acs-cn-beijing (Beijing)
              - acs-cn-chengdu (Chengdu)
              - acs-cn-guangzhou (Guangzhou)
              - acs-cn-hangzhou (Hangzhou)
              - acs-cn-heyuan (Heyuan)
              - acs-cn-hongkong (Hongkong)
              - acs-cn-huhehaote (Hohhot)
              - acs-cn-qingdao (Qingdao)
              - acs-cn-shanghai (Shanghai)
              - acs-cn-shenzhen (Shenzhen)
              - acs-cn-wulanchabu (Ulanqab)
              - acs-cn-zhangjiakou (Zhangjiakou)
              - acs-eu-central-1 (Frankfurt)
              - acs-eu-west-1 (London)
              - acs-me-central-1 (Riyadh)
              - acs-me-east-1 (Dubai)
              - acs-us-east-1 (Virginia)
              - acs-us-west-1 (Silicon Valley)
              - ap-chuncheon-1
              - ap-hyderabad-1
              - ap-melbourne-1
              - ap-mumbai-1
              - ap-osaka-1
              - ap-seoul-1
              - ap-singapore-1
              - ap-singapore-2
              - ap-sydney-1
              - ap-tokyo-1
              - avx-edge-default
              - ca-montreal-1
              - ca-toronto-1
              - eu-amsterdam-1
              - eu-frankfurt-1
              - eu-madrid-1
              - eu-marseille-1
              - eu-milan-1
              - eu-paris-1
              - eu-stockholm-1
              - eu-zurich-1
              - il-jerusalem-1
              - me-abudhabi-1
              - me-dubai-1
              - me-jeddah-1
              - me-riyadh-1
              - mx-monterrey-1
              - mx-queretaro-1
              - sa-bogota-1
              - sa-santiago-1
              - sa-saopaulo-1
              - sa-valparaiso-1
              - sa-vinhedo-1
              - uk-cardiff-1
              - uk-london-1
              - us-ashburn-1
              - us-chicago-1
              - us-langley-1
              - us-luke-1
              - us-phoenix-1
              - us-sanjose-1
            type: string
        - description: A account name with credential.
          in: query
          name: account_name
          required: true
          schema:
            type: string
        - description: A unique VPC ID.
          in: query
          name: vpc_id
          required: true
          schema:
            type: string
        - description: Cloud type.
          in: query
          name: cloud_type
          required: true
          schema:
            enum:
              - 1
              - 4
              - 8
              - 16
              - 32
              - 256
              - 1024
              - 2048
              - 4096
              - 8192
              - 262144
              - 524288
              - 1048576
            type: integer
        - description: Only show private subnets.
          in: query
          name: private_subnets
          required: false
          schema:
            type: boolean
        - description: Display in json.
          in: query
          name: json_format
          required: false
          schema:
            type: boolean
        - description: Include associated rtb.
          in: query
          name: include_rtb
          required: false
          schema:
            type: boolean
        - $ref: '#/components/parameters/action'
        - $ref: '#/components/parameters/CID'
      responses:
        '200':
          $ref: '#/components/responses/general_response_v2'
        default:
          $ref: '#/components/responses/general_response_v2'
      x-codeSamples:
        - lang: curl
          label: cURL
          source: |-
            curl -sk -X GET "https://<controller>/v2/api/list_vpc_all_subnets" \
              -H "Authorization: cid <CID>"
        - lang: python
          label: Python
          source: |-
            import requests

            url = "https://<controller>/v2/api/list_vpc_all_subnets"
            headers = {"Authorization": "cid <CID>"}

            response = requests.get(url, headers=headers, verify=False)
            print(response.status_code)
            print(response.text)
        - lang: javascript
          label: JavaScript
          source: |-
            fetch("https://<controller>/v2/api/list_vpc_all_subnets", {
              method: "GET",
              headers: {"Authorization": "cid <CID>"}
            })
              .then(res => res.text())
              .then(console.log)
              .catch(console.error);
        - lang: go
          label: Go
          source: |-
            package main

            import (
              "fmt"
              "net/http"
            )

            func main() {
              req, _ := http.NewRequest("GET", "https://<controller>/v2/api/list_vpc_all_subnets", nil)
              req.Header.Set("Authorization", "cid <CID>")

              client := &http.Client{}
              resp, err := client.Do(req)
              if err != nil {
                panic(err)
              }
              defer resp.Body.Close()

              fmt.Println(resp.Status)
            }
components:
  parameters:
    action:
      description: The API action to perform. Required for 7.2 controllers only.
      in: query
      name: action
      schema:
        $ref: '#/components/schemas/action'
    CID:
      description: The opaque session ID token. Required for 7.2 controllers only.
      in: query
      name: CID
      schema:
        $ref: '#/components/schemas/CID'
  responses:
    general_response_v2:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/general_response_v2'
      description: General v2 API response schema.
  schemas:
    action:
      description: The API action to perform. Required for 7.2 controllers only.
      type: string
    CID:
      description: The opaque session ID token. Required for 7.2 controllers only.
      type: string
    general_response_v2:
      additionalProperties: true
      description: A generic API response container for v2 style APIs.
      properties:
        errortype:
          description: Error type if the API failed.
          type: string
        reason:
          description: Failure reason if the API failed.
          type: string
        results:
          oneOf:
            - description: API response data
              type: boolean
            - description: API response data
              type: integer
            - description: API response data
              type: string
            - description: API response data
              type: object
            - description: API response data
              items: {}
              type: array
        return:
          description: Whether the API returned successfully
          type: boolean
      title: General Response v2
      type: object

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.